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

Expose TLS protocol used for connection in SecureRequestCustomizer #85

Closed
joakime opened this issue Feb 16, 2016 · 7 comments
Closed

Expose TLS protocol used for connection in SecureRequestCustomizer #85

joakime opened this issue Feb 16, 2016 · 7 comments
Assignees
Milestone

Comments

@joakime
Copy link
Contributor

joakime commented Feb 16, 2016

This is an enhancement request to include the TLS protocol that was used to establish the connection in the request attributes that SecureRequestCustomizer uses.

This enhancement request is for Jetty 9.2.x +

@joakime joakime added this to the 9.2.x milestone Feb 16, 2016
@sbordet
Copy link
Contributor

sbordet commented Feb 16, 2016

I think the best way to do this is to expose the SSLSession object itself, for example under org.eclipse.jetty.servlet.request.ssl_session, from where one could get much more information than just the TLS protocol version.

@gregw
Copy link
Contributor

gregw commented Feb 17, 2016

+1 to what @sbordet said.... but make it optional. Perhaps in the style of ForwardedRequestCustomizer, have a setSslSessionAttribute(String) method that set's the name of the attribute to use. If not set, then the attribute is not set.

@joakime
Copy link
Contributor Author

joakime commented Mar 8, 2016

Seems a bit dangerous to expose the full SSLSession to the web applications.

Why is just exposing the TLS protocol in a new attribute undesired?

@sbordet
Copy link
Contributor

sbordet commented Mar 8, 2016

Dangerous, how ?

Exposing the TLS protocol would be a non-standard addition, and then we would need to expose a bunch of other information that may be needed to web applications.

Exposing the SSLSession avoids the proliferation of non-standard attributes: we just add one rather than one for every property that SSLSession exposes.

@joakime
Copy link
Contributor Author

joakime commented Mar 8, 2016

If you don't know what you are doing with the SSLSession, couldn't you cause problems with your connection easily?

@sbordet
Copy link
Contributor

sbordet commented Mar 8, 2016

People can always mess things up if they don't know what they're doing, e.g. call System.exit(0).

For people that needs particular, non-common, SSLSession information, looking up a non-standard attribute, I would say that if they mess up, well... but if they don't, they have all the information they want and we do this change once for all future SSLSession attributes (e.g. ALPN protocols in JDK 9).

@joakime joakime self-assigned this Mar 8, 2016
@joakime
Copy link
Contributor Author

joakime commented Mar 8, 2016

Fixed in jetty-9.2.x and merged up to jetty-9.3.x

@joakime joakime closed this as completed Mar 8, 2016
sbordet added a commit that referenced this issue May 24, 2016
…ustomizer.

Exposed the SSLSession as attribute only if the attribute key is valid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants