azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

Managed Identity support for Azure File Data Lake client library for Java

Open tedescomicchidev opened this issue 6 years ago • 6 comments

Is your feature request related to a problem? Please describe. Currently only SAS (shared access signature) authentication is supported for Azure File Data Lake client library for Java. I would like to leverage the Managed Identity functionality of my Azure Functions app to authenticate towards my Azure File Data Lake Storage Gen2.

Describe the solution you'd like I would like that the SDK checks if a credentials object has been passed to the constructor. If not, it should try to auth via (system) Managed Identity.

Describe alternatives you've considered Only alternative is the current capability to create and leverage a SAS (shared access signature) from the Storage Account container.

tedescomicchidev avatar May 12 '20 21:05 tedescomicchidev

@gapra-msft @rickle-msft

alzimmermsft avatar May 13 '20 16:05 alzimmermsft

@tedescomicchidev Thanks for opening this issue. Have you tried using the ManagedIdentityCredential type and using that to initialize your builder? Or if so, does this type not fit your scenario?

rickle-msft avatar May 13 '20 18:05 rickle-msft

Hi - I can confirm that also by using ManagedIdentityCredential (ManagedIdentityCredentialBuilder) I am NOT able to create a FileSystem. But when I use SaS (e.g. credential(new StorageSharedKeyCredential("someaccountname", "somekey=="))) I am actually able to create a FileSystem.

tedescomicchidev avatar May 14 '20 22:05 tedescomicchidev

Hi @tedescomicchidev,

Could you please share the error you get when using the ManagedIdentityCredential?

gapra-msft avatar May 28 '20 17:05 gapra-msft

Hi @gapra-msft - Given that I can only test this when running inside an Azure Function I havent seen any exception being exposed through App Insights so far. The same code just doesnt execute in an Azure Function, where as if I excehange the auth part with a Storage Key, it works. How would you suggest that I best grab the logs and insights in an Azure Function for this use case (ManagedIdentity)? Thanks

tedescomicchidev avatar May 29 '20 08:05 tedescomicchidev

@tedescomicchidev Sorry for the delay here. There was another fairly extensive thread that investigated the relationship between our sdks and Azure Functions. I believe the resolution was that there was a networking dependency conflict between the two causing this behavior. Were you a part of that thread or do you need me to find it and link you to it? If you were made aware of that and are satisfied with the status, could you please close this issue?

rickle-msft avatar Jul 13 '20 18:07 rickle-msft