Skip to content

Fix fallback to config file when partial OCI API Key credentials are provided (Fixes #159) #187

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MouhsinElmajdouby
Copy link
Member

Fixes #159

When some OCI API Key parameters (like OCI_USER or OCI_TENANCY) are provided without the full set, an IllegalStateException was thrown.

This update changes the logic to check if all required fields (TENANCY, USER, FINGERPRINT, PRIVATE_KEY) are present. If not, it falls back to config file authentication instead of throwing an exception.

Also added a test case to verify this behavior.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 5, 2025
@fmeheust fmeheust self-requested a review June 6, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OJDBC-EXTENSION] IF OPTIONAL PARAMETER LIKE OCI_USER/OCI_TENANCY IS PROVIDED, JAVA.LANG.ILLEGALSTATEEXCEPTION: IS THROWN
1 participant