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>
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 ) {
0 commit comments