public class AwsSecretsManagerSensitivePropertyProvider extends Object implements SensitivePropertyProvider
| Modifier and Type | Field and Description |
|---|---|
private software.amazon.awssdk.services.secretsmanager.SecretsManagerClient |
client |
private static String |
IDENTIFIER_KEY |
private com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
private Lock |
readLock |
private ReadWriteLock |
rwLock |
private Lock |
writeLock |
| Constructor and Description |
|---|
AwsSecretsManagerSensitivePropertyProvider(software.amazon.awssdk.services.secretsmanager.SecretsManagerClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
String |
getIdentifierKey() |
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.
|
boolean |
isSupported() |
String |
protect(String unprotectedValue,
ProtectedPropertyContext context) |
String |
unprotect(String protectedValue,
ProtectedPropertyContext context) |
private static final String IDENTIFIER_KEY
private final software.amazon.awssdk.services.secretsmanager.SecretsManagerClient client
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
private final ReadWriteLock rwLock
private final Lock readLock
private final Lock writeLock
AwsSecretsManagerSensitivePropertyProvider(software.amazon.awssdk.services.secretsmanager.SecretsManagerClient client)
public String getIdentifierKey()
getIdentifierKey in interface SensitivePropertyProviderpublic boolean isSupported()
isSupported in interface SensitivePropertyProviderpublic String protect(String unprotectedValue, ProtectedPropertyContext context) throws SensitivePropertyProtectionException
protect in interface SensitivePropertyProviderSensitivePropertyProtectionExceptionpublic String unprotect(String protectedValue, ProtectedPropertyContext context) throws SensitivePropertyProtectionException
unprotect in interface SensitivePropertyProviderSensitivePropertyProtectionExceptionprivate Optional<com.fasterxml.jackson.databind.node.ObjectNode> getSecretKeyValues(ProtectedPropertyContext context)
context - The property contextpublic void cleanUp()
cleanUp in interface SensitivePropertyProviderCopyright © 2023 Apache NiFi Project. All rights reserved.