Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No access to proxy_user once connection is made #250

Closed
thrandale opened this issue Oct 25, 2023 · 3 comments
Closed

No access to proxy_user once connection is made #250

thrandale opened this issue Oct 25, 2023 · 3 comments
Labels
enhancement New feature or request patch available

Comments

@thrandale
Copy link

In cx_Oracle, when you connected with a proxy user, you were able to see that user in connection.username

>>> import cx_Oracle
>>> connection = cx_Oracle.connect("sessionuser[proxyuser]/pw@db")
>>> print(connection.username)
sessionuser[proxyuser]

Though "hacky", you could parse this output to get the proxy user.

In oracledb, when you connect with a proxy user, there is no way to access the proxy user, as it is not included in connection.username

>>> import oracledb
>>> oracledb.init_oracle_client()
>>> connection = oracledb.connect(
...     user="sessionuser",
...     proxy_user="proxyuser",
...     password="pw",
...     dsn="db",
... )
>>> print(connection.username)
sessionuser

It would be great to be able to access the connected proxy user trough either the connection.username or even better a connection.proxy_user

Info

  • python -> 3.11.6
  • oracledb -> 1.4.2
@thrandale thrandale added the enhancement New feature or request label Oct 25, 2023
@anthony-tuininga
Copy link
Member

Our main focus at this point is on the support for asyncio but I will consider this small enhancement as well if I have an opportunity!

@anthony-tuininga
Copy link
Member

I have pushed a patch that should implement this enhancement. If you are able to build from source you can verify that it works for you.

@anthony-tuininga
Copy link
Member

The patch has been included in version 2.0.0 which was just released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request patch available
Projects
None yet
Development

No branches or pull requests

2 participants