Interface ServiceAccountRegistry

All Known Implementing Classes:
ServiceAccountRegistryImpl

public interface ServiceAccountRegistry
A service account registry that allows service accounts to be registered with their corresponding roles.
Author:
Jamal Kaabi-Mofrad
  • Method Details

    • register

      void register(String serviceAccountName, String serviceAccountRole)
      Registers a service account with its corresponding role.
      Parameters:
      serviceAccountName - The name of the service account to be registered.
      serviceAccountRole - The role of the service account to be registered.
    • getServiceAccountRole

      Optional<String> getServiceAccountRole(String serviceAccountName)
      Retrieves the role of a specific service account.
      Parameters:
      serviceAccountName - The name of the service account.
      Returns:
      An Optional containing the role of the service account if it exists, otherwise an empty Optional.
    • getServiceAccountNames

      Set<String> getServiceAccountNames()
      Retrieves the names of all service accounts.
      Returns:
      A set of service account names. If no service accounts are present, an empty set is returned.