Skip to content
Snippets Groups Projects
Commit d21ba867 authored by Rucha Deshpande's avatar Rucha Deshpande
Browse files

Read ES credentials from secrets manager

commit 35108e0f 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jun 03 2021 14:07:07 GMT-0500 (Central Daylight Time) 

    read ES credentials from Secrets Manager


commit 25aef5c1 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jun 03 2021 14:05:16 GMT-0500 (Central Daylight Time) 

    Merge branch 'dev' into deshruch


commit 56241cd5 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Tue May 18 2021 01:07:24 GMT-0500 (Central Daylight Time) 

    Merge branch 'dev' into deshruch

# Conflicts:
#	testing/indexer-test-aws/build-aws/run-tests.sh


commit b775a2b8 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jun 03 2021 14:04:53 GMT-0500 (Central Daylight Time) 

    Merge branch 'dev' of codecommit://os-indexer into dev


commit 836437c9 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jan 07 2021 16:53:41 GMT-0600 (Central Standard Time) 

    Revert renaming of IndexRecord feature


commit 5ff41fe6 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Tue May 18 2021 01:04:42 GMT-0500 (Central Daylight Time) 

    revert os-core-lib and aws version


commit e05b3564 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Tue May 18 2021 02:29:58 GMT-0500 (Central Daylight Time) 

    Merge branch 'dev' of codecommit://os-indexer into dev


commit 79f05e88 
Author: Matt Wise <wsmatth@amazon.com> 
Date: Thu Jan 07 2021 13:49:57 GMT-0600 (Central Standard Time) 

    add verbose output for report files and cp


commit 6af6d5bb 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Mon May 17 2021 14:01:12 GMT-0500 (Central Daylight Time) 

    update NOTICE


commit 43a5dae1 
Author: Matt Wise <wsmatth@amazon.com> 
Date: Thu Jan 07 2021 13:30:10 GMT-0600 (Central Standard Time) 

    update surefire report cp command


commit 39673290 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jan 07 2021 11:36:01 GMT-0600 (Central Standard Time) 

    Copy surefire reports


commit 6c40645b 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jan 07 2021 10:48:54 GMT-0600 (Central Standard Time) 

    fix surefire report path


commit 9ca701ed 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jan 07 2021 10:19:23 GMT-0600 (Central Standard Time) 

    fix report path


commit a4367271 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jan 07 2021 09:45:19 GMT-0600 (Central Standard Time) 

    copy cucumber-reports


commit e0f8ed01 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Thu Jan 07 2021 08:46:07 GMT-0600 (Central Standard Time) 

    Copy surefire reports


commit 37e1f3a9 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Wed Jan 06 2021 13:10:47 GMT-0600 (Central Standard Time) 

    rename the index record feature for testing


commit 45271f23 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Wed Jan 06 2021 11:30:16 GMT-0600 (Central Standard Time) 

    Use SchemaServiceRecordSteps to run the latest integration tests


commit f3037cde 
Author: Rucha Deshpande <deshruch@amazon.com> 
Date: Tue Jan 05 2021 15:41:17 GMT-0600 (Central Standard Time) 

    Updates to integrate schema service
parent ba39608f
No related branches found
No related tags found
3 merge requests!183Locking down maven central,!172AWS Updates,!171AWS Updates
......@@ -14,6 +14,7 @@
package org.opengroup.osdu.indexer.aws.persistence;
import org.opengroup.osdu.core.aws.secrets.SecretsManager;
import org.opengroup.osdu.core.aws.ssm.ParameterStorePropertySource;
import org.opengroup.osdu.core.aws.ssm.SSMConfig;
import org.opengroup.osdu.core.common.model.search.ClusterSettings;
......@@ -51,11 +52,11 @@ public class ElasticRepositoryImpl implements IElasticRepository {
@Value("${aws.elasticsearch.host}")
String hostParameter;
@Value("${aws.elasticsearch.username}")
String usernameParameter;
@Value("${ aws.elasticsearch.credentials.secret}")
String elasticCredentialsSecret;
@Value("${aws.elasticsearch.password}")
String passwordParameter;
@Value("${aws.region}")
private String amazonRegion;
@Value("${aws.ssm}")
String ssmEnabledString;
......@@ -69,10 +70,11 @@ public class ElasticRepositoryImpl implements IElasticRepository {
ssm = ssmConfig.amazonSSM();
host = ssm.getProperty(hostParameter).toString();
port = Integer.parseInt(ssm.getProperty(portParameter).toString());
username = ssm.getProperty(usernameParameter).toString();
password = ssm.getProperty(passwordParameter).toString();
}
SecretsManager sm = new SecretsManager();
username = sm.getSecret(elasticCredentialsSecret,amazonRegion,"username");
password = sm.getSecret(elasticCredentialsSecret,amazonRegion,"password");
//elastic expects username:password format
usernameAndPassword = String.format("%s:%s", username, password);
}
......
......@@ -55,8 +55,7 @@ aws.ssm.prefix=/osdu/${ENVIRONMENT}
aws.elasticsearch.host=${aws.ssm.prefix}/elasticsearch/end-point
aws.elasticsearch.port=${aws.ssm.prefix}/elasticsearch/end-point-port
aws.elasticsearch.username=${aws.ssm.prefix}/elasticsearch/username
aws.elasticsearch.password=${aws.ssm.prefix}/elasticsearch/password
aws.elasticsearch.credentials.secret=${aws.ssm.prefix}/elasticsearch/credentials
aws.indexer.sns.topic.arn=${aws.ssm.prefix}/indexer/indexer-sns-topic-arn
aws.storage.sns.topic.arn=${aws.ssm.prefix}/storage/storage-sns-topic-arn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment