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

Using create_pool() with Kerberos #381

Open
CEBasile opened this issue Aug 15, 2024 · 6 comments
Open

Using create_pool() with Kerberos #381

CEBasile opened this issue Aug 15, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@CEBasile
Copy link

  1. What versions are you using?
    oracledb.version: 2.2.1
    platform.platform: Windows-2016Server-10.0.14393-SP0
    sys.maxsize > 2**32: True
    platform.python_version: 3.12.4
    database version: 19.22.0.0
  1. Is it an error or a hang or a crash?
    Error, same as issue Using create_pool with Oracle Wallet #36 but for Kerberos this time

  2. What error(s) or behavior you are seeing?
    When trying to create a connection pool with externalauth=True (Kerberos in this case) there is an exception complaining about null or missing username.
    File "src\oracledb\impl/thick/pool.pyx", line 152, in oracledb.thick_impl.ThickPoolImpl.init
    File "src\oracledb\impl/thick/utils.pyx", line 446, in oracledb.thick_impl._raise_from_info
    oracledb.exceptions.DatabaseError: ORA-24415: Missing or null username.

  1. Does your application call init_oracle_client()?
    Yes
  1. Include a runnable Python script that shows the problem.
@CEBasile CEBasile added the bug Something isn't working label Aug 15, 2024
@anthony-tuininga
Copy link
Member

Did you create the pool in heterogeneous mode? That is mandatory for external authentication in thick mode.

@CEBasile
Copy link
Author

Thank you Anthony, this is the correct answer and does work. I ready through the documentation and it led me to understand that since all the connections in the pool are still using the same credentials I should be using homogenous mode. Maybe I misunderstood, or the documentation needs to be improved?

@anthony-tuininga anthony-tuininga added question Further information is requested and removed bug Something isn't working labels Aug 16, 2024
@anthony-tuininga
Copy link
Member

Logically it makes sense that since you intend to use the same credentials for all connections in the pool that homogeneous mode is supported -- but that is not, in fact, the case. Which documentation were you looking at? We can definitely look at that documentation and see if there is a way to improve it so there isn't confusion for the next person looking at it!

@CEBasile
Copy link
Author

@anthony-tuininga
Copy link
Member

Yep. I can see how you would be confused and I'll look into getting this improved. The different external authentication methods are not mentioned explicitly but anything not requiring a user name and password fits in that category and the number of options continues to grow -- so not sure mentioning Kerberos explicitly is helpful. I'll see what @cjbj thinks!

@anthony-tuininga
Copy link
Member

Another option is to raise a more meaningful error when this situation is detected (externalauth=True and homogeneous=True)? Something like this?

DPY-XXXX: homogeneous pools are not supported with external authentication in thick mode

@cjbj cjbj added enhancement New feature or request and removed question Further information is requested labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants