private AWSCredentialsProvider fromProfile(BasicProfile profile) { if (profile.isRoleBasedProfile()) { return new ProfileAssumeRoleCredentialsProvider(profileCredentialsService, allProfiles, profile); } else if (profile.isProcessBasedProfile()) { return new ProfileProcessCredentialsProvider(profile); } else { return new ProfileStaticCredentialsProvider(profile); } }
private BasicProfile loadProfile(File configFile) { final AllProfiles allProfiles = profileConfigLoader.loadProfiles(configFile); return allProfiles.getProfile(profileName); } }
private String getProfileName() { if (profileName == null) { synchronized (this) { if (profileName == null) { profileName = AwsProfileNameLoader.INSTANCE.loadProfileName(); } } } return profileName; }
public String getAwsSecretAccessKey() { return getPropertyValue(ProfileKeyConstants.AWS_SECRET_ACCESS_KEY); }
public boolean isRoleBasedProfile() { return getRoleArn() != null; }
public Map<String, BasicProfile> getAllBasicProfiles() { return allProfiles.getProfiles(); }
public ProfileAssumeRoleCredentialsProvider(ProfileCredentialsService profileCredentialsService, AllProfiles allProfiles, BasicProfile profile) { this.allProfiles = allProfiles; this.profile = profile; this.profileCredentialsService = profileCredentialsService; this.assumeRoleCredentialsProvider = fromAssumeRole(); }
private static AllProfiles loadProfiles(File file) { return BasicProfileConfigLoader.INSTANCE.loadProfiles(file); }
public boolean isProcessBasedProfile() { return getCredentialProcess() != null; } }
public String getRoleSessionName() { return getPropertyValue(ProfileKeyConstants.ROLE_SESSION_NAME); }
private BasicProfile loadProfile(File configFile) { final AllProfiles allProfiles = profileConfigLoader.loadProfiles(configFile); return allProfiles.getProfile(profileName); }
public AwsProfileEndpointDiscoveryProvider() { this(AwsProfileNameLoader.INSTANCE.loadProfileName()); }
public String getRoleExternalId() { return getPropertyValue(ProfileKeyConstants.EXTERNAL_ID); }
public String getRegion() { return getPropertyValue(ProfileKeyConstants.REGION); }
public String getAwsAccessIdKey() { return getPropertyValue(ProfileKeyConstants.AWS_ACCESS_KEY_ID); }
public String getCredentialProcess() { return getPropertyValue(ProfileKeyConstants.CREDENTIAL_PROCESS); }
public String getRoleSourceProfile() { return getPropertyValue(ProfileKeyConstants.SOURCE_PROFILE); }
public String getEndpointDiscovery() { return getPropertyValue(ProfileKeyConstants.ENDPOINT_DISCOVERY); }
public String getAwsSessionToken() { return getPropertyValue(ProfileKeyConstants.AWS_SESSION_TOKEN); }
public String getRoleArn() { return getPropertyValue(ProfileKeyConstants.ROLE_ARN); }