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
Copy file name to clipboardExpand all lines: doc/src/user_guide/connection_handling.rst
+104-1Lines changed: 104 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4621,7 +4621,7 @@ the following table.
4621
4621
4622
4622
With Simple Authentication, the individual configuration parameters can be provided at runtime.
4623
4623
4624
-
With Instance Principal Authentication, OCI compute instances can be authorized to access services on Oracle Cloud such as Oracle Autonomous Database. Python-oracledb applications running on such a compute instance are automatically authenticated, eliminating the need to provide database user credentials. This authentication method will only work on compute instances where internal network endpoints are reachable. For more information on OCI compute instances, see `OCI Compute Instances <https://docs.oracle.com/en-us/iaas/compute-cloud-at-customer/topics/compute/compute-instances.htm>`__, `Creating a Compute Instance <https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/launchinginstance.htm>`__, and `Calling Services from a Compute Instance <https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm>`__.
4624
+
With Instance Principal Authentication, OCI compute instances can be authorized to access services on Oracle Cloud such as Oracle Autonomous Database. Python-oracledb applications running on such a compute instance are automatically authenticated, eliminating the need to provide database user credentials. This authentication method will only work on compute instances where internal network endpoints are reachable. See :ref:`instanceprincipalauth`.
4625
4625
4626
4626
See `OCI SDK Authentication Methods <https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm>`__ for more information.
4627
4627
- Required
@@ -4790,6 +4790,109 @@ to explicitly set the ``extra_auth_params`` and ``externalauth`` parameters of
4790
4790
dsn=mydb_low,
4791
4791
extra_auth_params=token_based_auth)
4792
4792
4793
+
.. _instanceprincipalauth:
4794
+
4795
+
Instance Principal Authentication
4796
+
=================================
4797
+
4798
+
With Instance Principal Authentication, Oracle Cloud Infrastructure (OCI)
4799
+
compute instances can be authorized to access services on Oracle Cloud such as
4800
+
Oracle Autonomous Database. Python-oracledb applications running on such a
4801
+
compute instance do not need to provide database user credentials.
4802
+
4803
+
Each compute instance behaves as a distinct type of Identity and Access
4804
+
Management (IAM) Principal, that is, each compute instance has a unique
4805
+
identity in the form of a digital certificate which is managed by OCI. When
4806
+
using Instance Principal Authentication, a compute instance authenticates with
4807
+
OCI IAM using this identity and obtains a short-lived token. This token is
4808
+
then used to access Oracle Cloud services without storing or managing any
4809
+
secrets in your application.
4810
+
4811
+
The example below demonstrates how to connect to Oracle Autonomous
4812
+
Database using Instance Principal authentication. To enable this, use
4813
+
python-oracledb's :ref:`oci_tokens <ocicloudnativeauthplugin>` plugin which
4814
+
is pre-installed with the ``oracledb`` module.
4815
+
4816
+
**Step 1: Create an OCI Compute Instance**
4817
+
4818
+
An `OCI compute instance <https://docs.oracle.com/en-us/iaas/compute-cloud-at-
4819
+
customer/topics/compute/compute-instances.htm>`__ is a virtual machine running
4820
+
within OCI that provides compute resources for your application. This compute
4821
+
instance will be used to authenticate access to Oracle Cloud services when
4822
+
using Instance Principal Authentication.
4823
+
4824
+
To create an OCI compute instance, see the steps in `Creating an Instance
0 commit comments