playframework/play-scala-tls-example

Howto get SSLSession info from controller's action?

Closed this issue · 1 comments

Hi.

i'm new to play. Can someone hint me to how to get sslsession information inside a controller's action?
I want to map the client's cert to a role and authorize actions..

Thanks.

Update: Think, I'm looking for something like this: http://spray.io/documentation/1.1-SNAPSHOT/api/index.html#spray.util.SSLSessionInfo

http://spray.io/documentation/1.1-SNAPSHOT/api/index.html#spray.http.HttpHeaders$$SSL$minusSession$minusInfo

This seems to be a way:
https://github.com/bblfish/play20/tree/TLS#tls-differences

playframework/playframework#475 (comment)

Solution: Offload SSL handling and pass DN as HTTP header.

Arbitrary google hit: http://nategood.com/client-side-certificate-authentication-in-ngi