File tree 3 files changed +21
-4
lines changed
java/edu/harvard/dbmi/avillach/dataupload/aws
3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,19 @@ AWS_SESSION_TOKEN=
4
4
AWS_DATA_UPLOAD_ROLE=arn:aws:iam::111111111111:role/PicSureDataUploadRole
5
5
AWS_SHARED_SECRET=
6
6
AWS_S3_BUCKET_NAME=
7
- AWS_REGION
7
+ AWS_REGION=us-east-1
8
8
AWS_KEY_ID
9
+ AUTH_METHOD=user
9
10
10
11
DATA_UPLOAD_DB_DATABASE=data-upload
11
12
DATA_UPLOAD_DB_HOST=uploader-db
12
13
DATA_UPLOAD_DB_PASS=mycoolpassword
13
- DATA_UPLOAD_DB_USER=datauploaduser
14
+ DATA_UPLOAD_DB_USER=datauploaduser
15
+ DATA_UPLOAD_DB_ROOT_PASS=mycoolpassword
16
+
17
+ FILE_SHARING_ROOT=/gic_query_results
18
+
19
+ INSTITUTIONS=bch-dev
20
+ HOME_INSTITUTION_NAME=bch-dev
21
+ HOME_INSTITUTION_DISPLAY=BCH
22
+ HOME_INSTITUTION_LONG_DISPLAY=Boston Children's Hospital
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ public StsClient stsClients(
66
66
}
67
67
68
68
@ Bean
69
- @ ConditionalOnProperty (name = "production " , havingValue = "true " )
69
+ @ ConditionalOnProperty (name = "aws.authentication.method " , havingValue = "user " )
70
70
AwsCredentials credentials () {
71
+ LOG .info ("Authentication method is user. Attempting to resolve user credentials." );
71
72
if (Strings .isBlank (key )) {
72
73
LOG .error ("No AWS key. Can't create client. Exiting" );
73
74
context .close ();
@@ -82,6 +83,12 @@ AwsCredentials credentials() {
82
83
return AwsSessionCredentials .create (key , secret , token );
83
84
}
84
85
}
86
+ @ Bean
87
+ @ ConditionalOnProperty (name = "aws.authentication.method" , havingValue = "instance-profile" )
88
+ AwsCredentials ipCredentials () {
89
+ LOG .info ("Authentication method is instance-profile. Attempting to resolve instance profile credentials." );
90
+ return InstanceProfileCredentialsProvider .create ().resolveCredentials ();
91
+ }
85
92
86
93
@ Bean
87
94
@ ConditionalOnProperty (name = "production" , havingValue = "true" )
Original file line number Diff line number Diff line change @@ -12,11 +12,12 @@ aws.s3.session_token=${AWS_SESSION_TOKEN:}
12
12
aws.s3.institution =${INSTITUTIONS}
13
13
aws.region =${AWS_REGION}
14
14
aws.kms.key_ids =${AWS_KEY_ID}
15
+ aws.authentication.method =${AUTH_METHOD:noauth}
15
16
16
17
production =true
17
18
enable_file_sharing =true
18
19
file_sharing_root =${FILE_SHARING_ROOT}
19
20
institution.name =${HOME_INSTITUTION_NAME}
20
21
institution.short-display =${HOME_INSTITUTION_DISPLAY}
21
22
institution.long-display =${HOME_INSTITUTION_LONG_DISPLAY}
22
- server.port =80
23
+ server.port =${PORT:80}
You can’t perform that action at this time.
0 commit comments