I am trying to configure TheHive to support TLS (https instead of http). It has a configuration file read by Play Framework.
Any ideas how?
https://docs.thehive-project.org/thehive/operations/https/
If you want to configure HTTPS in Play Framework, I'd recommend having a look to the official documentation: Configuring HTTPS - Providing configuration.
Related
I'm currently deploying a Scala Play 2.7.x application to Heroku intending only HTTPS access but the HTTP access is still available and then in this case, the authentication doesn't work.
How can I disable HTTP completely for a Scala Play application deployed in Heroku?
Heroku doesn't handle redirection for you:
Redirects need to be performed at the application level as the Heroku router does not provide this functionality. You should code the redirect logic into your application.
It looks like this is relatively straightforward with Play Framework version 2.6 or later:
play.filters.enabled += play.filters.https.RedirectHttpsFilter
If necessary, you can override this setting in your development environment by passing -Dplay.filters.enabled=<whatever> locally, or provide an alternate configuration file with -Dconfig.file.
We are doing a redirect from http to https on our AWS application load balancer that works great in most browsers, but doesn't work in safari in an iphone. The redirect is implemented as outlined here https://www.fischco.org/technica/2018/aws-alb-redirects/
In safari, our site works perfectly in an iphone when you load it via https, but when you don't include a protocol or use http, it says "Safari could not open the page because the server stopped responding."
Any ideas on how to fix this without doing client-side redirection?
This seems to be an Apache bug (https://bz.apache.org/bugzilla/show_bug.cgi?id=59311), for which a solution can be found here: https://serverfault.com/questions/937253/https-doesnt-work-with-safari (check out Steffen Ullrich's answer and the comments)
TL;DR;
Add this to your host config
Header unset Upgrade
OR alternatively, add this to your .htaccess file (see Disable Apache http2 announce via htaccess)
Header edit Upgrade (.*)h2,h2c(.*) "$1$2"
I'm working on an old project using Savon to connect to the SalesForce api. I'm getting this error:
UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization. Please use TLS 1.1 or higher when connecting to Salesforce using https
How do I get it to use TLS 1.2? Or is there a simple alternative to Savon that does use TLS 1.2?
Savon uses HTTPI as a common interface for Ruby's HTTP libraries
Configure Savon to use a specific library with:
HTTPI.adapter = :httpclient
HTTPI.adapter = :curb
...
it currently tries the libs in the following order:
[:httpclient, :curb, :em_http, :excon, :net_http, :net_http_persistent]
If you haven't installed httpclient, it will try curbnext and so on.
You should try setting an explicit lib and see if it works for you.
Just to help others in the future who may face the same problem. It seems the TLS level is not built in the savon gem but in the httpi adapter. By changing the adapter to httpclient (installed the gem, put require 'httpclient') the savon gem starts using it without further configuration. Just remove the ssl_level params and the latest and more modern cypher is used. Problem solved.
I have a VPS (Ubuntu 14.04) with Apache2, Swift 3.1.1 and Vapor installed. I want to receive client side requests to my Vapor-Built-Service via HTTPS protocol (on port 8443 for example). I didn't find any newbie helper document to do this, so please help me.
Thanks.
After a lot of searching I found the answer:
1. You need to install Apache or Nginx on your VPS. Here I assume that the reader uses Apache. But for more info on installing Apache server on Ubuntu 14.04 you can take a look at here.
2. The next thing you need to do is to make Apache work with SSL (or HTTPS protocol). You can find a complete guide here.
3. Now it's time to set the Apache server as a reverse proxy server. You can find a good guide to do that here and here. don't forget to put the reverse-proxy-config-code at port 443 related part.
Update:
There is also another way which you can configure the Vapor directly. Take a look at here.
How do I find out if my request was made over HTTP or HTTPS in Play 2.0?
Is there a way to find out from the request?
def myControllerMethod = Action { request =>
// this is where I would like to know
}
Play 1.X had a solution, it was request.secure. Please let me know if you know.
Play! Framework 2.0 doesn't currently support HTTPS (the master branch does seem to have support, but that will probably be rolled into Play 2.1). A great way to deploy Play! (in general, and also to support HTTPS) is to use a front proxy web server, like nginx or lighttpd.
Here's a guide on setting up a front-end web server. Then, you can just add a special header for HTTPS requests. Additionally, you'll be able to deploy several Play! applications at once, and use the front-end web server to load balance and fail over automatically.