Package com.github.ambry.server
Interface ServerSecurityService
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
public interface ServerSecurityService extends java.io.Closeable
Responsible for performing any security validations on the HTTP2 connection terminating on server. Validations could involve authentication, authorization, security checks and so on which the implementation can decide. This could also involve setting headers while responding, based on the request. Exceptions are returned viaCallback
s on any validation failure.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.concurrent.Future<java.lang.Void>
validateConnection(javax.net.ssl.SSLSession sslSession)
Similar tovalidateConnection(SSLSession, Callback)
but returns aFuture
instead of requiring a callback.void
validateConnection(javax.net.ssl.SSLSession sslSession, Callback<java.lang.Void> callback)
Performs security validations (if any) before allowing the HTTP2 connection setup to be complete and invokes thecallback
once done.default java.util.concurrent.Future<java.lang.Void>
validateRequest(RestRequest restRequest)
Similar tovalidateRequest(RestRequest, Callback)
but returns aFuture
instead of requiring a callback.void
validateRequest(RestRequest restRequest, Callback<java.lang.Void> callback)
Performs security validations (if any) on the individual streamRestRequest
asynchronously and invokes theCallback
when the validation completes.
-
-
-
Method Detail
-
validateConnection
void validateConnection(javax.net.ssl.SSLSession sslSession, Callback<java.lang.Void> callback)
Performs security validations (if any) before allowing the HTTP2 connection setup to be complete and invokes thecallback
once done.- Parameters:
sslSession
- theSSLSession
to process.callback
- the callback to invoke once processing is finished.
-
validateRequest
void validateRequest(RestRequest restRequest, Callback<java.lang.Void> callback)
Performs security validations (if any) on the individual streamRestRequest
asynchronously and invokes theCallback
when the validation completes.- Parameters:
restRequest
-RestRequest
upon which validations have to be performedcallback
- TheCallback
which will be invoked on the completion of the request. Cannot be null.
-
validateConnection
default java.util.concurrent.Future<java.lang.Void> validateConnection(javax.net.ssl.SSLSession sslSession)
Similar tovalidateConnection(SSLSession, Callback)
but returns aFuture
instead of requiring a callback.- Parameters:
sslSession
-SSLSession
upon which validations has to be performed- Returns:
- a
Future
that is completed when the processing is done.
-
validateRequest
default java.util.concurrent.Future<java.lang.Void> validateRequest(RestRequest restRequest)
Similar tovalidateRequest(RestRequest, Callback)
but returns aFuture
instead of requiring a callback.- Parameters:
restRequest
-RestRequest
upon which validations has to be performed- Returns:
- a
Future
that is completed when the processing is done.
-
-