Class EcrExtendedAuth


  • public class EcrExtendedAuth
    extends Object
    Exchange local stored credentials for temporary ecr credentials
    Since:
    2016-12-9
    Author:
    chas
    • Constructor Detail

      • EcrExtendedAuth

        public EcrExtendedAuth​(Logger logger,
                               String registry)
        Initialize an extended authentication for ecr registry.
        Parameters:
        registry - The registry, we may or may not be an ecr registry.
    • Method Detail

      • isAwsRegistry

        public static boolean isAwsRegistry​(String registry)
        Is given the registry an ecr registry?
        Parameters:
        registry - the registry name
        Returns:
        true, if the registry matches the ecr pattern
      • isAwsRegistry

        public boolean isAwsRegistry()
        Is the registry an ecr registry?
        Returns:
        true, if the registry matches the ecr pattern
      • extendedAuth

        public AuthConfig extendedAuth​(AuthConfig localCredentials)
                                throws IOException,
                                       org.apache.maven.plugin.MojoExecutionException
        Perform extended authentication. Use the provided credentials as IAM credentials and get a temporary ECR token.
        Parameters:
        localCredentials - IAM id/secret
        Returns:
        ECR base64 encoded username:password
        Throws:
        IOException
        org.apache.maven.plugin.MojoExecutionException