Class CryptoHeaderFilter

  • All Implemented Interfaces:
    Filter

    @Deprecated(since="7.0.0")
    public class CryptoHeaderFilter
    extends Object
    implements Filter
    Deprecated.
    in 7.0, will be removed in future versions. See OPENIG-3704.
    Encrypts and decrypts header fields. All cipher algorithms provided by SunJCE Provider are supported for encryption but, for now CryptoHeaderFilter does not implement a way to set/retrieve the initialization vector(IV) (OPENIG-42) therefore, the CryptoHeader can not decrypt cipher algorithm using IV.

    For "algorithm"/"cipher" attributes, refer to

    See Also:
    Standard names
    • Field Detail

      • DEFAULT_ALGORITHM

        public static final String DEFAULT_ALGORITHM
        Deprecated.
        Default cipher algorithm to be used when none is specified.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CryptoHeaderFilter

        public CryptoHeaderFilter()
        Deprecated.
    • Method Detail

      • setDataEncryptionKeyReference

        public void setDataEncryptionKeyReference​(SecretReference<DataEncryptionKey> dataEncryptionKeyReference)
        Deprecated.
        Sets the encryption key used to encrypt headers.
        Parameters:
        dataEncryptionKeyReference - The key used to encrypt the header(s).
      • setOperation

        public void setOperation​(CryptoHeaderFilter.Operation operation)
        Deprecated.
        Sets the operation (encryption/decryption) to apply to the headers.
        Parameters:
        operation - The operation: encryption or decryption, to apply to the headers.
      • setMessageType

        public void setMessageType​(MessageType messageType)
        Deprecated.
        Sets the type of message to process headers for.
        Parameters:
        messageType - The type of message to process headers for.
      • setAlgorithm

        public void setAlgorithm​(String algorithm)
        Deprecated.
        Sets the cryptographic algorithm.
        Parameters:
        algorithm - The cryptographic algorithm.
      • setCharset

        public void setCharset​(Charset charset)
        Deprecated.
        The Charset to use to encrypt/decrypt values.
        Parameters:
        charset - The charset used to encrypt/decrypt values.
      • getHeaders

        public Set<String> getHeaders()
        Deprecated.
        Returns the headers whose values should be processed for encryption or decryption.
        Returns:
        The headers whose values should be processed for encryption or decryption.
      • filter

        public Promise<Response,​NeverThrowsException> filter​(Context context,
                                                                   Request request,
                                                                   Handler next)
        Deprecated.
        Description copied from interface: Filter
        Filters the request and/or response of an exchange. To pass the request to the next filter or handler in the chain, the filter calls next.handle(context, request).

        This method may elect not to pass the request to the next filter or handler, and instead handle the request itself. It can achieve this by merely avoiding a call to next.handle(context, request) and creating its own response object. The filter is also at liberty to replace a response with another of its own by intercepting the response returned by the next handler.

        Specified by:
        filter in interface Filter
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Promise representing the response to be returned to the client.