specify https port in play framework 2.0 - https

How do I specify which port for Play https to start on? In Play 1.2.4 I would add to the application.conf:
https.port=9443
But Play 2.0 does not seem to support this anymore. Also, this syntax plainly does not work:
play start -Dhttps.port=9443
although this way does work for regular http: play start 9100
Anyone know how to do this for https?

According to this answer on the Play! discussion group, direct https support is not available in Play! 2.0 yet:
https://groups.google.com/forum/?fromgroups#!topic/play-framework/I7I7lULd0cI
If you need https, you can either stick with Play! 1.2.4, or put an https-capable web server in front, such as Apache or nginx.

There is a Play 2.0 branch that supports HTTPS.
Official issue status is "in progress", as of time of writing.

If you still want to have HTTPS support in Play 2, it looks like it has been added. I see it is a system property with the name "https.port" as you specified. The change has been in there for a while now. I think what you had tried before should work now under 2.0.3.
Here is where I found that source. It wasn't in the docs.
https://github.com/playframework/Play20/blob/master/framework/src/play/src/main/scala/play/core/server/NettyServer.scala

For what it's worth, it looks like it was added back in by version 2.1.
The latest docs: http://www.playframework.com/documentation/2.3.x/ConfiguringHttps

Related

How to do canary releases and dynamic routing with Netflix Zuul?

We faced with the problem that we need to do such thing as dynamic routing and canary releases. So, for example, we deploy microservice microservice-1. Then, when someone finished a big feature we want to deploy it as a microservice microservice-1.1.
Question
Is it possible to dynamically reroute requests using information, for example, from Headers, and route to the microservice version microservice-1.1 instead on microservice-1?
For example, someone needs this feature and he will modify/add specific Header and for all requests, he will use new microservice-1.1. And if that Header is missing then the current microservice-1 version should be used.
For service discovery, I am using Eureka. Right now I am looking at linkerd but there is no support for Eureka and I am working on it right now. Of course, if it is possible to do it using Zuul that would be great. Please advise where to look at.
Not really sure about Netflix Zuul, but we liked the approach presented by Istio (backed by Google, etc) which works really well with Containers (Kubernetes) and you get the support for canary releases https://istio.io/blog/2017/0.1-canary/

Polymer CLI Build | Cache Busting Techniques

A little background:
My app is built on Polymer 2.x and is being hosted on a server that does not support HTTP/2 and does not have a certificate for HTTPS. We must support IE11, Chrome, Firefox, and Safari.
Problem:
I'm running into an issue with browser caching. I was hoping to use the service worker that the Polymer CLI generates to handle the cache busting. However, since our client's server doesn't have HTTPS enabled, we are unable to utilize it. Regardless, we have to support IE 11 on a single build, so service workers aren't an option.
I cannot figure out a way to bust the cache on new deployments. On the Polymer CLI github page, there is an open issue regarding this topic, but there hasn't been any traction since 2016. From watching the YouTube videos on Polymer, it looks like there is (or used to be) a way to intercept the build using Gulp, but I can't seem to figure it out.
Any help is greatly appreciated!
You can use the polymer-build library if you want to build a Polymer project using gulp. You can read about it here:
https://github.com/Polymer/polymer-build
Briefly mentioned in the docs here:
https://www.polymer-project.org/2.0/toolbox/build-for-production#use-polymer-build
Then you can cache bust using something like gulp-rev, but you have to make sure that you're not rewriting the custom element names, just the filenames and import paths. (I tried this once with gulp-rev-all, and by default it was replacing <app-header> with <app-header-a9fe00> or something like that.)
While creating the build run polymer build sw-precache-config.js
I've created gulp-polymer-build to help with this very issue. It borrows from polymer-cli build code, and supports your build configs in polymer.json. It allows you to modify your source stream before building, and then modify the forked streams for all builds you've configured in polymer.json. This makes it easy to use gulp-rev and gulp-rev-replace to do asset versioning.

Does Ruby Amazon S3 SDK use SSLv3?

I have a Rails application that uses Amazon S3 for image upload storage. Upload is handled directly in the browser, file manipulation is handled on the serverside.
Recently I received an automail that Amazon discontinues support for SSLv3. I wanted to clarify whether my application that uses an older version of Ruby SDK (aws-sdk-v1 1.61.0) could be affected because of that, since I am not sure what mechanism it uses for the ssl handshake.
Thank you in advance.
Short answer: it depends.
The old aws sdk allows you to provide (as a configuration setting) the http handler to use - the answer is dependant on the http handler user. Assuming you're using the default net/http based handler, then it depends on which ruby version you use and which openssl version it was built against.
As of ruby 2.1.4, 2.0.0p594, 1.9.3p550, ruby will not allow SSL3 connections by default (see the announcement). If you are running such a version of ruby, then SSL3 connections shouldn't be attempted, unless you go out of your way to do so.
If you use an earlier version then ruby may default to SSLv3 (depending on the openssl version built against) but if that fails it should be able to switch to a newer protocol instead. I'd highly recommend updating to the latest version in the ruby series you are already using, but I don't think you'll run into problems when SSLv3 is disabled.

"HTTP" URIs (HTTP Upgrade mechanism) support in OkHttp

As far as I understand this isn't supported in OkHttp 2.0. I have tried it with no luck so far...
Are there any plans to support this in the near future?
No plans at the moment. Open an issue in the projects issue tracker to start the conversation!

WSO2 WSF/Ruby - anyone using it?

Have been using Savon for my webservice stuff so far, but need to talk to a more "secure" service now, needing WS Addressing and WS Security Extensions.
Have started to extend this fork of Savon to handle it, but then found WSO2 WSF/Ruby - so wondering if anyone has any experience of it, pros/cons etc. That is, is it worth my switching to it? I cant see much out there about it, besides on their own site - their forums seem awfully quiet, which does not bode well.
Currently dev on OSX/Snow Leopard, deploying on CentOS.
Thanks in advance,
Chris
It does not seem so (from the lack of replies...)

Resources