Skip to content

Commit a4ecf38

Browse files
committed
Rebase the branch onto main, updatae JavaDoc, and fix the pipeline error.
1 parent c1286fc commit a4ecf38

File tree

10 files changed

+44
-24
lines changed

10 files changed

+44
-24
lines changed

ojdbc-provider-aws/README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ JDK versions. The coordinates for the latest release are:
2626
<dependency>
2727
<groupId>com.oracle.database.jdbc</groupId>
2828
<artifactId>ojdbc-provider-aws</artifactId>
29-
<version>1.2.0</version>
29+
<version>1.0.2</version>
3030
</dependency>
3131
```
3232

@@ -47,11 +47,19 @@ The default credentials provider chain searches for credentials in one of the fo
4747
6. Amazon EC2 instance IAM role-provided credentials
4848

4949
## AWS S3 Config Provider
50-
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. Users only need to indicate the S3 URI of the object that contains the JSON payload, with the following syntax:
50+
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.
51+
Users only need to indicate the S3 URI of the object that contains the JSON payload.
5152

53+
A URL with either of the following formats is valid:
5254
<pre>
53-
jdbc:oracle:thin:@config-awass3://{s3-uri}
55+
jdbc:oracle:thin:@config-awss3://{S3-URI}
5456
</pre>
57+
or
58+
<pre>
59+
jdbc:oracle:thin:@config-aws{S3-URI}
60+
</pre>
61+
62+
The {S3-URI} can be obtained from the Amazon S3 console and follows this naming convention: s3://bucket-name/file-name.
5563

5664
### JSON Payload format
5765

ojdbc-provider-aws/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<name>Oracle JDBC AWS Providers</name>
66

77
<artifactId>ojdbc-provider-aws</artifactId>
8-
<version>1.0.1</version>
8+
<version>1.0.2</version>
99
<packaging>jar</packaging>
1010

1111
<parent>
1212
<groupId>com.oracle.database.jdbc</groupId>
1313
<artifactId>ojdbc-extensions</artifactId>
14-
<version>1.0.1</version>
14+
<version>1.0.2</version>
1515
</parent>
1616

1717
<dependencyManagement>
@@ -39,14 +39,6 @@
3939
<groupId>software.amazon.awssdk</groupId>
4040
<artifactId>s3</artifactId>
4141
</dependency>
42-
<dependency>
43-
<groupId>software.amazon.awssdk</groupId>
44-
<artifactId>appconfig</artifactId>
45-
</dependency>
46-
<dependency>
47-
<groupId>software.amazon.awssdk</groupId>
48-
<artifactId>appconfigdata</artifactId>
49-
</dependency>
5042
<dependency>
5143
<groupId>software.amazon.awssdk</groupId>
5244
<artifactId>auth</artifactId>

ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/authentication/AwsCredentialsFactory.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,15 @@
3838

3939
package oracle.jdbc.provider.aws.authentication;
4040

41+
import oracle.jdbc.provider.aws.AwsResourceFactory;
4142
import oracle.jdbc.provider.factory.Resource;
4243
import oracle.jdbc.provider.factory.ResourceFactory;
4344
import oracle.jdbc.provider.parameter.Parameter;
4445
import oracle.jdbc.provider.parameter.ParameterSet;
4546
import software.amazon.awssdk.auth.credentials.AwsCredentials;
4647
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
47-
import software.amazon.awssdk.services.appconfigdata.AppConfigDataClient;
4848

49-
import static java.lang.String.format;
5049
import static oracle.jdbc.provider.parameter.Parameter.CommonAttribute.REQUIRED;
51-
import static oracle.jdbc.provider.parameter.Parameter.CommonAttribute.SENSITIVE;
5250

5351
/**
5452
* <p>
@@ -115,7 +113,7 @@ private static AwsCredentials getCredential(ParameterSet parameterSet) {
115113
}
116114

117115
/**
118-
* Returns credentials resolved by {@link AppConfigDataClient}.
116+
* Returns credentials resolved by {@link AwsResourceFactory}.
119117
* @return
120118
*/
121119
private static AwsCredentials defaultCredentials() {

ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/configuration/AwsConfigurationParameters.java

-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@
4040

4141
import oracle.jdbc.provider.aws.authentication.AwsAuthenticationMethod;
4242
import oracle.jdbc.provider.aws.authentication.AwsCredentialsFactory;
43-
import oracle.jdbc.provider.parameter.Parameter;
4443
import oracle.jdbc.provider.parameter.ParameterSetParser;
4544

46-
import static oracle.jdbc.provider.parameter.Parameter.CommonAttribute.REQUIRED;
47-
4845
public final class AwsConfigurationParameters {
4946

5047
/**

ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/configuration/AwsS3ConfigurationProvider.java

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package oracle.jdbc.provider.aws.configuration;
22

33
import oracle.jdbc.driver.OracleConfigurationJsonProvider;
4+
import oracle.jdbc.util.OracleConfigurationCache;
45
import software.amazon.awssdk.services.s3.S3Client;
56
import software.amazon.awssdk.services.s3.model.GetObjectRequest;
67

@@ -54,6 +55,15 @@ public String getType() {
5455
return "awss3";
5556
}
5657

58+
/**
59+
* {@inheritDoc}
60+
* @return cache of this provider which is used to store configuration
61+
*/
62+
@Override
63+
public OracleConfigurationCache getCache() {
64+
return CACHE;
65+
}
66+
5767
private URI getURI(String s3Url) throws URISyntaxException {
5868
if (!s3Url.startsWith("s3://")) {
5969
s3Url = "s3://" + s3Url;

ojdbc-provider-aws/src/main/java/oracle/jdbc/provider/aws/configuration/AwsSecretsManagerConfigurationProvider.java

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import oracle.jdbc.provider.aws.secrets.SecretsManagerFactory;
55
import oracle.jdbc.provider.parameter.ParameterSet;
66
import oracle.jdbc.provider.parameter.ParameterSetParser;
7+
import oracle.jdbc.util.OracleConfigurationCache;
78

89
import java.io.ByteArrayInputStream;
910
import java.io.InputStream;
@@ -57,4 +58,13 @@ public InputStream getJson(String secretName) {
5758
public String getType() {
5859
return "awssecretsmanager";
5960
}
61+
62+
/**
63+
* {@inheritDoc}
64+
* @return cache of this provider which is used to store configuration
65+
*/
66+
@Override
67+
public OracleConfigurationCache getCache() {
68+
return CACHE;
69+
}
6070
}

ojdbc-provider-azure/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ JDK versions. The coordinates for the latest release are:
4444
<dependency>
4545
<groupId>com.oracle.database.jdbc</groupId>
4646
<artifactId>ojdbc-provider-azure</artifactId>
47-
<version>1.0.1</version>
47+
<version>1.0.2</version>
4848
</dependency>
4949
```
5050

