List of usage examples for com.amazonaws.auth SystemPropertiesCredentialsProvider SystemPropertiesCredentialsProvider
SystemPropertiesCredentialsProvider
From source file:org.eluder.logback.ext.aws.core.AwsSupport.java
License:Open Source License
public AWSCredentialsProvider getCredentials(AWSCredentials credentials) { return new AWSCredentialsProviderChain(new EnvironmentVariableCredentialsProvider(), new SystemPropertiesCredentialsProvider(), new StaticCredentialsProvider(credentials == null ? new NullCredentials() : credentials), new ProfileCredentialsProvider(), new InstanceProfileCredentialsProvider()); }
From source file:org.jooby.internal.aws.CredentialsFactory.java
License:Apache License
private static LinkedList<AWSCredentialsProvider> chain() { LinkedList<AWSCredentialsProvider> chain = new LinkedList<>(); chain.add(new EnvironmentVariableCredentialsProvider()); chain.add(new SystemPropertiesCredentialsProvider()); chain.add(new ProfileCredentialsProvider()); chain.add(new EC2ContainerCredentialsProviderWrapper()); return chain; }
From source file:org.kuali.maven.wagon.auth.MavenAwsCredentialsProviderChain.java
License:Educational Community License
private static AWSCredentialsProvider[] getProviders(Optional<AuthenticationInfo> auth) { List<AWSCredentialsProvider> providers = new ArrayList<AWSCredentialsProvider>(); // System properties always win providers.add(new SystemPropertiesCredentialsProvider()); // Then fall through to environment variables providers.add(new EnvironmentVariableCredentialsProvider()); // Then fall through to settings.xml providers.add(new AuthenticationInfoCredentialsProvider(auth)); // Then fall through to Amazon's EC2 Instance Metadata Service // http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-roles.html // This allows you setup an IAM role, attach that role to an EC2 Instance at launch time, // and thus automatically provide the wagon with the credentials it needs providers.add(new InstanceProfileCredentialsProvider()); return providers.toArray(new AWSCredentialsProvider[providers.size()]); }
From source file:org.lambadaframework.wagon.AuthenticationInfoAWSCredentialsProviderChain.java
License:Apache License
AuthenticationInfoAWSCredentialsProviderChain(AuthenticationInfo authenticationInfo) { super(new InstanceProfileCredentialsProvider(), new ProfileCredentialsProvider(), new EnvironmentVariableCredentialsProvider(), new SystemPropertiesCredentialsProvider(), new InstanceProfileCredentialsProvider()); }
From source file:org.xmlsh.aws.gradle.AwsPluginExtension.java
License:BSD License
public AWSCredentialsProvider newCredentialsProvider(String profileName) { return new AWSCredentialsProviderChain(new EnvironmentVariableCredentialsProvider(), new SystemPropertiesCredentialsProvider(), Strings.isNullOrEmpty(profileName) == false ? new ProfileCredentialsProvider(profileName) : EMPTY, new ProfileCredentialsProvider(this.profileName), new InstanceProfileCredentialsProvider()); }