Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use as library in Play? #1

Open
wsargent opened this issue Mar 13, 2017 · 3 comments
Open

Use as library in Play? #1

wsargent opened this issue Mar 13, 2017 · 3 comments

Comments

@wsargent
Copy link

Hi Valters,

Really like what you've done with the set up -- would you be able to generalize this into Play itself, so that Play applications could use https automatically as a sample project? What do you think would be the best way to set up a Play application?

Ideally we'd put this into the starters and seeds at Play: https://playframework.com/download#seeds so it could be something that people could disable as need be, but would be "secure by default".

@wsargent
Copy link
Author

Adding playframework/playframework#7072 as play issue tracker

@valters
Copy link
Owner

valters commented Mar 14, 2017

Hi Will,

Yes I would love to see this idea become part of Play. There are few things to think about for now:

  1. Certificate renewal.

I have not figured this out completely yet. (When time rolls over to renew cert for first time I guess I will figure it out.) The thing is, from docs I kind of gather they give you new cert, you replace the old cert in your keystore, and you are good to go (possibly after restarting the server). But is that really so? Won't the browsers start complaining about cert suddenly being different? Was there some sort of chaining scheme required, where the new cert is somehow added on to previous cert?

I don't completely get this, but probably will need to read up on what exactly Certbot does, and how exactly browsers handle it.

  1. For late endgame I would love to fix up a custom "SSL provider" to allow seamlessly retrieving the first certificate on clean start (I mean, app can start serving HTTPS without scary warnings, similar how Play will auto-generate self signed cert if you request starting with HTTPS but nothing else configured. Play self configures.)

  2. Dependencies:

3.1) JOSE/JWT library for signing ACME requests. The JWT signing of JSON is fairly straightforward, in fact it can be implemented as couple methods (Base64 + BouncyCastle), and the Nimbus library I used is somewhat overkill - it tries to be everything for everybody. We just need the subset that is required to talk to ACME. Maybe there is a smaller lib that Play officially prefers that can do JWT?

3.2) Probably will require Bouncy Castle for crypto. (But isn't that a default anyway already.)

@wsargent
Copy link
Author

I am addressing JWT support through playframework/playframework#7053 for session cookies, since that is the library with the most minimal library dependency footprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants