Class ServiceAccountService

java.lang.Object
org.elasticsearch.xpack.security.authc.service.ServiceAccountService

public class ServiceAccountService extends Object
  • Constructor Details

  • Method Details

    • isServiceAccountPrincipal

      public static boolean isServiceAccountPrincipal(String principal)
    • getServiceAccountPrincipals

      public static Collection<String> getServiceAccountPrincipals()
    • getServiceAccounts

      public static Map<String,ServiceAccount> getServiceAccounts()
    • tryParseToken

      public static ServiceAccountToken tryParseToken(org.elasticsearch.common.settings.SecureString bearerString)
      Parses a token object from the content of a ServiceAccountToken.asBearerString() bearer string}. This bearer string would typically be extracted from an HTTP authorization header.

      This method does not validate the credential, it simply parses it. There is no guarantee that the secret is valid, or even that the account exists.

      Parameters:
      bearerString - A raw token string (if this is from an HTTP header, then the "Bearer " prefix must be removed before calling this method.
      Returns:
      An unvalidated token object.
    • authenticateToken

      public void authenticateToken(ServiceAccountToken serviceAccountToken, String nodeName, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authc.Authentication> listener)
    • createIndexToken

      public void createIndexToken(org.elasticsearch.xpack.core.security.authc.Authentication authentication, org.elasticsearch.xpack.core.security.action.service.CreateServiceAccountTokenRequest request, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.action.service.CreateServiceAccountTokenResponse> listener)
    • deleteIndexToken

      public void deleteIndexToken(org.elasticsearch.xpack.core.security.action.service.DeleteServiceAccountTokenRequest request, org.elasticsearch.action.ActionListener<Boolean> listener)
    • findTokensFor

      public void findTokensFor(org.elasticsearch.xpack.core.security.action.service.GetServiceAccountCredentialsRequest request, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.action.service.GetServiceAccountCredentialsResponse> listener)
    • getRoleDescriptor

      public void getRoleDescriptor(org.elasticsearch.xpack.core.security.authc.Authentication authentication, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.RoleDescriptor> listener)
    • getRoleDescriptorForPrincipal

      public void getRoleDescriptorForPrincipal(String principal, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authz.RoleDescriptor> listener)