public interface KeyProvider
Modifier and Type | Method and Description |
---|---|
boolean |
addKey(String keyId,
SecretKey key)
Adds the key to the provider and associates it with the given ID.
|
List<String> |
getAvailableKeyIds()
Returns a list of available key identifiers (useful for encryption, as retired keys may not be listed here even if they are available for decryption for legacy/BC reasons).
|
SecretKey |
getKey(String keyId)
Returns the key identified by this ID or throws an exception if one is not available.
|
boolean |
keyExists(String keyId)
Returns true if the key exists and is available.
|
SecretKey getKey(String keyId) throws KeyManagementException
keyId
- the key identifierKeyManagementException
- if the key cannot be retrievedboolean keyExists(String keyId)
keyId
- the key identifierList<String> getAvailableKeyIds()
boolean addKey(String keyId, SecretKey key) throws OperationNotSupportedException, KeyManagementException
keyId
- the key identifierkey
- the keyOperationNotSupportedException
- if this implementation doesn't support adding keysKeyManagementException
- if the key is invalid, the ID conflicts, etc.Copyright © 2019 Apache NiFi Project. All rights reserved.