You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd>Provides connection properties managed by the AWS AppConfig Freeform Configuration service</dd>
17
19
<dt><ahref="#common-parameters-for-centralized-config-providers">Common Parameters for Centralized Config Providers</a></dt>
@@ -49,7 +51,7 @@ JDK versions. The coordinates for the latest release are:
49
51
<dependency>
50
52
<groupId>com.oracle.database.jdbc</groupId>
51
53
<artifactId>ojdbc-provider-aws</artifactId>
52
-
<version>1.0.5</version>
54
+
<version>1.0.6</version>
53
55
</dependency>
54
56
```
55
57
@@ -70,11 +72,12 @@ The {S3-URI} can be obtained from the Amazon S3 console and follows this naming
70
72
71
73
### JSON Payload format
72
74
73
-
There are 3 fixed values that are looked at the root level.
75
+
There are 4 fixed values that are looked at the root level.
74
76
75
77
- connect_descriptor (required)
76
78
- user (optional)
77
79
- password (optional)
80
+
- wallet_location (optional)
78
81
79
82
The rest are dependent on the driver, in our case `/jdbc`. The key-value pairs that are with sub-prefix `/jdbc` will be applied to a DataSource. The key values are constant keys which are equivalent to the properties defined in the [OracleConnection](https://docs.oracle.com/en/database/oracle/oracle-database/23/jajdb/oracle/jdbc/OracleConnection.html) interface.
80
83
@@ -95,6 +98,11 @@ And the JSON Payload for the file **payload_ojdbc_objectstorage.json** in **mybu
95
98
"value": "test-secret",
96
99
"field_name": "<field-name>"// Optional: Only needed when the secret is structured and contains multiple key-value pairs.
97
100
},
101
+
"wallet_location": {
102
+
"type": "awssecretsmanager",
103
+
"value": "wallet-secret",
104
+
"field_name": "<field-name>"// Optional: Only needed when the secret is structured and contains multiple key-value pairs.
105
+
},
98
106
"jdbc": {
99
107
"oracle.jdbc.ReadTimeout": 1000,
100
108
"defaultRowPrefetch": 20,
@@ -117,34 +125,69 @@ The sample code below executes as expected with the previous configuration.
117
125
118
126
### Password JSON Object
119
127
120
-
For the JSON type of provider (AWS S3, AWS Secrets Manager, HTTP/HTTPS, File) the password is an object itself with the following spec:
128
+
For the JSON type of provider (AWS S3, AWS Secrets Manager, AWS Parameter Store, HTTP/HTTPS, File) the password is an object itself with the following spec:
121
129
122
-
- type
130
+
-`type`
123
131
- Mandatory
124
132
- Possible values
125
-
- ocivault
126
-
- azurevault
127
-
- base64
128
-
- awssecretsmanager
129
-
- value
133
+
-`ocivault` (OCI Vault)
134
+
-`azurevault` (Azure Key Vault)
135
+
-`base64` (Base64)
136
+
-`awssecretsmanager` (AWS Secrets Manager)
137
+
-`awsparameterstore` (AWS Parameter Store)
138
+
-`hcpvaultdedicated` (HCP Vault Dedicated)
139
+
-`hcpvaultsecret` (HCP Vault Secrets)
140
+
-`gcpsecretmanager` (GCP Secret Manager)
141
+
-`value`
130
142
- Mandatory
131
143
- Possible values
132
144
- OCID of the secret (if ocivault)
133
145
- Azure Key Vault URI (if azurevault)
134
146
- Base64 Encoded password (if base64)
135
147
- AWS Secret name (if awssecretsmanager)
136
-
- field_name
148
+
- AWS Parameter name (if awsparameterstore)
149
+
- Secret path (if hcpvaultdedicated)
150
+
- Secret name (if hcpvaultsecret)
151
+
- Secret name (if gcpsecretmanager)
152
+
-`field_name`
137
153
- Optional
138
154
- Description: Specifies the key within the secret JSON object from which to extract the password value.
139
155
If the secret JSON contains multiple key-value pairs, field_name must be provided to unambiguously select the desired secret value.
140
156
If the secret contains only a single key-value pair and field_name is not provided, that sole value will be used.
141
157
If the secret is provided as plain text (i.e., not structured as a JSON object), no field_name is required.
142
-
- authentication
158
+
-`authentication`
143
159
- Optional
144
160
- Possible Values
145
161
- method
146
162
- optional parameters (depends on the cloud provider).
147
163
164
+
### Wallet_location JSON Object
165
+
166
+
The `oracle.net.wallet_location` connection property is not allowed in the `jdbc` object due to security reasons. Instead, users should use the `wallet_location` object to specify the wallet in the configuration.
167
+
168
+
For the JSON type of provider (AWS S3, HTTPS, File) the wallet_location is an object itself with the same spec as the [password JSON object](#password-json-object) mentioned above.
169
+
170
+
The value stored in the secret should be the Base64 representation of of a supported wallet file. This is equivalent to setting the `oracle.net.wallet_location` connection property in a regular JDBC application using the following format:
171
+
172
+
```
173
+
data:;base64,<Base64 representation of the wallet file>
174
+
```
175
+
176
+
#### Supported formats
177
+
-`cwallet.sso` (SSO wallet)
178
+
-`ewallet.pem` (PEM wallet)
179
+
180
+
If the PEM wallet is encrypted, you must also set the wallet password using the `oracle.net.wallet_password` property.
181
+
This property should be included inside the jdbc object of the JSON payload:
182
+
183
+
```
184
+
"jdbc": {
185
+
"oracle.net.wallet_password": "<your-password>"
186
+
}
187
+
```
188
+
189
+
<i>*Note: When storing a wallet in AWS Secrets Manager, store the raw Base64-encoded wallet bytes directly. The provider will automatically detect and handle the encoding correctly.</i>
190
+
148
191
## AWS Secrets Manager Config Provider
149
192
Apart from AWS S3, users can also store JSON Payload in the content of AWS Secrets Manager secret. Users need to indicate the secret name:
The JSON payload stored in the parameter should follow the same format as described in [AWS S3 Configuration Provider](#json-payload-format).
209
+
157
210
## AWS AppConfig Freeform Config Provider
158
211
The Oracle DataSource uses the prefix `jdbc:oracle:thin:@config-awsappconfig` to identify that the freeform
159
212
configuration parameters should be loaded using AWS AppConfig. Users need to specify the application identifier or name, along with the environment and configuration profile
Copy file name to clipboardExpand all lines: ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/configuration/AwsJsonSecretsManagerProvider.java
0 commit comments