Package org.apache.nifi.properties
Class AwsSecretsManagerSensitivePropertyProvider
java.lang.Object
org.apache.nifi.properties.AwsSecretsManagerSensitivePropertyProvider
- All Implemented Interfaces:
SensitivePropertyProvider
public class AwsSecretsManagerSensitivePropertyProvider
extends Object
implements SensitivePropertyProvider
Amazon Web Services Secrets Manager implementation of Sensitive Property Provider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final software.amazon.awssdk.services.secretsmanager.SecretsManagerClientprivate static final Stringprivate final com.fasterxml.jackson.databind.ObjectMapperprivate final Lockprivate final ReadWriteLockprivate final Lock -
Constructor Summary
ConstructorsConstructorDescriptionAwsSecretsManagerSensitivePropertyProvider(software.amazon.awssdk.services.secretsmanager.SecretsManagerClient client) -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()private Optional<com.fasterxml.jackson.databind.node.ObjectNode> Returns the optional parsed JSON from the matching secret, or empty if the secret does not exist.booleanprotect(String unprotectedValue, ProtectedPropertyContext context) unprotect(String protectedValue, ProtectedPropertyContext context)
-
Field Details
-
IDENTIFIER_KEY
- See Also:
-
client
private final software.amazon.awssdk.services.secretsmanager.SecretsManagerClient client -
objectMapper
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
rwLock
-
readLock
-
writeLock
-
-
Constructor Details
-
AwsSecretsManagerSensitivePropertyProvider
AwsSecretsManagerSensitivePropertyProvider(software.amazon.awssdk.services.secretsmanager.SecretsManagerClient client)
-
-
Method Details
-
getIdentifierKey
- Specified by:
getIdentifierKeyin interfaceSensitivePropertyProvider
-
isSupported
public boolean isSupported()- Specified by:
isSupportedin interfaceSensitivePropertyProvider
-
protect
public String protect(String unprotectedValue, ProtectedPropertyContext context) throws SensitivePropertyProtectionException - Specified by:
protectin interfaceSensitivePropertyProvider- Throws:
SensitivePropertyProtectionException
-
unprotect
public String unprotect(String protectedValue, ProtectedPropertyContext context) throws SensitivePropertyProtectionException - Specified by:
unprotectin interfaceSensitivePropertyProvider- Throws:
SensitivePropertyProtectionException
-
getSecretKeyValues
private Optional<com.fasterxml.jackson.databind.node.ObjectNode> getSecretKeyValues(ProtectedPropertyContext context) Returns the optional parsed JSON from the matching secret, or empty if the secret does not exist.- Parameters:
context- The property context- Returns:
- The optional parsed JSON, or empty if the secret does not exist
-
cleanUp
public void cleanUp()- Specified by:
cleanUpin interfaceSensitivePropertyProvider
-