<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hamza Boutlih on Medium]]></title>
        <description><![CDATA[Stories by Hamza Boutlih on Medium]]></description>
        <link>https://medium.com/@hamza.boutlih?source=rss-72aa9fe0ad32------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pMhMYqrpMFwWXTLh6wdo3Q.jpeg</url>
            <title>Stories by Hamza Boutlih on Medium</title>
            <link>https://medium.com/@hamza.boutlih?source=rss-72aa9fe0ad32------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:01:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hamza.boutlih/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Oracle AI Database Connectivity With python-oracledb: Using Google Cloud Platform (GCP)]]></title>
            <link>https://medium.com/@hamza.boutlih/oracle-ai-database-connectivity-with-python-oracledb-using-google-cloud-platform-gcp-9f1fc651d1af?source=rss-72aa9fe0ad32------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f1fc651d1af</guid>
            <category><![CDATA[centralized-configuration]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[gcp-secret-manager]]></category>
            <dc:creator><![CDATA[Hamza Boutlih]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 14:07:30 GMT</pubDate>
            <atom:updated>2026-08-31T14:07:30.152Z</atom:updated>
            <content:encoded><![CDATA[<h4>Use Google Cloud Storage and Google Cloud Secret Manager to manage Oracle AI Database connection configuration outside Python applications.</h4><figure><img alt="Hero image showing a python-oracledb application using Google Cloud Centralized Configuration Providers. The application retrieves JSON connection configuration from Google Cloud Storage with config-gcpstorage:// or from Google Cloud Secret Manager with config-gcpsecretmanager://. It can resolve an Oracle AI Database password reference from Secret Manager using the gcpsecretmanager password type, then connect to Oracle AI Database." src="https://cdn-images-1.medium.com/max/1024/1*B4RQjs1FhTwGMc5ecVa0VQ.png" /></figure><h4>Key Takeaways</h4><ul><li>The <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-google-cloud-platform-centralized-configuration-providers">Google Cloud Platform Centralized Configuration Providers</a> let <a href="https://python-oracledb.readthedocs.io/en/latest">python-oracledb</a> retrieve centralized <a href="https://www.oracle.com/database/">Oracle AI Database</a> connection configuration from <a href="https://docs.cloud.google.com/storage/docs">Google Cloud Storage</a> or <a href="https://docs.cloud.google.com/secret-manager/docs">Google Cloud Secret Manager</a>.</li><li>GCP Centralized Configuration Provider support is available starting with the upcoming release of <a href="https://pypi.org/project/oracledb/">python-oracledb</a> <strong>(&gt;4.0.2)</strong>, using the <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#google-cloud-platform-configuration-provider-plugin">oracledb.plugins.gcp_config_provider</a> plugin.</li><li>Application code can call standard python-oracledb APIs such as <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#oracledb.connect">oracledb.connect()</a> and <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#oracledb.create_pool">oracledb.create_pool()</a>. The python-oracledb driver uses the GCP provider plugin to retrieve and apply the stored configuration before connecting to Oracle AI Database.</li><li><a href="https://www.oracle.com/database/">Oracle AI Database</a> passwords can stay in <a href="https://docs.cloud.google.com/secret-manager/docs">Google Cloud Secret Manager</a> and be pointed to from the <a href="https://www.json.org/json-en.html">JSON</a> configuration.</li><li>The provider supports standalone connections, connection pools, and optional ?key= selection for multi-configuration JSON objects.</li></ul><p>Starting with the upcoming <a href="https://python-oracledb.readthedocs.io/en/latest/release_notes.html">r</a>elease, the GCP Centralized Configuration Provider lets Python applications use Google Cloud Storage and Google Cloud Secret Manager as external stores for Oracle AI Database connection configuration.</p><p>For Google Cloud users, there are two natural places to store python-oracledb connection configuration:</p><ul><li><a href="https://docs.cloud.google.com/storage/docs">Google Cloud Storage</a> is a good fit for JSON configuration objects that contain Oracle AI Database connection settings, such as connect_descriptor, Oracle AI Database user, a structured password entry, cache settings, and python-oracledb pyo settings for connections or pools.</li><li><a href="https://docs.cloud.google.com/secret-manager/docs">Google Cloud Secret Manager</a> can store Oracle AI Database passwords, or it can store the full JSON connection configuration when the entire configuration should be managed as a secret.</li></ul><p>The GCP provider connects those services to python-oracledb. Import the plugin, pass a GCP-backed Data Source Name (DSN) — the connection string that identifies the external configuration source — and python-oracledb retrieves the configuration before opening the Oracle AI Database connection.</p><p>This post focuses on setup, DSN formats, Secret Manager-backed password entries, multiple configuration selection, cache settings, and using the provider with standalone connections and pools.</p><h4>What The GCP Provider Adds</h4><p>The GCP provider gives python-oracledb three practical options:</p><ul><li>Read JSON Oracle AI Database configuration from Google Cloud Storage using a config-gcpstorage:// DSN.</li><li>Read JSON Oracle AI Database configuration directly from Google Cloud Secret Manager using a config-gcpsecretmanager:// DSN.</li><li>Use the gcpsecretmanager password type so python-oracledb can retrieve the Oracle AI Database password from Google Cloud Secret Manager when it processes the configuration.</li></ul><p>That gives you flexibility. You can store the main JSON configuration in Google Cloud Storage and keep only the Oracle AI Database password in Secret Manager. Or you can store the full JSON connection configuration in Secret Manager when the complete configuration should be treated as secret-managed data.</p><p>The application enables the provider by importing the documented <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#google-cloud-platform-configuration-provider-plugin">GCP configuration provider plugin</a>:</p><pre>import oracledb.plugins.gcp_config_provider</pre><p>After that import, the gcp_config_provider plugin registers GCP configuration support with python-oracledb, so connection and pool creation calls can use config-gcpstorage:// and config-gcpsecretmanager:// DSNs.</p><h4>The Runtime Flow</h4><figure><img alt="Diagram showing a Python application calling python-oracledb with a GCP-backed DSN. The DSN points to Google Cloud Storage or Google Cloud Secret Manager, python-oracledb retrieves the JSON configuration, resolves any password reference, and connects to Oracle AI Database." src="https://cdn-images-1.medium.com/max/1024/1*6z1r-RoDUmhjuG1ozDIt5A.png" /><figcaption>Runtime flow for the GCP centralized configuration provider</figcaption></figure><p>Application code calls the standard python-oracledb APIs:</p><pre>oracledb.connect(dsn=dsn)</pre><p>or:</p><pre>oracledb.create_pool(dsn=dsn)</pre><p>The difference is the DSN. Instead of describing the Oracle AI Database endpoint directly, the DSN points to a GCP configuration source.</p><p>For Google Cloud Storage, the DSN uses this form:</p><pre>config-gcpstorage://project=&lt;project-id&gt;;bucket=&lt;bucket-name&gt;;object=&lt;object-name&gt;</pre><p>For Google Cloud Secret Manager, the DSN uses this form:</p><pre>config-gcpsecretmanager://projects/&lt;project-id&gt;/secrets/&lt;secret-name&gt;/versions/&lt;version-or-latest&gt;</pre><p>Both provider types also support ?key=&lt;config-key&gt; when the JSON object contains multiple top-level configurations.</p><p>The gcp_config_provider plugin handles the GCP-backed DSN and retrieves the JSON configuration. Python-oracledb then applies the resolved configuration to the connection or pool parameters. If password.type is gcpsecretmanager, python-oracledb uses the plugin-registered password type to retrieve the Oracle AI Database password from the Secret Manager resource named in password.value.</p><h4>Prerequisites</h4><p>To follow along, make sure you have the following in place:</p><ul><li>An Oracle AI Database you can reach, with credentials to connect.</li><li>Access to a <a href="https://docs.cloud.google.com/docs/overview">Google Cloud</a> project with a <a href="https://docs.cloud.google.com/storage/docs/buckets">Google Cloud Storage bucket</a> and, if you want to keep the password separate, a secret in <a href="https://docs.cloud.google.com/secret-manager/docs">Google Cloud Secret Manager</a>.</li><li>The <a href="https://cloud.google.com/sdk/docs/install">Google Cloud CLI</a> installed if you want to run the gcloud commands shown in this post. The gcloud command is part of the Google Cloud CLI.</li><li>The command-line examples use Bash syntax on Linux or macOS. Windows users can use WSL or translate the commands to PowerShell.</li><li>Google Cloud authentication configured through <a href="https://docs.cloud.google.com/docs/authentication/application-default-credentials">Application Default Credentials</a>. For local development, you can use:</li></ul><pre>gcloud auth application-default login</pre><ul><li>Python-oracledb’s upcoming release or later installed with the GCP provider dependencies:</li></ul><pre>python -m pip install &quot;oracledb[gcp_config]&quot;</pre><p>This installs the GCP SDK Python packages required by the oracledb.plugins.gcp_config_provider plugin.</p><p>The GCP provider dependencies follow the same pattern as the OCI, Azure, and AWS provider dependencies, so a provider you do not use does not force its SDK dependencies on your application.</p><p>The application identity also needs permission to read the required Google Cloud Storage object and access the required Secret Manager secret versions. For public Google Cloud references, see <a href="https://cloud.google.com/storage/docs/access-control/iam-roles">Cloud Storage IAM roles</a> and <a href="https://cloud.google.com/secret-manager/docs/access-control">Secret Manager access control</a>.</p><h4>Before Connecting</h4><p>The gcp_config_provider plugin uses the <a href="https://cloud.google.com/python/docs/reference">Google Cloud Python client libraries</a> to read Google Cloud Storage objects and Google Cloud Secret Manager secret versions. Those client libraries authenticate through <a href="https://docs.cloud.google.com/docs/authentication/application-default-credentials">Application Default Credentials</a>, commonly called ADC.</p><p>ADC is not a single credential type. It is the credential lookup mechanism used by Google Cloud client libraries. The identity can come from different places depending on where the application runs.</p><p>For local development, you can create ADC credentials with your Google user account by using the Google Cloud CLI:</p><pre>gcloud auth application-default login</pre><p>This command opens a browser-based Google sign-in flow and stores local ADC credentials that Google Cloud client libraries can use.</p><p>For production, prefer a service account instead of a personal Google account. On Google Cloud runtimes such as Compute Engine, Cloud Run, or Google Kubernetes Engine, ADC can use the service account attached to the runtime. In Kubernetes-based environments, Workload Identity is another common option. Outside Google Cloud, ADC can also use credentials from a service account key file if the GOOGLE_APPLICATION_CREDENTIALS environment variable points to that file.</p><p>The important point is that the provider-backed DSN does not carry Google Cloud authentication details. For example, a DSN such as config-gcpstorage://... or config-gcpsecretmanager://... identifies where the configuration is stored. Authentication to Google Cloud is handled separately by ADC.</p><p>The Google Cloud identity resolved by ADC must have permission to read the required Google Cloud Storage object and access the required Secret Manager secret version. For permission details, see <a href="https://cloud.google.com/storage/docs/access-control/iam-roles">Cloud Storage IAM roles</a> and <a href="https://cloud.google.com/secret-manager/docs/access-control">Secret Manager access control</a>.</p><h4>Creating The Password Secret</h4><p>The configuration will point to an Oracle AI Database password stored in Secret Manager, so create that secret before writing the JSON configuration.</p><p>If the Secret Manager API is not already enabled, enable it first:</p><pre>gcloud services enable secretmanager.googleapis.com --project=&lt;project-id&gt;</pre><p>On Linux, for example, create a local file containing only the Oracle AI Database password:</p><pre>printf &#39;&lt;oracle-ai-database-password&gt;&#39; &gt; db_password.txt</pre><p>Then create the Secret Manager secret:</p><pre>gcloud secrets create db-password \<br>  --replication-policy=&quot;automatic&quot; \<br>  --data-file=db_password.txt \<br>  --project=&lt;project-id&gt;</pre><p>The JSON configuration will point to this secret version:</p><pre>projects/&lt;project-id&gt;/secrets/db-password/versions/latest</pre><p>Do not commit db_password.txt. Remove it after creating the secret:</p><pre>rm db_password.txt</pre><figure><img alt="Screenshot showing a Google Cloud Secret Manager secret used to store the Oracle AI Database password. The password is referenced from the python-oracledb JSON configuration instead of being stored directly in application code." src="https://cdn-images-1.medium.com/max/1024/1*70NdpNN7XllQZ0gYQbPAqw.png" /><figcaption>Database password stored as a Google Cloud Secret Manager secret</figcaption></figure><h4>The Configuration Object</h4><p>A minimal configuration needs a connect_descriptor. In real applications, it usually includes the Oracle AI Database user and a password reference too.</p><pre>{<br>  &quot;connect_descriptor&quot;: &quot;dbhost.example.com:1521/orclpdb&quot;,<br>  &quot;user&quot;: &quot;hr&quot;,<br>  &quot;password&quot;: {<br>    &quot;type&quot;: &quot;gcpsecretmanager&quot;,<br>    &quot;value&quot;: &quot;projects/&lt;project-id&gt;/secrets/db-password/versions/latest&quot;<br>  },<br>  &quot;pyo&quot;: {<br>    &quot;stmtcachesize&quot;: 30<br>  }<br>}</pre><p>The connect_descriptor tells python-oracledb where the Oracle AI Database service is.</p><p>The user value supplies the Oracle AI Database username.</p><p>The password value is a structured object. The type value tells python-oracledb how to resolve the password. With the GCP provider, the gcpsecretmanager password type points to a Secret Manager secret version.</p><p>The pyo object contains <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#python-oracledb-parameters-settable-in-easy-connect-strings-or-centralized-configuration-providers">python-oracledb settings</a>, such as statement cache size or pool options.</p><p>The password is not stored as plaintext in the JSON. The configuration points to a Secret Manager secret version instead.</p><p>That keeps the connection configuration readable while leaving the Oracle AI Database password in the service designed to protect it.</p><h4>Using Google Cloud Storage As The Configuration Store</h4><p>Google Cloud Storage works well for JSON configuration objects.</p><p>If the bucket does not already exist, create it first:</p><pre>gcloud storage buckets create gs://&lt;bucket-name&gt; \<br>  --project=&lt;project-id&gt; \<br>  --location=&lt;region&gt;</pre><p>Upload the configuration file:</p><pre>gcloud storage cp config.json gs://&lt;bucket-name&gt;/app-configs/demo/app-config.json</pre><figure><img alt="Screenshot showing a JSON configuration file stored in a Google Cloud Storage bucket. The file contains python-oracledb centralized configuration information such as connect_descriptor, user, password reference, and pyo settings." src="https://cdn-images-1.medium.com/max/1024/1*FOQUjhWD3no9h5KsL0G3nw.png" /><figcaption>JSON configuration object uploaded to Google Cloud Storage</figcaption></figure><p>Then connect with python-oracledb:</p><pre>import oracledb<br>import oracledb.plugins.gcp_config_provider<br>dsn = (<br>&quot;config-gcpstorage://&quot;<br>&quot;project=&lt;project-id&gt;;&quot;<br>&quot;bucket=&lt;bucket-name&gt;;&quot;<br>&quot;object=app-configs/demo/app-config.json&quot;<br>)<br>with oracledb.connect(dsn=dsn) as connection:<br>    with connection.cursor() as cursor:<br>        cursor.execute(&quot;select sysdate from dual&quot;)<br>        print(cursor.fetchone())</pre><p>The application does not download the object itself. The plugin retrieves it and converts it into driver connection parameters.</p><p>The same DSN works for a connection pool:</p><pre>pool = oracledb.create_pool(dsn=dsn)<br>with pool.acquire() as connection:<br>    with connection.cursor() as cursor:<br>        cursor.execute(&quot;select user from dual&quot;)<br>        print(cursor.fetchone())<br>pool.close()</pre><h4>Using Secret Manager As The Configuration Store</h4><p>Secret Manager can also store the full JSON configuration as a secret value.</p><pre>gcloud secrets create app-config \<br>  --replication-policy=&quot;automatic&quot; \<br>  --data-file=config.json \<br>  --project=&lt;project-id&gt;</pre><figure><img alt="Screenshot showing a Google Cloud Secret Manager secret that stores the full python-oracledb JSON configuration. The configuration can be retrieved with a config-gcpsecretmanager:// DSN before connecting to Oracle AI Database." src="https://cdn-images-1.medium.com/max/1024/1*R2KC5QVsNO6yHkJ5fGH9sA.png" /><figcaption>Full JSON configuration stored as a Google Cloud Secret Manager secret</figcaption></figure><p>The DSN then points directly to the Secret Manager secret version:</p><pre>import oracledb<br>import oracledb.plugins.gcp_config_provider<br>dsn = (<br>&quot;config-gcpsecretmanager://&quot;<br>&quot;projects/&lt;project-id&gt;/secrets/app-config/versions/latest&quot;<br>)<br>with oracledb.connect(dsn=dsn) as connection:<br>    with connection.cursor() as cursor:<br>        cursor.execute(&quot;select sysdate from dual&quot;)<br>        print(cursor.fetchone())</pre><p>Use this approach when the whole configuration should live in Secret Manager, not only the password.</p><h4>Selecting One Configuration With Key</h4><p>One JSON object can hold multiple named configurations.</p><p>For a multi-configuration object, assume the JSON is stored as app-configs/apps.json.</p><pre>{<br>  &quot;sales_app&quot;: {<br>    &quot;connect_descriptor&quot;: &quot;dbhost.example.com:1521/orclpdb&quot;,<br>    &quot;user&quot;: &quot;sales&quot;,<br>    &quot;password&quot;: {<br>      &quot;type&quot;: &quot;gcpsecretmanager&quot;,<br>      &quot;value&quot;: &quot;projects/&lt;project-id&gt;/secrets/sales-password/versions/latest&quot;<br>    }<br>  },<br>  &quot;hr_app&quot;: {<br>    &quot;connect_descriptor&quot;: &quot;dbhost.example.com:1521/orclpdb&quot;,<br>    &quot;user&quot;: &quot;hr&quot;,<br>    &quot;password&quot;: {<br>      &quot;type&quot;: &quot;gcpsecretmanager&quot;,<br>      &quot;value&quot;: &quot;projects/&lt;project-id&gt;/secrets/hr-password/versions/latest&quot;<br>    }<br>  }<br>}</pre><p>The key query parameter selects the top-level configuration to use:</p><pre>dsn = (<br>    &quot;config-gcpstorage://&quot;<br>    &quot;project=&lt;project-id&gt;;&quot;<br>    &quot;bucket=&lt;bucket-name&gt;;&quot;<br>    &quot;object=app-configs/apps.json&quot;<br>    &quot;?key=sales_app&quot;<br>)</pre><p>The same pattern works with Secret Manager. In this example, assume the same multi-configuration JSON is stored as a Secret Manager secret named app-configs.</p><pre>dsn = (<br>    &quot;config-gcpsecretmanager://&quot;<br>    &quot;projects/&lt;project-id&gt;/secrets/app-configs/versions/latest&quot;<br>    &quot;?key=sales_app&quot;<br>)</pre><figure><img alt="Diagram showing a JSON object with multiple top-level configurations, such as sales_app and hr_app. The python-oracledb provider-backed DSN uses the ?key= query parameter to select one configuration for the connection." src="https://cdn-images-1.medium.com/max/1024/1*TYpSG_iK9tkmFEx18u1ucw.png" /><figcaption>Selecting one configuration from a multi-key JSON object</figcaption></figure><h4>Production Guidance</h4><ul><li>Use least-privilege IAM permissions. The runtime identity should only read the required Google Cloud Storage objects and access the required Secret Manager secret versions. For public references, see Google’s <a href="https://cloud.google.com/storage/docs/access-control/iam-roles">Cloud Storage IAM roles</a> and <a href="https://cloud.google.com/secret-manager/docs/access-control">Secret Manager access control</a> documentation.</li><li>Keep passwords in Secret Manager. Even when the main configuration lives in Cloud Storage, point the password field to Secret Manager by using the gcpsecretmanager password type.</li><li>Treat versions/latest with care. In a Secret Manager resource name, latest is an alias for the most recently added secret version. It is convenient for development, demos, and fast iteration. For production systems that need controlled rollout and rollback, a numbered version such as versions/3 is often safer. Google’s <a href="https://docs.cloud.google.com/secret-manager/docs/access-secret-version?utm_source=chatgpt.com">Secret Manager documentation</a> notes that accessing a newly added version by version number is strongly consistent, but this strong consistency note does not apply when accessing a secret version using aliases or latest.</li><li>Use explicit cache settings when refresh behavior matters. Python-oracledb can cache centralized configuration. Use <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#caching-configuration-information">config_time_to_live</a> and <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#caching-configuration-information">config_time_to_live_grace_period</a> when you need explicit refresh behavior.</li></ul><pre>{<br>  &quot;connect_descriptor&quot;: &quot;dbhost.example.com:1521/orclpdb&quot;,<br>  &quot;user&quot;: &quot;hr&quot;,<br>  &quot;password&quot;: {<br>    &quot;type&quot;: &quot;gcpsecretmanager&quot;,<br>    &quot;value&quot;: &quot;projects/&lt;project-id&gt;/secrets/db-password/versions/latest&quot;<br>  },<br>  &quot;config_time_to_live&quot;: 3600,<br>  &quot;config_time_to_live_grace_period&quot;: 300<br>}</pre><ul><li>config_time_to_live controls how long, in seconds, python-oracledb keeps retrieved configuration cached. config_time_to_live_grace_period controls how long an expired cached configuration can still be used if a fresh configuration cannot be obtained.</li></ul><h4>Thick Mode Note</h4><p>GCP-backed Centralized Configuration Provider DSNs can be used with <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/initialization.html#enabling-python-oracledb-thick-mode">python-oracledb Thick mode</a>. In Thick mode, python-oracledb must parse the config-gcpstorage:// or config-gcpsecretmanager:// DSN so that the gcp_config_provider plugin can retrieve the configuration and apply any python-oracledb-specific pyo settings.</p><p>By default, oracledb.defaults.thick_mode_dsn_passthrough is True, which causes Thick mode to pass the DSN unchanged to Oracle Client libraries. Set it to False before creating the connection or pool:</p><pre>import oracledb<br>import oracledb.plugins.gcp_config_provider<br><br>oracledb.defaults.thick_mode_dsn_passthrough = False</pre><p>Alternatively, explicitly parse the provider DSN with ConnectParams.parse_connect_string() for a standalone connection or PoolParams.parse_connect_string() for a connection pool, and pass the resulting parameter object to oracledb.connect() or oracledb.create_pool().</p><p>In both cases, the python-oracledb GCP plugin retrieves and processes the external configuration. Oracle Client libraries then establish the Thick-mode connection to Oracle Database.</p><h4>Conclusion</h4><p>The GCP provider lets Oracle AI Database connection setup use services that many Google Cloud applications already depend on.</p><p>Google Cloud Storage can hold JSON configuration. Google Cloud Secret Manager can hold passwords, or the whole configuration. Python-oracledb connects those pieces through provider-specific DSNs, so application code calls the driver and the driver knows where the configuration lives.</p><p>Give this new feature a try with a small Google Cloud Storage configuration object first, then move passwords into Google Cloud Secret Manager when you are ready to use the production pattern.</p><h4><strong>FAQs</strong></h4><ol><li><strong>What Does The GCP Centralized Configuration Provider Do?</strong><br>It lets python-oracledb read Oracle AI Database connection configuration from Google Cloud Storage or Google Cloud Secret Manager instead of storing all connection details in application code.</li><li><strong>Which GCP Services Does The Provider Support?</strong><br>The provider supports Google Cloud Storage for JSON connection configuration objects. It also supports Google Cloud Secret Manager in two ways: as a store for the full JSON connection configuration, or as a store for Oracle AI Database passwords referenced from the JSON configuration.</li><li><strong>Which Python-oracledb Version Is Required?</strong><br>GCP Centralized Configuration Provider support is available starting with the upcoming release <strong>(&gt;4.0.2)</strong>.</li><li><strong>Can The Full Configuration Be Stored In Secret Manager?</strong><br>Yes. Use a config-gcpsecretmanager:// DSN that points to a Secret Manager secret version containing the JSON configuration.</li><li><strong>Should Oracle AI Database Passwords Be Stored Directly In The JSON Configuration?</strong><br>No. The recommended pattern is to store the password in Google Cloud Secret Manager and use the gcpsecretmanager password type in the JSON configuration.<br> For development or testing, the JSON configuration can also use a supported encoded password type such as base64, but encoded text should not be treated as secret storage.</li><li><strong>Does This Work With Connection Pools?</strong><br>Yes. The same GCP-backed DSN can be used with both oracledb.connect() and oracledb.create_pool().</li><li><strong>How Does Authentication To Google Cloud Work?</strong><br>The provider uses the Google Cloud Python client libraries, which authenticate through Application Default Credentials. ADC can resolve credentials from local gcloud user credentials, a service account key file referenced by GOOGLE_APPLICATION_CREDENTIALS, an attached service account in Google Cloud runtime environments, or Workload Identity.</li><li><strong>Can One JSON Object Contain Multiple Oracle AI Database Configurations?</strong><br>Yes. A JSON object can contain multiple named configurations, and the DSN can select one with the ?key= query parameter.</li><li><strong>How Does Configuration Refresh Work?</strong><br>Refresh is controlled by python-oracledb centralized configuration cache settings, such as config_time_to_live and config_time_to_live_grace_period.</li></ol><h4>Python-oracledb Resources</h4><p>Python-oracledb is an open source package for the Python Database API specification with many additions to support advanced Oracle AI Database features. By default it is a ‘Thin’ driver that is immediately usable without needing any additional install, for example no Instant Client is required. Python-oracledb is used by frameworks, ORMs, SQL generation libraries, and other projects.</p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html">Installation instructions</a></p><p><a href="https://python-oracledb.readthedocs.io/en/latest/">Documentation</a></p><p><a href="https://github.com/oracle/python-oracledb/discussions">Discussions</a></p><p><a href="https://github.com/oracle/python-oracledb">Source code on GitHub</a></p><p><a href="https://pypi.org/project/oracledb/">PyPI</a></p><h4>GCP Resources</h4><p><a href="https://docs.cloud.google.com/docs">Google Cloud Documentation</a></p><p><a href="https://docs.cloud.google.com/storage/docs">Google Cloud Storage Documentation</a></p><p><a href="https://docs.cloud.google.com/storage/docs/buckets">Google Cloud Storage Buckets</a></p><p><a href="https://docs.cloud.google.com/secret-manager/docs">Google Cloud Secret Manager Documentation</a></p><p><a href="https://docs.cloud.google.com/docs/authentication/application-default-credentials">Application Default Credentials</a></p><p><a href="https://docs.cloud.google.com/docs/authentication/provide-credentials-adc">Set Up Application Default Credentials</a></p><p><a href="https://cloud.google.com/sdk/docs">Google Cloud CLI Documentation</a></p><p>Google <a href="https://cloud.google.com/storage/docs/access-control/iam-roles">Cloud Storage IAM Roles</a></p><p><a href="https://cloud.google.com/secret-manager/docs/access-control">Secret Manager Access Control</a></p><p><a href="https://docs.cloud.google.com/secret-manager/docs/access-secret-version">Access A Secret Version</a></p><p><a href="https://docs.oracle.com/en-us/iaas/Content/database-at-gcp/home.htm">Oracle AI Database@Google Cloud</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f1fc651d1af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Centralized Configuration Providers in python-oracledb: One Model, Multiple Clouds]]></title>
            <link>https://medium.com/@hamza.boutlih/centralized-configuration-providers-in-python-oracledb-one-model-multiple-clouds-24fbf240e50d?source=rss-72aa9fe0ad32------2</link>
            <guid isPermaLink="false">https://medium.com/p/24fbf240e50d</guid>
            <category><![CDATA[vault]]></category>
            <category><![CDATA[multi-cloud]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[centralized-configuration]]></category>
            <category><![CDATA[oracle-database]]></category>
            <dc:creator><![CDATA[Hamza Boutlih]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 11:58:34 GMT</pubDate>
            <atom:updated>2026-08-31T11:58:34.878Z</atom:updated>
            <content:encoded><![CDATA[<h4>How python-oracledb retrieves Oracle AI Database connection settings from external configuration stores while keeping application code simple.</h4><figure><img alt="Architecture diagram showing a python-oracledb application retrieving Oracle AI Database connection settings from centralized providers such as files, object storage, application configuration services, and secret managers. The driver receives JSON or key-value configuration, resolves credentials, uses TTL caching, and connects directly or creates a connection pool." src="https://cdn-images-1.medium.com/max/1024/1*G2Fr_0lBGLDMYWdZzOKjig.png" /></figure><h4>Key Takeaways</h4><ul><li><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#centralized-configuration-providers">Centralized Configuration Providers</a> enable applications to store Oracle AI Database connection settings outside application code in external configuration stores.</li><li>Applications can use standard <a href="https://pypi.org/project/oracledb/">python-oracledb</a> APIs such as <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#oracledb.connect">oracledb.connect()</a> and <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#oracledb.create_pool">oracledb.create_pool()</a> with Centralized Configuration Providers. The python-oracledb driver retrieves the connection configuration from the external provider and uses it to connect to Oracle AI Database.</li><li>The same model works across local files and cloud providers such as <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-an-oci-object-storage-centralized-configuration-provider">OCI</a>, <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-an-azure-app-centralized-configuration-provider">Azure</a>, <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-google-cloud-platform-centralized-configuration-providers">GCP</a>, and <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-amazon-web-services-centralized-configuration-providers">AWS</a>.</li><li>Provider plugins register provider-specific Data Source Name (DSN) prefixes, such as config-file://,config-gcpstorage://, and config-awssecretsmanager://, along with optional password types that tell the python-oracledb driver how to retrieve, interpret, and apply the configuration.</li><li><a href="https://pypi.org/project/oracledb/">Python-oracledb</a> can cache retrieved configuration using <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#caching-configuration-information">config_time_to_live</a> and <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#caching-configuration-information">config_time_to_live_grace_period</a>.</li></ul><h4>What Problem Does This Solve?</h4><p>In many applications, Oracle AI Database connection settings are not managed in one place. A service might keep the <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/connect_params.html#oracledb.ConnectParams.host">host name</a> in application code, the <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/connect_params.html#oracledb.ConnectParams.user">user name</a> in an environment variable, <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/pool_params.html">pool sizing</a> in a deployment manifest, <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/connect_params.html#oracledb.ConnectParams.wallet_location">wallet location</a> in a container image, and the secret name or vault URI for the password in a separate secrets tool. Over time, the same values can be copied into scripts, CI/CD variables, Kubernetes manifests, local developer setup, and runbooks. When one setting changes, teams have to find every copy, update each one correctly, and verify which value is actually used at runtime.</p><p>Python-oracledb’s <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#centralized-configuration-providers">Centralized Configuration Providers</a> solve this by letting the application pass a provider-backed DSN to the driver. The driver retrieves the stored configuration, applies it to connection or pool parameters, and connects to Oracle AI Database.</p><p>This post covers the common model: the JSON shape, provider-backed DSNs, plugin flow, password handling, caching, and how connections and pools consume the resolved configuration. Provider-specific setup, authentication, permissions, and DSN syntax are covered in the <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#centralized-configuration-providers">python-oracledb Centralized Configuration Providers documentation</a>.</p><h4>What a Centralized Configuration Provider Is</h4><p>A Centralized Configuration Provider is an external place where connection configuration lives.</p><p>That place might be a local file, an object in cloud storage, an application configuration service, or a secret manager. The application does not read that configuration directly or assemble all connection parameters by hand. Instead, the application passes a provider-backed DSN to python-oracledb.</p><p>Python-oracledb then fetches the connection configuration from the Centralized Configuration Provider, parses the retrieved settings, applies them to the connection or pool parameters, and uses those resolved details to connect to Oracle AI Database.</p><p>Depending on the provider, it may look like one of these:</p><pre>config-file://…<br>config-ociobject://…<br>config-azure://…<br>config-gcpstorage://…<br>config-gcpsecretmanager://…<br>config-awss3://…<br>config-awssecretsmanager://…</pre><p>The exact DSN syntax depends on the provider. The common idea is that the DSN points to the external configuration source. Python-oracledb retrieves the connection details from that source and then completes the normal connection or pool creation flow.</p><h4>Why Configuration Providers Matter</h4><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#centralized-configuration-providers">Centralized Configuration Providers</a> help move Oracle AI Database connection details out of application code.</p><p>They make it easier to update connection descriptors, standardize pool settings, separate configuration by environment, and integrate with cloud-native configuration or secret stores.</p><p>The benefit is not only cleaner code. It is also operational control: teams can manage Oracle AI Database connectivity in one place instead of chasing values across source code, deployment manifests, environment variables, and CI/CD settings.</p><h4>Supported Provider Families</h4><p>Python-oracledb supports centralized configuration through these provider families:</p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-a-file-centralized-configuration-provider">File Centralized Configuration Provider</a> for local files, simple deployments, and development.</p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-an-oci-object-storage-centralized-configuration-provider">OCI Object Storage Centralized Configuration Provider</a> for Oracle Cloud Infrastructure environments.</p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-an-azure-app-centralized-configuration-provider">Azure App Centralized Configuration Provider</a> for Azure-hosted applications.</p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-google-cloud-platform-centralized-configuration-providers">Google Cloud Platform Centralized Configuration Providers</a> for Google Cloud Storage and Google Cloud Secret Manager.</p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#using-amazon-web-services-centralized-configuration-providers">Amazon Web Services Centralized Configuration Providers</a> for Amazon S3 and AWS Secrets Manager.</p><p>Each provider has its own setup requirements, dependencies, authentication model, and DSN syntax. The linked python-oracledb documentation for each provider gives the exact details.</p><h4>The Shape of the Configuration</h4><p>A centralized configuration usually uses <a href="https://www.json.org/json-en.html">JSON</a>.</p><p>At minimum, python-oracledb needs a connect_descriptor. Real configurations often include a user, a password reference, cache settings, and driver options.</p><pre>{<br>  &quot;connect_descriptor&quot;: &quot;dbhost.example.com:1521/orclpdb&quot;,<br>  &quot;user&quot;: &quot;hr&quot;,<br>  &quot;password&quot;: {<br>    &quot;type&quot;: &quot;base64&quot;,<br>    &quot;value&quot;: &quot;base64-encoded-password&quot;<br>  },<br>  &quot;pyo&quot;: {<br>    &quot;stmtcachesize&quot;: 30<br>  },<br>  &quot;config_time_to_live&quot;: 3600,<br>  &quot;config_time_to_live_grace_period&quot;: 300<br>}</pre><p>The connect_descriptor tells python-oracledb where the Oracle AI Database service is.</p><p>The user<em> </em>value supplies the Oracle AI Database username.</p><p>The password value can use a password type. Some password types decode values. Others retrieve the password from a cloud secret manager.</p><p>The pyo object contains <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#python-oracledb-parameters-settable-in-easy-connect-strings-or-centralized-configuration-providers">python-oracledb settings</a>, such as statement cache size or pool options.</p><p>config_time_to_live controls how long python-oracledb keeps retrieved configuration cached. config_time_to_live_grace_period controls how long an expired cached configuration can still be used if a fresh configuration cannot be obtained.</p><h4>Start Simple: File-Based Configuration</h4><p>The file provider is the easiest way to see the model without adding cloud credentials or <a href="https://docs.oracle.com/en-us/iaas/Content/Identity/Concepts/overview.htm">IAM permissions</a>.</p><p>Create a JSON file with the Oracle AI Database connect descriptor and any python-oracledb settings you want to centralize:</p><pre>{<br>  &quot;connect_descriptor&quot;: &quot;localhost:1521/freepdb1&quot;,<br>  &quot;pyo&quot;: {<br>    &quot;min&quot;: 1,<br>    &quot;max&quot;: 4,<br>    &quot;increment&quot;: 1<br>  }<br>}</pre><p>Then use the file provider URL as the DSN:</p><pre>import oracledb</pre><pre>pool = oracledb.create_pool(<br>    user=&quot;hr&quot;,<br>    password=user_password,<br>    dsn=&quot;config-file:///opt/oracle/db-config.json&quot;<br>)</pre><p>The application creates the pool with the standard python-oracledb API. The difference is that the DSN points to configuration instead of directly describing the Oracle AI Database endpoint.</p><h4>How python-oracledb Uses Provider-Backed DSNs</h4><p>A provider-backed DSN works with the normal connection and pool APIs:</p><pre>import oracledb<br>import oracledb.plugins.&lt;some_config_provider&gt;</pre><pre>config_dsn = &quot;config-&lt;provider&gt;://...&quot;</pre><pre>connection = oracledb.connect(dsn=config_dsn)<br>pool = oracledb.create_pool(dsn=config_dsn)</pre><p>Replace &lt;some_config_provider&gt; and config-&lt;provider&gt;://... with the actual plugin and provider DSN syntax.</p><p>When python-oracledb sees a provider protocol, the resolution flow is:</p><ol><li>The DSN is parsed and the provider protocol is identified.</li><li>The registered provider handler retrieves the stored configuration.</li><li>The retrieved JSON or key-value configuration is parsed.</li><li>Precedence rules are applied.</li><li>The final values are applied to the appropriate parameter object.</li></ol><p>For a standalone connection, that means <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/connect_params.html">ConnectParams</a>. For a connection pool, that means <a href="https://python-oracledb.readthedocs.io/en/latest/api_manual/pool_params.html">PoolParams</a>.</p><p>User and password values passed directly by the application have higher precedence than user and password values from the provider. Other python-oracledb connection attributes from the provider can take precedence over equivalent application parameters. Pool settings apply when the pool is created; they do not retroactively change an already-created pool.</p><h4>Where Plugins Fit</h4><p>Python-oracledb uses provider-specific DSN prefixes to decide where the configuration should be retrieved from.</p><p>For local files, the DSN uses the built-in file provider syntax:</p><pre>config_file_dsn = &quot;config-file:///opt/oracle/db-config.json&quot;</pre><p>For cloud providers, the application imports the relevant python-oracledb plugin before using the provider-backed DSN:</p><pre># OCI Object Storage Centralized Configuration Provider<br>import oracledb.plugins.oci_config_provider<br>config_oci_dsn = &quot;config-ociobject://...&quot;<br><br># Azure App Centralized Configuration Provider<br>import oracledb.plugins.azure_config_provider<br>config_azure_dsn = &quot;config-azure://...&quot;<br><br># Google Cloud Platform Centralized Configuration Providers<br>import oracledb.plugins.gcp_config_provider<br>config_gcp_storage_dsn = &quot;config-gcpstorage://...&quot;<br>config_gcp_secret_dsn = &quot;config-gcpsecretmanager://...&quot;<br><br># Amazon Web Services Centralized Configuration Providers<br>import oracledb.plugins.aws_config_provider<br>config_aws_s3_dsn = &quot;config-awss3://...&quot;<br>config_aws_secret_dsn = &quot;config-awssecretsmanager://...&quot;</pre><p>After the provider is available, python-oracledb can resolve the provider-backed DSN, retrieve the stored configuration, parse the configuration, and apply the resolved values to the connection or pool parameters.</p><p>Some provider plugins also register password types. That matters because the main configuration can contain a structured password object instead of a plaintext password. For example, one password type may decode a base64 value, while another may retrieve the Oracle AI Database password from a cloud secret manager.</p><h4>Caching and Refresh Behavior</h4><p>Python-oracledb caches retrieved configurations from Centralized Configuration Providers by default. This avoids fetching configuration details from external providers on every connection attempt and reduces round trips to configuration services.</p><p>The <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#caching-configuration-information">config_time_to_live</a> value controls how long, in seconds, python-oracledb keeps retrieved configuration cached. If this value is not set, the default is 86,400 seconds, or 24 hours.</p><pre>{<br>&quot;config_time_to_live&quot;: 3600<br>}</pre><p>When <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#caching-configuration-information">config_time_to_live</a> is reached, the cached configuration is considered softly expired. On a later connection or pool creation attempt, python-oracledb tries to retrieve a fresh copy from the Centralized Configuration Provider.</p><p>The <a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#caching-configuration-information">config_time_to_live_grace_period</a> value controls how long, in seconds, an expired cached configuration can still be used if python-oracledb cannot retrieve a fresh copy. If this value is not set, the default is 1,800 seconds, or 30 minutes.</p><pre>{<br>&quot;config_time_to_live_grace_period&quot;: 300<br>}</pre><p>This grace period helps when the configuration provider is temporarily unavailable. During the grace period, python-oracledb can continue using the previous configuration instead of failing immediately. After the grace period expires, future connection attempts try to retrieve the configuration from the provider and fail if the configuration cannot be obtained.</p><h4>Password Handling</h4><p>Passwords should not be treated as ordinary configuration text.</p><p>In centralized configuration, the password field can be a structured object. The type<strong> </strong>tells python-oracledb how to interpret or resolve the value.</p><p>A simple example is a <strong>base64-encoded</strong> password:</p><pre>{<br>  &quot;password&quot;: {<br>    &quot;type&quot;: &quot;base64&quot;,<br>    &quot;value&quot;: &quot;base64-encoded-password&quot;<br>    }<br>}</pre><p>Some provider plugins support safer password-handling patterns, such as retrieving the database password from a cloud secret manager instead of storing it in the configuration as a base64-encoded value.</p><p>For example, a cloud provider plugin may allow the password value to reference a secret manager resource. Python-oracledb resolves the password when it processes the configuration.</p><p>This keeps the actual Oracle AI Database password in the system designed to protect it and out of the main connection configuration. Base64 is encoding, not encryption, and should not be treated as secure secret storage.</p><p>The supported password types depend on the provider and plugin.</p><h4>Multiple Configurations In One Place</h4><p>Some providers support selecting one configuration from a larger JSON object.</p><p>That can be useful when a team wants to store several named configurations together, such as one entry for a sales application and another for an HR application.</p><p>For example:</p><pre>{<br>  &quot;sales_app&quot;: {<br>    &quot;connect_descriptor&quot;: &quot;sales-db.example.com:1521/salespdb&quot;,<br>    &quot;user&quot;: &quot;sales_user&quot;,<br>    &quot;password&quot;: {<br>      &quot;type&quot;: &quot;base64&quot;,<br>      &quot;value&quot;: &quot;c2FsZXNfcGFzc3dvcmQ=&quot;<br>    },<br>    &quot;pyo&quot;: {<br>      &quot;stmtcachesize&quot;: 20,<br>      &quot;min&quot;: 2,<br>      &quot;max&quot;: 8<br>    }<br>  },<br>  &quot;hr_app&quot;: {<br>    &quot;connect_descriptor&quot;: &quot;hr-db.example.com:1521/hrpdb&quot;,<br>    &quot;user&quot;: &quot;hr_user&quot;,<br>    &quot;password&quot;: {<br>      &quot;type&quot;: &quot;base64&quot;,<br>      &quot;value&quot;: &quot;aHJfcGFzc3dvcmQ=&quot;<br>    },<br>    &quot;pyo&quot;: {<br>      &quot;stmtcachesize&quot;: 30,<br>      &quot;min&quot;: 1,<br>      &quot;max&quot;: 4<br>    }<br>  }<br>}</pre><p>With the file provider, the application can select one top-level configuration by using the key query parameter:</p><pre>import oracledb</pre><pre>connection = oracledb.connect(<br>    dsn=&quot;config-file:///opt/oracle/apps.json?key=sales_app&quot;<br>)</pre><p>Other providers have their own supported syntax for selecting configurations. Check the provider-specific python-oracledb documentation for the exact syntax and supported options.</p><h4>Common Pitfalls</h4><p>A few issues come up often with centralized configuration:</p><ul><li>The provider URL uses the wrong prefix.</li><li>The provider plugin was not imported before using the DSN.</li><li>A cloud provider SDK dependency is missing.</li><li>The runtime identity does not have permission to read the configuration or secret.</li><li>The JSON is malformed.</li></ul><h4>Conclusion</h4><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#centralized-configuration-providers">Centralized Configuration Providers</a> move Oracle AI Database connection configuration out of application code and into a place built to manage it.</p><p><a href="https://pypi.org/project/oracledb/">Python-oracledb</a> keeps the application code straightforward: connect, create a pool, use the connection. The provider decides where the configuration comes from.</p><p>That separation is the main value.</p><h4>FAQs</h4><p><strong>1. What Problem Do Centralized Configuration Providers Solve?</strong></p><p>They keep Oracle AI Database connection settings out of application code. Instead of copying connection details across services, applications pass a provider-backed DSN to python-oracledb, and python-oracledb retrieves the configuration from the external provider.</p><p><strong>2. Which Configuration Providers And Password Stores Does python-oracledb Support?</strong></p><p>Python-oracledb supports Centralized Configuration Providers for local files, OCI Object Storage, Azure App Configuration, Google Cloud Storage, Google Cloud Secret Manager, Amazon S3, and AWS Secrets Manager. For passwords, provider-specific configuration can also use secret stores such as OCI Vault, Azure Key Vault, Google Cloud Secret Manager, and AWS Secrets Manager, depending on the provider and plugin being used.</p><p><strong>3. Do Applications Need New Connection APIs?</strong></p><p>No. Application code can use standard python-oracledb APIs such as oracledb.connect() and oracledb.create_pool().</p><p><strong>4. Does The DSN Point Directly To Oracle AI Database?</strong></p><p>Not with centralized configuration. The application DSN points to the external configuration source, such as a local file, OCI Object Storage object, Azure App Configuration entry, Google Cloud Storage object, Google Cloud Secret Manager secret, Amazon S3 object, or AWS Secrets Manager secret.</p><p>Inside that retrieved configuration, the connect_descriptor key contains the Oracle AI Database connection string. That value can be a short Easy Connect string, such as:</p><pre>dbhost.example.com:1521/orclpdb</pre><p>or a longer Oracle Net Connect Descriptor, such as:</p><pre>(DESCRIPTION=<br>  (ADDRESS=(PROTOCOL=TCP)(HOST=dbhost.example.com)(PORT=1521))<br>  (CONNECT_DATA=(SERVICE_NAME=orclpdb))<br>)</pre><p>In other words, the provider-backed DSN tells python-oracledb <strong>where to fetch configuration from</strong>. The connect_descriptor tells python-oracledb <strong>which Oracle AI Database service to connect to</strong> after the configuration is fetched.</p><p><strong>5. Can Centralized Configuration Be Used With Connection Pools?</strong><br>Yes. The same model works for standalone connections and connection pools.</p><p><strong>6. How Are Passwords Handled?</strong><br>The password field can use a structured object with a type and value. Depending on the provider, the password can be decoded, retrieved from a secret manager, or resolved by another registered password type.</p><p><strong>7. Does Python-oracledb Fetch The Configuration Every Time?</strong><br>Not necessarily. Python-oracledb can cache retrieved configuration using config_time_to_live and config_time_to_live_grace_period.</p><h4>Python-oracledb Resources</h4><p>Python-oracledb is an open source package for the Python Database API specification with many additions to support advanced Oracle AI Database features. By default it is a ‘Thin’ driver that is immediately usable without needing any additional install, for example no Instant Client is required. Python-oracledb is used by frameworks, ORMs, SQL generation libraries, and other projects.</p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html">Installation instructions</a></p><p><a href="https://python-oracledb.readthedocs.io/en/latest/index.html">Documentation</a></p><p><a href="https://github.com/oracle/python-oracledb/discussions">Discussions</a></p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html">Source code on GitHub</a></p><p><a href="https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html">PyPI</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24fbf240e50d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>