private String getEnvProfileName() { return StringUtils.trim(System.getenv(AWS_PROFILE_ENVIRONMENT_VARIABLE)); } }
private String getSysPropertyProfileName() { return StringUtils.trim(System.getProperty(AWS_PROFILE_SYSTEM_PROPERTY)); }
@Override public AWSCredentials getCredentials() { String accessKey = StringUtils.trim(System.getProperty(ACCESS_KEY_SYSTEM_PROPERTY)); String secretKey = StringUtils.trim(System.getProperty(SECRET_KEY_SYSTEM_PROPERTY)); String sessionToken = StringUtils.trim(System.getProperty(SESSION_TOKEN_SYSTEM_PROPERTY)); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new SdkClientException( "Unable to load AWS credentials from Java system " + "properties (" + ACCESS_KEY_SYSTEM_PROPERTY + " and " + SECRET_KEY_SYSTEM_PROPERTY + ")"); } if (StringUtils.isNullOrEmpty(sessionToken)) { return new BasicAWSCredentials(accessKey, secretKey); } else { return new BasicSessionCredentials(accessKey, secretKey, sessionToken); } }
@Override public AWSCredentials getCredentials() { String accessKey = System.getenv(ACCESS_KEY_ENV_VAR); if (accessKey == null) { accessKey = System.getenv(ALTERNATE_ACCESS_KEY_ENV_VAR); } String secretKey = System.getenv(SECRET_KEY_ENV_VAR); if (secretKey == null) { secretKey = System.getenv(ALTERNATE_SECRET_KEY_ENV_VAR); } accessKey = StringUtils.trim(accessKey); secretKey = StringUtils.trim(secretKey); String sessionToken = StringUtils.trim(System.getenv(AWS_SESSION_TOKEN_ENV_VAR)); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new SdkClientException( "Unable to load AWS credentials from environment variables " + "(" + ACCESS_KEY_ENV_VAR + " (or " + ALTERNATE_ACCESS_KEY_ENV_VAR + ") and " + SECRET_KEY_ENV_VAR + " (or " + ALTERNATE_SECRET_KEY_ENV_VAR + "))"); } return sessionToken == null ? new BasicAWSCredentials(accessKey, secretKey) : new BasicSessionCredentials(accessKey, secretKey, sessionToken); }
@Override public AWSCredentials getCredentials() { String accessKey = null; if (config.hasPath(GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY)) { accessKey = config.getString(GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY); } String secretKey = null; if (config.hasPath(GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)) { secretKey = PasswordManager.getInstance(ConfigUtils.configToState(config)) .readPassword(config.getString(GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)); } accessKey = StringUtils.trim(accessKey); secretKey = StringUtils.trim(secretKey); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new AmazonClientException(String.format("Unable to load AWS credentials from config (%s and %s)", GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY, GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)); } return new BasicAWSCredentials(accessKey, secretKey); }
private String getEnvProfileName() { return StringUtils.trim(System.getenv(AWS_PROFILE_ENVIRONMENT_VARIABLE)); } }
private String getSysPropertyProfileName() { return StringUtils.trim(System.getProperty(AWS_PROFILE_SYSTEM_PROPERTY)); }
@Override public AWSCredentials getCredentials() { String accessKey = StringUtils.trim(System.getProperty(ACCESS_KEY_SYSTEM_PROPERTY)); String secretKey = StringUtils.trim(System.getProperty(SECRET_KEY_SYSTEM_PROPERTY)); String sessionToken = StringUtils.trim(System.getProperty(SESSION_TOKEN_SYSTEM_PROPERTY)); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new SdkClientException( "Unable to load AWS credentials from Java system " + "properties (" + ACCESS_KEY_SYSTEM_PROPERTY + " and " + SECRET_KEY_SYSTEM_PROPERTY + ")"); } if (StringUtils.isNullOrEmpty(sessionToken)) { return new BasicAWSCredentials(accessKey, secretKey); } else { return new BasicSessionCredentials(accessKey, secretKey, sessionToken); } }
@Override public AWSCredentials getCredentials() { String accessKey = System.getenv(ACCESS_KEY_ENV_VAR); if (accessKey == null) { accessKey = System.getenv(ALTERNATE_ACCESS_KEY_ENV_VAR); } String secretKey = System.getenv(SECRET_KEY_ENV_VAR); if (secretKey == null) { secretKey = System.getenv(ALTERNATE_SECRET_KEY_ENV_VAR); } accessKey = StringUtils.trim(accessKey); secretKey = StringUtils.trim(secretKey); String sessionToken = StringUtils.trim(System.getenv(AWS_SESSION_TOKEN_ENV_VAR)); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new SdkClientException( "Unable to load AWS credentials from environment variables " + "(" + ACCESS_KEY_ENV_VAR + " (or " + ALTERNATE_ACCESS_KEY_ENV_VAR + ") and " + SECRET_KEY_ENV_VAR + " (or " + ALTERNATE_SECRET_KEY_ENV_VAR + "))"); } return sessionToken == null ? new BasicAWSCredentials(accessKey, secretKey) : new BasicSessionCredentials(accessKey, secretKey, sessionToken); }
private String getEnvProfileName() { return StringUtils.trim(System.getenv(AWS_PROFILE_ENVIRONMENT_VARIABLE)); } }
private String getSysPropertyProfileName() { return StringUtils.trim(System.getProperty(AWS_PROFILE_SYSTEM_PROPERTY)); }
@Override public AWSCredentials getCredentials() { String accessKey = StringUtils.trim(System.getProperty(ACCESS_KEY_SYSTEM_PROPERTY)); String secretKey = StringUtils.trim(System.getProperty(SECRET_KEY_SYSTEM_PROPERTY)); String sessionToken = StringUtils.trim(System.getProperty(SESSION_TOKEN_SYSTEM_PROPERTY)); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new SdkClientException( "Unable to load AWS credentials from Java system " + "properties (" + ACCESS_KEY_SYSTEM_PROPERTY + " and " + SECRET_KEY_SYSTEM_PROPERTY + ")"); } if (StringUtils.isNullOrEmpty(sessionToken)) { return new BasicAWSCredentials(accessKey, secretKey); } else { return new BasicSessionCredentials(accessKey, secretKey, sessionToken); } }
@Override public AWSCredentials getCredentials() { String accessKey = System.getenv(ACCESS_KEY_ENV_VAR); if (accessKey == null) { accessKey = System.getenv(ALTERNATE_ACCESS_KEY_ENV_VAR); } String secretKey = System.getenv(SECRET_KEY_ENV_VAR); if (secretKey == null) { secretKey = System.getenv(ALTERNATE_SECRET_KEY_ENV_VAR); } accessKey = StringUtils.trim(accessKey); secretKey = StringUtils.trim(secretKey); String sessionToken = StringUtils.trim(System.getenv(AWS_SESSION_TOKEN_ENV_VAR)); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new SdkClientException( "Unable to load AWS credentials from environment variables " + "(" + ACCESS_KEY_ENV_VAR + " (or " + ALTERNATE_ACCESS_KEY_ENV_VAR + ") and " + SECRET_KEY_ENV_VAR + " (or " + ALTERNATE_SECRET_KEY_ENV_VAR + "))"); } return sessionToken == null ? new BasicAWSCredentials(accessKey, secretKey) : new BasicSessionCredentials(accessKey, secretKey, sessionToken); }
@Override public AWSCredentials getCredentials() { String accessKey = null; if (config.hasPath(GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY)) { accessKey = config.getString(GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY); } String secretKey = null; if (config.hasPath(GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)) { secretKey = PasswordManager.getInstance(ConfigUtils.configToState(config)) .readPassword(config.getString(GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)); } accessKey = StringUtils.trim(accessKey); secretKey = StringUtils.trim(secretKey); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new AmazonClientException(String.format("Unable to load AWS credentials from config (%s and %s)", GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY, GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)); } return new BasicAWSCredentials(accessKey, secretKey); }
@Override public AWSCredentials getCredentials() { String accessKey = null; if (config.hasPath(GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY)) { accessKey = config.getString(GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY); } String secretKey = null; if (config.hasPath(GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)) { secretKey = PasswordManager.getInstance(ConfigUtils.configToState(config)) .readPassword(config.getString(GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)); } accessKey = StringUtils.trim(accessKey); secretKey = StringUtils.trim(secretKey); if (StringUtils.isNullOrEmpty(accessKey) || StringUtils.isNullOrEmpty(secretKey)) { throw new AmazonClientException(String.format("Unable to load AWS credentials from config (%s and %s)", GobblinAWSConfigurationKeys.SERVICE_ACCESS_KEY, GobblinAWSConfigurationKeys.SERVICE_SECRET_KEY)); } return new BasicAWSCredentials(accessKey, secretKey); }
Annotation annotation = null; String accountId = null; String checkId = StringUtils.trim(ruleParam.get(PacmanRuleConstants.CHECK_ID)); accountId = StringUtils.trim(resourceAttributes.get(PacmanRuleConstants.ACCOUNTID)); Map<String,String> serviceLimitMap = PacmanUtils.getSeviceLimit(checkId,accountId,serviceEsURL); if (!serviceLimitMap.isEmpty()) {
validTo = StringUtils.trim(resourceAttributes.get(PacmanRuleConstants.VALID_TO));