Interface SecretsRegistry
- All Known Implementing Classes:
SecretLeaseContainer
public interface SecretsRegistry
Registry to manage
RequestedSecrets (request, lease renewal,
rotation).- Since:
- 4.1
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidregister(RequestedSecret secret) Register aRequestedSecretwith the registry.voidregister(RequestedSecret secret, LeaseListener listener) Register aRequestedSecretwith the registry with an associatedLeaseListener.booleanunregister(RequestedSecret secret) Unregister theRequestedSecretfrom the registry.
-
Method Details
-
register
Register aRequestedSecretwith the registry.Subsequent registrations of the same
RequestedSecretare considered as a single registration and the secret will be managed only once.- Parameters:
secret- the requested secret to be managed.
-
register
Register aRequestedSecretwith the registry with an associatedLeaseListener.Subsequent registrations of the same
RequestedSecretare considered as a single registration and the secret will be managed only once. A requested secret that has been already been registered and activated by the container will not lead to emission of a newSecretLeaseCreatedEventwith the previous secrets body but rather only to future events such as rotations or renewals.- Parameters:
secret- the requested secret to be managed.listener- listener to associate with the requested secret. The listener will be notified only with events concerning the requested secret.
-
unregister
Unregister theRequestedSecretfrom the registry. Removing the secret stops lease renewals and secret rotations, and it removes listener registrations that wereassociated with the secret registration.- Parameters:
secret- the secret to be deregistered.- Returns:
- true if the secret was registered before and has been removed; false otherwise.
-