Package org.forgerock.openig.filter
Class CryptoHeaderFilter
- java.lang.Object
-
- org.forgerock.openig.filter.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CryptoHeaderFilter.Heaplet
Deprecated.Creates and initializes a header filter in a heap environment.static class
CryptoHeaderFilter.Operation
Deprecated.Should the filter encrypt or decrypt the given headers ?
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ALGORITHM
Deprecated.Default cipher algorithm to be used when none is specified.
-
Constructor Summary
Constructors Constructor Description CryptoHeaderFilter()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Promise<Response,NeverThrowsException>
filter(Context context, Request request, Handler next)
Deprecated.Filters the request and/or response of an exchange.Set<String>
getHeaders()
Deprecated.Returns the headers whose values should be processed for encryption or decryption.void
setAlgorithm(String algorithm)
Deprecated.Sets the cryptographic algorithm.void
setCharset(Charset charset)
Deprecated.TheCharset
to use to encrypt/decrypt values.void
setDataEncryptionKeyReference(SecretReference<DataEncryptionKey> dataEncryptionKeyReference)
Deprecated.Sets the encryption key used to encrypt headers.void
setDecryptionKeys(Supplier<Promise<Stream<DataDecryptionKey>,NeverThrowsException>> decryptionKeys)
Deprecated.Sets the decryption key to decrypt headers.void
setMessageType(MessageType messageType)
Deprecated.Sets the type of message to process headers for.void
setOperation(CryptoHeaderFilter.Operation operation)
Deprecated.Sets the operation (encryption/decryption) to apply to the headers.
-
-
-
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
-
-
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).
-
setDecryptionKeys
public void setDecryptionKeys(Supplier<Promise<Stream<DataDecryptionKey>,NeverThrowsException>> decryptionKeys)
Deprecated.Sets the decryption key to decrypt headers.- Parameters:
decryptionKeys
- The keys used to decrypt 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.TheCharset
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 callsnext.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.
-
-