Skip to content

Commit 9c395d7

Browse files
committed
Prepare for release
1 parent d5578a8 commit 9c395d7

File tree

5 files changed

+45
-14
lines changed

5 files changed

+45
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
5-
65
## [Unreleased]
76

7+
## [5.2.27] - 2021-05-13
8+
89
### Added
910
- Cloud only:
1011
- Added new SignatureProvider constructors to allow use of an instance principal with delegation token in a file for authorization and authentication.

driver/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>com.oracle.nosql.sdk</groupId>
3131
<artifactId>nosqldriver</artifactId>
32-
<version>5.2.27-SNAPSHOT</version>
32+
<version>5.2.27</version>
3333
<packaging>jar</packaging>
3434

3535
<organization>

driver/src/main/java/oracle/nosql/driver/iam/SignatureProvider.java

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
* All of this information is required to authenticate and authorize access to
6060
* the service.
6161
* <p>
62-
* There are two mechanisms for providing authorization information:
62+
* There are three mechanisms for providing authorization information:
6363
* <ol>
6464
* <li>Using a user's identity and optional profile. This authenticates and
6565
* authorizes the application based on a specific user identity.</li>
@@ -68,13 +68,25 @@
6868
* {@link #createWithInstancePrincipal} and
6969
* <a href="https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm">Calling Services from Instances</a>.
7070
* </li>
71+
* <li>Using a Resource Principal, which is usually done when running
72+
* in an OCI Function. See {@link #createWithResourcePrincipal} and
73+
* <a href="https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionsaccessingociresources.htm">Accessing Other Oracle Cloud Infrastructure Resources from Running Functions</a>
74+
* </li>
7175
* </ol>
7276
* <p>
73-
* The latter can be simpler to use when running on an OCI compute instance,
74-
* but limits the ability to use a compartment name vs OCID when naming
75-
* compartments and tables in {@link Request} classes and when naming tables
76-
* in queries. A specific user identity is best for naming flexibility,
77-
* allowing both compartment names and OCIDs.
77+
* When using the first one, a User Principal, a default compartment is
78+
* used and that is the root compartment of the user's tenancy. If a specific
79+
* compartment is used (recommended) it can be specified as a default
80+
* or per-request. In addition when using a User Principal compartments can
81+
* be named by compartment name vs OCID when naming compartments and tables
82+
* in {@link Request} classes and when naming tables in queries.
83+
* <p>
84+
* When using an Instance Principal or Resource Principal a compartment
85+
* must be specified as there is no default for these principal types. In
86+
* addition these principal types limit the ability to use a compartment
87+
* name vs OCID when naming compartments and tables in {@link Request}
88+
* classes and when naming tables
89+
* in queries.
7890
* <p>
7991
* When using a specific user's identity there are several options to provide
8092
* the required information:
@@ -143,6 +155,9 @@ public class SignatureProvider
143155
* profile. The configuration file used is <code>~/.oci/config</code>. See
144156
* <a href="https://docs.cloud.oracle.com/iaas/Content/API/Concepts/sdkconfig.htm">SDK Configuration File</a>
145157
* for details of the file's contents and format.
158+
* <p>
159+
* When using this constructor the user has a default compartment for
160+
* all tables. It is the root compartment of the user's tenancy.
146161
*
147162
* @throws IOException if error loading profile from OCI configuration file
148163
*/
@@ -154,7 +169,10 @@ public SignatureProvider() throws IOException {
154169
* Creates a SignatureProvider using the specified profile. The
155170
* configuration file used is <code>~/.oci/config</code>. See
156171
* <a href="https://docs.cloud.oracle.com/iaas/Content/API/Concepts/sdkconfig.htm">SDK Configuration File</a>
157-
* for details of the file's contents and format
172+
* for details of the file's contents and format.
173+
* <p>
174+
* When using this constructor the user has a default compartment for
175+
* all tables. It is the root compartment of the user's tenancy.
158176
*
159177
* @param profileName user profile name
160178
*
@@ -168,7 +186,10 @@ public SignatureProvider(String profileName) throws IOException {
168186
* Creates a SignatureProvider using the specified config file and
169187
* profile. See
170188
* <a href="https://docs.cloud.oracle.com/iaas/Content/API/Concepts/sdkconfig.htm">SDK Configuration File</a>
171-
* for details of the file's contents and format
189+
* for details of the file's contents and format.
190+
* <p>
191+
* When using this constructor the user has a default compartment for
192+
* all tables. It is the root compartment of the user's tenancy.
172193
*
173194
* @param configFile path of configuration file
174195
*
@@ -187,6 +208,9 @@ public SignatureProvider(String configFile, String profileName)
187208
* information. See
188209
* <a href="https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm">Required Keys and OCIDs</a>
189210
* for details of the required parameters.
211+
* <p>
212+
* When using this constructor the user has a default compartment for
213+
* all tables. It is the root compartment of the user's tenancy.
190214
*
191215
* @param tenantId tenant id
192216
*
@@ -218,6 +242,9 @@ public SignatureProvider(String tenantId,
218242
* information. See
219243
* <a href="https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm">Required Keys and OCIDs</a>
220244
* for details of the required parameters.
245+
* <p>
246+
* When using this constructor the user has a default compartment for
247+
* all tables. It is the root compartment of the user's tenancy.
221248
*
222249
* @param tenantId tenant id
223250
*
@@ -249,6 +276,9 @@ public SignatureProvider(String tenantId,
249276
* information. See
250277
* <a href="https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm">Required Keys and OCIDs</a>
251278
* for details of the required parameters.
279+
* <p>
280+
* When using this constructor the user has a default compartment for
281+
* all tables. It is the root compartment of the user's tenancy.
252282
*
253283
* @param tenantId tenant id
254284
*
@@ -724,7 +754,7 @@ public Region getRegion() {
724754
* Prepare SignatureProvider with given NoSQLHandleConfig. It configures
725755
* service URL, creates and caches the signature as warm-up. This
726756
* method should be called when the NoSQLHandle is created.
727-
* @param config
757+
* @param config the configuration
728758
* @return this
729759
*/
730760
public SignatureProvider prepare(NoSQLHandleConfig config) {

examples/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>com.oracle.nosql.sdk</groupId>
6-
<version>5.2.27-SNAPSHOT</version>
6+
<version>5.2.27</version>
77
<artifactId>nosql-java-sdk-examples</artifactId>
88
<name>Oracle NoSQL Database Java Examples</name>
99
<description>Java examples for Oracle NoSQL Database</description>
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>com.oracle.nosql.sdk</groupId>
2727
<artifactId>nosqldriver</artifactId>
28-
<version>5.2.27-SNAPSHOT</version>
28+
<version>5.2.27</version>
2929
</dependency>
3030
</dependencies>
3131

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.oracle.nosql.sdk</groupId>
88
<artifactId>nosql-java-sdk</artifactId>
9-
<version>5.2.27-SNAPSHOT</version>
9+
<version>5.2.27</version>
1010
<packaging>pom</packaging>
1111
<name>Oracle NoSQL SDK</name>
1212
<description>

0 commit comments

Comments
 (0)