Interface TlsDirectives
-
- All Known Subinterfaces:
Directives
- All Known Implementing Classes:
Directives$
,HttpApp
,TlsDirectives$
public interface TlsDirectives
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Directive<scala.Tuple1<java.security.cert.X509Certificate>>
extractClientCertificate()
Extract the client certificate, or reject the request with aTlsClientUnverifiedRejection
.Directive<scala.Tuple1<javax.net.ssl.SSLSession>>
extractSslSession()
Extract the current SSLSession.Directive<scala.runtime.BoxedUnit>
requireClientCertificateIdentity(scala.util.matching.Regex cnRegex)
Require the client to be authenticated, if not reject the request with aTlsClientUnverifiedRejection
, also require the one of the client certificateip
ordns
SANs (Subject Alternative Name) or if non exists, the CN (Common Name) to match the given regular expression, if not the request is rejected with aTlsClientIdentityRejection
-
-
-
Method Detail
-
extractSslSession
Directive<scala.Tuple1<javax.net.ssl.SSLSession>> extractSslSession()
Extract the current SSLSession.Note: Using this directives requires tls-session info parsing to be enabled:
akka.http.server.parsing.tls-session-info-header = on
- Returns:
- (undocumented)
-
extractClientCertificate
Directive<scala.Tuple1<java.security.cert.X509Certificate>> extractClientCertificate()
Extract the client certificate, or reject the request with aTlsClientUnverifiedRejection
.Using this directives requires tls-session info parsing to be enabled:
akka.http.server.parsing.tls-session-info-header = on
The
SSLEngine
for the server needs to be set up withsetWantClientAuth(true)
orsetNeedClientAuth(true)
or else every request will be failed.- Returns:
- (undocumented)
-
requireClientCertificateIdentity
Directive<scala.runtime.BoxedUnit> requireClientCertificateIdentity(scala.util.matching.Regex cnRegex)
Require the client to be authenticated, if not reject the request with aTlsClientUnverifiedRejection
, also require the one of the client certificateip
ordns
SANs (Subject Alternative Name) or if non exists, the CN (Common Name) to match the given regular expression, if not the request is rejected with aTlsClientIdentityRejection
Using this directives requires tls-session info parsing to be enabled:
akka.http.server.parsing.tls-session-info-header = on
The
SSLEngine
for the server needs to be set up withsetWantClientAuth(true)
orsetNeedClientAuth(true)
or else every request will be failed.- Parameters:
cnRegex
- (undocumented)- Returns:
- (undocumented)
-
-