Class ContainerAuthenticator

  • All Implemented Interfaces:
    Authenticator

    public class ContainerAuthenticator
    extends IamRequestBasedAuthenticator
    implements Authenticator
    ContainerAuthenticator implements an IAM-based authentication scheme whereby it retrieves a "compute resource token" from the local compute resource (VM) and uses that to obtain an IAM access token by invoking the IAM "get token" operation with grant-type=cr-token. The resulting IAM access token is then added to outbound requests in an Authorization header of the form: Authorization: Bearer <access-token>
    • Method Detail

      • newBuilder

        public ContainerAuthenticator.Builder newBuilder()
        Returns a new Builder instance pre-loaded with the configuration from "this".
        Returns:
        the Builder instance
      • fromConfiguration

        public static ContainerAuthenticator fromConfiguration​(java.util.Map<java.lang.String,​java.lang.String> config)
        Constructs a ContainerAuthenticator instance using properties contained in the specified Map.
        Parameters:
        config - a map containing the configuration properties
        Returns:
        the ContainerAuthenticator instance
      • getCrTokenFilename

        public java.lang.String getCrTokenFilename()
        Returns:
        the crTokenFilename configured on this Authenticator.
      • getIamProfileName

        public java.lang.String getIamProfileName()
        Returns:
        the iamProfileName configured on this Authenticator.
      • getIamProfileId

        public java.lang.String getIamProfileId()
        Returns:
        the iamProfileId configured on this Authenticator.