Skip to content

Commit bc6e399

Browse files
committed
Updated README.md to include the authentication parameters and AWS_REGION
1 parent bde5847 commit bc6e399

File tree

1 file changed

+57
-25
lines changed

1 file changed

+57
-25
lines changed

ojdbc-provider-aws/README.md

+57-25
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ Amazon Web Services (AWS).
66
## Centralized Config Providers
77

88
<dl>
9-
<dt><a href="#aws-config-config-provider">AWS S3 Configuration
9+
<dt><a href="#aws-s3-configuration-provider">AWS S3 Configuration
1010
Provider</a></dt>
1111
<dd>Provides connection properties managed by the S3 service</dd>
1212
<dt><a href="#aws-secrets-manager-config-provider">AWS Secrets Manager Configuration
1313
Provider</a></dt>
1414
<dd>Provides connection properties managed by the Secrets Manager service</dd>
15+
<dt><a href="#common-parameters-for-centralized-config-providers">Common Parameters for Centralized Config Providers</a></dt>
16+
<dd>Common parameters supported by the config providers</dd>
17+
<dt><a href="#caching-configuration">Caching configuration</a></dt>
18+
<dd>Caching mechanism adopted by Centralized Config Providers</dd>
1519
</dl>
1620

1721
Visit any of the links above to find information and usage examples for a
@@ -30,23 +34,7 @@ JDK versions. The coordinates for the latest release are:
3034
</dependency>
3135
```
3236

33-
## Authentication
34-
35-
Providers use AWS SDK which supports
36-
[Default credentials provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html),
37-
which looks for credentials in a set of defined locations and use those
38-
credentials to authenticate requests to AWS.
39-
40-
The default credentials provider chain searches for credentials in one of the following locations using a predefined sequence:
41-
42-
1. Java system properties
43-
2. Environment variables
44-
3. Web identity token from AWS Security Token Service
45-
4. The shared credentials and config files
46-
5. Amazon ECS container credentials
47-
6. Amazon EC2 instance IAM role-provided credentials
48-
49-
## AWS S3 Config Provider
37+
## AWS S3 Configuration Provider
5038
The Oracle DataSource uses a new prefix `jdbc:oracle:thin:@config-awss3:` to be able to identify that the configuration parameters should be loaded using AWS S3.
5139
Users only need to indicate the S3 URI of the object that contains the JSON payload.
5240

@@ -85,8 +73,7 @@ And the JSON Payload for the file **payload_ojdbc_objectstorage.json** in **mybu
8573
"user": "scott",
8674
"password": {
8775
"type": "awssecretsmanager",
88-
"value": "test-secret",
89-
"key_name": "db-password"
76+
"value": "test-secret"
9077
},
9178
"jdbc": {
9279
"oracle.jdbc.ReadTimeout": 1000,
@@ -128,11 +115,6 @@ For the JSON type of provider (AWS S3, AWS Secrets Manager, HTTP/HTTPS, File) th
128115
- Base64 Encoded password (if base64)
129116
- GCP resource name (if gcpsecretmanager)
130117
- AWS Secret name (if awssecretsmanager)
131-
- Text
132-
- key_name
133-
- Optional
134-
- Possible values
135-
- Name of the key, if stored as key-value pairs in AWS Secrets Manager
136118
- authentication
137119
- Optional
138120
- Possible Values
@@ -148,6 +130,56 @@ jdbc:oracle:thin:@config-awssecretsmanager://{secret-name}
148130

149131
The JSON Payload retrieved by AWS Secrets Manager Provider follows the same format in [AWS S3 Configuration Provider](#json-payload-format).
150132

133+
## Common Parameters for Centralized Config Providers
134+
AWS S3 Configuration Provider and AWS Secrets Manager Configuration Provider
135+
share the same sets of parameters for authentication configuration.
136+
137+
### Configuring Authentication
138+
139+
The Centralized Config Providers in this module use the
140+
[Default credentials provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html) to provide authorization and authentication to S3 and Secrets Manager services.
141+
The user can provide an optional parameter `AUTHENTICATION` (case-ignored) which is mapped with the following Credential Class.
142+
143+
<table>
144+
<thead><tr>
145+
<th>'AUTHENTICATION' Param Value</th>
146+
<th>Method</th>
147+
<th>Optional Configuration</th>
148+
<th>Optional Parameters</th>
149+
</tr></thead>
150+
<tbody>
151+
<tr>
152+
<td><b>AWS_DEFAULT</b> or &lt;Empty&gt;</td>
153+
<td>Default Credentials Provider Chain</td>
154+
<td>see below Default Credentials Provider Chain</td>
155+
<td>AWS_REGION (see AWS Region below)</td>
156+
</tr>
157+
</tbody>
158+
</table>
159+
160+
### Default Credentials Provider Chain
161+
162+
The default credentials provider chain provided by AWS SDK is implemented by the
163+
[DefaultCredentialsProvider](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/auth/credentials/DefaultCredentialsProvider.html) class,
164+
which searches for credentials in one of the following locations using a predefined sequence:
165+
166+
1. Java system properties
167+
2. Environment variables
168+
3. Web identity token from AWS Security Token Service
169+
4. The shared credentials and config files
170+
5. Amazon ECS container credentials
171+
6. Amazon EC2 instance IAM role-provided credentials
172+
173+
For more details, please refer to [Default credentials provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-chain.html).
174+
175+
### AWS Region
176+
177+
In this project, region can be specified from two places:
178+
1. `AWS_REGION` as an optional parameter in URL
179+
2. [Default region provider chain](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/region-selection.html#automatically-determine-the-aws-region-from-the-environment).
180+
181+
If `AWS_REGION` is specified in the URL, the provider uses it as the value of Region for authentication. Otherwise, the value from default region provider chain will be applied.
182+
151183
## Caching configuration
152184

153185
Config providers in this module store the configuration in caches to minimize

0 commit comments

Comments
 (0)