ojdbc-provider-oci/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ JDK versions. The coordinates for the latest release are:
5656
<dependency>
5757
<groupId>com.oracle.database.jdbc</groupId>
5858
<artifactId>ojdbc-provider-oci</artifactId>
59-
<version>1.0.1</version>
59+
<version>1.0.2</version>
6060
</dependency>
6161
```
6262

ojdbc-provider-opentelemetry/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The coordinates for the latest release are:
4444
<dependency>
4545
<groupId>com.oracle.database.jdbc</groupId>
4646
<artifactId>ojdbc-provider-opentelemetry</artifactId>
47-
<version>1.0.1</version>
47+
<version>1.0.2</version>
4848
</dependency>
4949
```
5050

ojdbc-provider-samples/src/main/java/oracle/jdbc/provider/aws/configuration/AwsS3Example.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ public static void main(String[] args) throws SQLException {
6565

6666
// Sample default URL if non present
6767
if (args.length == 0) {
68-
url = "jdbc:oracle:thin:@config-awss3://{bucket-name}/{key-name}";
68+
// A URL with either of the following formats is valid:
69+
// "jdbc:oracle:thin:@config-awss3://{S3-URI}" or
70+
// "jdbc:oracle:thin:@config-aws{S3-URI}".
71+
// The {S3-URI} can be obtained from the Amazon S3 console and follows
72+
// this naming convention: S3://bucket-name/file-name.
73+
url = "jdbc:oracle:thin:@config-awss3://mybucket/myconfigfile.json";
6974
} else {
7075
url = args[0];
7176
}

0 commit comments

Comments
 (0)