-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding AWS S3 Configuration Provider and AWS Secrets Manager Provider #135
base: main
Are you sure you want to change the base?
Conversation
ojdbc-provider-samples/src/main/java/oracle/jdbc/provider/aws/configuration/AwsS3Example.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for some minor comments I just left. Please let me know when addressed.
Changes to be committed: modified: ojdbc-provider-aws/pom.xml new file: ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/authentication/AwsAuthenticationMethod.java new file: ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/authentication/AwsBasicCredentialsFactory.java new file: ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/configuration/AWSAppConfigProvider.java new file: ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/configuration/AWSAppConfigurationURLParser.java new file: ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/configuration/AWSConfigurationParameters.java modified: ojdbc-provider-aws/src/main/resources/META-INF/services/oracle.jdbc.spi.OracleConfigurationProvider new file: ojdbc-provider-samples/src/main/java/oracle/jdbc/provider/aws/configuration/SimpleAWSAppConfigExample.java
b5a9f95
to
c1286fc
Compare
@psilberk all the review comments has been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good, thanks!
AwsCredentials awsCredentials = getCredential(parameterSet); | ||
// TODO: Access tokens expire. Does a TokenCredential internally cache one? | ||
// If so, then return an expiring resource. | ||
return Resource.createPermanentResource(awsCredentials, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this TODO resolved ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix this in the next commit
.addParameter("value", SecretsManagerFactory.SECRET_NAME) | ||
.addParameter("REGION", SecretsManagerFactory.REGION) | ||
.addParameter("key_name", SecretsManagerFactory.KEY_NAME)) | ||
.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are some parameters in capitals but not all ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parser is used by both AwsJsonSecretsManagerProvider
and AwsSecretsManagerConfigurationProvider
. The REGION is in upper case to follow the naming convention in AUTHENTICATION and the related parameters. The same logic applies to the other parameter in lower cases.
Here's an example of the password object in Json payload:
"password": {
"type": "awssecretsmanager",
"value": "db-password-us-east-1",
"authentication": {
"AWS_REGION": "us-east-1"
}
},
The REGION parameter will be renamed to AWS_REGION in the next upload.
Combining the work by @psilberk into this branch.
This branch adds the following Configuration Providers for AWS Services: