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 Details

    • register

      void register(RequestedSecret secret)
      Register a RequestedSecret with the registry.

      Subsequent registrations of the same RequestedSecret are considered as a single registration and the secret will be managed only once.

      Parameters:
      secret - the requested secret to be managed.
    • register

      void register(RequestedSecret secret, LeaseListener listener)
      Register a RequestedSecret with the registry with an associated LeaseListener.

      Subsequent registrations of the same RequestedSecret are 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 new SecretLeaseCreatedEvent with 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

      boolean unregister(RequestedSecret secret)
      Unregister the RequestedSecret from the registry. Removing the secret stops lease renewals and secret rotations, and it removes listener registrations that were associated 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.