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 via Callbacks on any validation failure.
    • 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 the callback once done.
        Parameters:
        sslSession - the SSLSession 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 stream RestRequest asynchronously and invokes the Callback when the validation completes.
        Parameters:
        restRequest - RestRequest upon which validations have to be performed
        callback - The Callback 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 to validateConnection(SSLSession, Callback) but returns a Future 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 to validateRequest(RestRequest, Callback) but returns a Future 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.