Skip to content

Commit a5778dc

Browse files
Fix for password stored in OCI Vault.
1 parent 310aa50 commit a5778dc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/oracledb/plugins/oci_config_provider.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
# store from OCI Object Storage.
3030
# -----------------------------------------------------------------------------
3131

32-
import re
32+
import base64
3333
import json
3434
import oci
3535
import oracledb
36+
import re
3637

3738
from urllib.parse import urlparse, parse_qs
3839

@@ -212,7 +213,9 @@ def password_type_oci_vault_hook(args):
212213
get_secret_bundle_response = secret_client_oci.get_secret_bundle(
213214
**get_secret_bundle_request
214215
)
215-
return get_secret_bundle_response.data.secret_bundle_content.content
216+
# decoding the vault content
217+
b64content = get_secret_bundle_response.data.secret_bundle_content.content
218+
return base64.b64decode(b64content).decode()
216219

217220

218221
def _retrieve_region(objservername):

0 commit comments

Comments
 (0)