azure-kusto-java icon indicating copy to clipboard operation
azure-kusto-java copied to clipboard

v6.0.1 version not work with Managed Identity

Open tuGithub opened this issue 7 months ago • 5 comments

Describe the bug The latest version 6.0.1 works in local env, but once deployed to the cloud env, it will not work with error "Caused by: com.azure.identity.CredentialUnavailableException: Managed Identity authentication is not available. "

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • JRE Version: [e.g. OpenJDK 8]
  • SDK Version: [e.g. 6.0.1]

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context Error stack: The problem reside in the upgrade of kusto library from 5.1 to 6.0.1

After upgrade to v6.0.1, failed with

│ Caused by: com.azure.identity.CredentialUnavailableException: Managed Identity authentication is not available.                                                                              │ │     at com.azure.identity.implementation.IdentityClient.lambda$authenticateWithManagedIdentityConfidentialClient$23(IdentityClient.java:579) ~[azure-identity-1.13.0.jar:1.13.0]             │ │     at reactor.core.publisher.Mono.lambda$onErrorMap$28(Mono.java:3854) ~[reactor-core-3.6.5.jar:3.6.5]                                                                                      │ │     at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.6.5.jar:3.6.5]                                                          │ │     at io.opentelemetry.javaagent.shaded.instrumentation.reactor.v3_1.TracingSubscriber.onError(TracingSubscriber.java:85) ~[opentelemetry-javaagent.jar:na]                                 │ │     at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:241) ~[reactor-core-3.6.5.jar:3.6.5]                                                                      │ │     at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:315) ~[reactor-core-3.6.5.jar:3.6.5]                                                                         │ │     at io.opentelemetry.javaagent.shaded.instrumentation.reactor.v3_1.TracingSubscriber.onError(TracingSubscriber.java:85) ~[opentelemetry-javaagent.jar:na]                                 │ │     at io.opentelemetry.javaagent.shaded.instrumentation.reactor.v3_1.TracingSubscriber.onError(TracingSubscriber.java:85) ~[opentelemetry-javaagent.jar:na]                                 │ │     at reactor.core.publisher.MonoCompletionStage$MonoCompletionStageSubscription.apply(MonoCompletionStage.java:115) ~[reactor-core-3.6.5.jar:3.6.5]                                        │ │     at reactor.core.publisher.MonoCompletionStage$MonoCompletionStageSubscription.apply(MonoCompletionStage.java:67) ~[reactor-core-3.6.5.jar:3.6.5]                                         │ │     at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source) ~[na:na]                                                                                                   │ │     at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source) ~[na:na]               

tuGithub avatar May 06 '25 21:05 tuGithub

Managed Identity authentication is not available.

This indicates that the environment doesn't have managed identity in it.

Are you sure the only difference was the SDK version?

AsafMah avatar May 11 '25 11:05 AsafMah

yes, we deployed the code to our intg env with managed identity in it and it works; with the library upgrade, it breaks

tuGithub avatar May 13 '25 21:05 tuGithub

This doesnt seem to be related to Kusto , the error is coming from com.azure.identity , as far as we can tell managed identity is really not available where the executable is running from. To make sure that Managed identity is available you can run a simple curl command from the environment trying to get a token see https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/how-to-use-vm-token#get-a-token-using-curl

if this doesnt help open an ICM to intg

ohadbitt avatar May 14 '25 11:05 ohadbitt

@tuGithub Have you tried?

AsafMah avatar May 18 '25 11:05 AsafMah

let me try this with our Ops

tuGithub avatar May 19 '25 16:05 tuGithub

Closing the issue for now.

Please re-open if the problem persists.

AsafMah avatar Jun 08 '25 11:06 AsafMah

Hello, we released a new version that should fix issues with Managed Identity.

Can you check it? thanks

AsafMah avatar Jun 26 '25 06:06 AsafMah

Closing for now. If you have an issue with the latest version - let us know.

AsafMah avatar Jul 20 '25 10:07 AsafMah