oracle / ojdbc-extensions

The Oracle JDBC Driver Extensions include providers for centralized configuration or token providers for authentication with the DB.
Universal Permissive License v1.0
13 stars 5 forks source link

OCI Cloud Shell Authentication Fails #28

Open Michael-A-McMahon opened 1 year ago

Michael-A-McMahon commented 1 year ago

Attempting to use the CLOUD_SHELL authentication method may result in a 404 error, like this:

Caused by: com.oracle.bmc.model.BmcException: Error returned by GenerateScopedAccessToken operation in Dataplane service.(404, NotAuthorizedOrNotFound, false) Authorization failed or requested resource not found. (opc-request-id: 1DFA7842A0C64947A4E64CD287936D83/11104803DBAE9DC1608D73BB2E8E9DD0/ED0EC61B0B3C799D6B3716DC80F96278)
Timestamp: 2023-10-18T19:22:22.622Z
Client version: Oracle-JavaSDK/3.2.2
Request Endpoint: https://auth.us-phoenix-1.oraclecloud.com/v1/actions/generateScopedAccessToken
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_notauthorizedornotfound for more information about resolving this error
Also see  for details on this operation's requirements.
To get more info on the failing request, you can enable debug level logs as mentioned in `Using SLF4J for Logging section` in https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconfig.htm.
If you are unable to resolve this Dataplane issue, please contact Oracle support and provide them this full error message.
        at com.oracle.bmc.http.internal.ClientCall.lambda$checkError$18(ClientCall.java:809)
        at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930)
        at java.base/java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:946)
        at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2266)
        at java.base/java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:143)
        at com.oracle.bmc.http.internal.ClientCall.checkError(ClientCall.java:765)
        at com.oracle.bmc.http.internal.ClientCall.transformResponse(ClientCall.java:630)
        at com.oracle.bmc.http.internal.ClientCall.lambda$callAsyncImpl$22(ClientCall.java:988)
        at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
        at com.oracle.bmc.http.internal.SyncFutureWaiter$Waiter.waitAndWork(SyncFutureWaiter.java:63)
        at com.oracle.bmc.http.internal.SyncFutureWaiter.listenForResult(SyncFutureWaiter.java:32)
        at com.oracle.bmc.http.internal.ClientCall.callSync(ClientCall.java:1046)
        at com.oracle.bmc.identitydataplane.DataplaneClient.generateScopedAccessToken(DataplaneClient.java:107)
        at oracle.jdbc.provider.oci.oauth.AccessTokenFactory.requestSecurityToken(AccessTokenFactory.java:159)
        at oracle.jdbc.provider.oci.oauth.AccessTokenFactory.request(AccessTokenFactory.java:110)
        at oracle.jdbc.provider.oci.OciResourceFactory.request(OciResourceFactory.java:77)
        ... 77 more

This needs to be investigated and fixed.

norah-li commented 8 months ago

We are currently awaiting the completion of DEX-19232 before proceeding with the next steps.