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

Support for managed identity in azure.storage.fileshare #13033

Closed
holwech opened this issue Aug 11, 2020 · 13 comments
Closed

Support for managed identity in azure.storage.fileshare #13033

holwech opened this issue Aug 11, 2020 · 13 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@holwech
Copy link

holwech commented Aug 11, 2020

Running the following:

from azure.storage.fileshare import ShareFileClient
from azure.identity import DefaultAzureCredential

file_client = ShareFileClient(
                        account_url=f"https://{storage_account}.file.core.windows.net/",
                        file_path=file_path,
                        credential=DefaultAzureCredential(),
                        share_name=share_name
                     )

Leads to the following error:

ValueError("Token credentials not supported by the File service.")

Default credentials in my case would be managed identity. It's not explicitly mentioned in the documentation (as far as I can see), but is managed identity not supported by this library? Will it be supported, and if so, when?

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 11, 2020
@kaerm kaerm added Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Aug 11, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 11, 2020
@ghost
Copy link

ghost commented Aug 11, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@xiafu-msft xiafu-msft added the feature-request This issue requires a new behavior in the product in order be resolved. label Aug 12, 2020
@xiafu-msft
Copy link
Contributor

Hi @holwech
Thanks for reporting this. We will discuss this and get back to you!

@lmazuel lmazuel added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 12, 2020
@tasherif-msft tasherif-msft self-assigned this Sep 13, 2020
@bec-zt8
Copy link

bec-zt8 commented Feb 17, 2021

what is the status of this issue?

@amishra-dev
Copy link

The service does not have the support for this yet. We will add it to the SDK as soon as the service adds support. We do not have the ETA for the service support

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Feb 20, 2021
[Hub Generated] Review request for Microsoft.KeyVault to add version stable/2019-09-01 (Azure#13033)

* Add default response schema in examples

* Run Prettier Check

* Add missing properties

* Remove hsmPoolResourceId
@pdworzynski
Copy link

pdworzynski commented Sep 16, 2021

Hi,

Is there an update on this? For example, documentation suggests that this approach should work e.g.

from azure.storage.fileshare import ShareServiceClient

service = ShareServiceClient(account_url="https://<my-storage-account-name>.file.core.windows.net/", credential=credential)

However, using azure-storage-file-share 12.5.0 with a service principal token i'm getting the same error.

ValueError("Token credentials not supported by the File service.") 

Can you recommend any workarounds?

Thanks!

@lmazuel lmazuel added the Client This issue points to a problem in the data-plane of the library. label Dec 17, 2021
@jvschoen
Copy link

jvschoen commented Mar 2, 2022

Any update on this? what is the best approach to connecting to file service through python SDK?

@jalauzon-msft
Copy link
Member

Hi all, apologies for the long delay with no update but we've essentially been waiting for the service to add support for AAD auth to the Files service. I'm happy to report the service team is finally working on adding this support and we should soon be able to support this in the SDK. I don't have yet have a concrete timeline but hopefully it will be coming within the next couple of releases.

Thanks for your patience. I will update here once the feature has been added.

@david-msft
Copy link

Hi all, apologies for the long delay with no update but we've essentially been waiting for the service to add support for AAD auth to the Files service. I'm happy to report the service team is finally working on adding this support and we should soon be able to support this in the SDK. I don't have yet have a concrete timeline but hopefully it will be coming within the next couple of releases.

Thanks for your patience. I will update here once the feature has been added.

is this going to be in .net SDK as well?

@jalauzon-msft
Copy link
Member

@david-msft, yes, the plan is for the to be added to the .NET SDK as well once its available from the service. Still no ETA on it but this feature in.NET should be released at the same as Python.

@diti-nz
Copy link

diti-nz commented Jan 18, 2023

Hi Team, Any update on this?

@paul-cleverley
Copy link

what @diti-nz said...?

@jalauzon-msft
Copy link
Member

Hi all, I'm happy to announce that support for Files OAuth / Managed identities has been released in our latest preview release, 12.12.0b1! Please see this sample for example use.

Please note there some caveats with the implementation that are specific to the Files SDK and come from the service (out of the client's control).

  • Only File, Directory, and a small handful of Share level operations are supported for use with OAuth in the data plane SDK (azure-storage-file-share). For all other operations that need to be used with OAuth, it is recommended to use the control plane SDKs.
  • In the current implementation you must provide the token_intent keyword (see sample) with the only possible value being backup today. This certifies your intent to use the readFileBackupSemantics and/or writeFileBackupSemantics RBAC permissions that allow you to bypass File ACLs when using OAuth. This is currently the only supported scenario for OAuth in the Files service.

Please feel free to try out the preview release and provide any feedback. This will tentatively be released in our next full release within the next few weeks (may change though). Since it is currently in preview, it is subject to change before the full release though. Thanks for your patience!

@jalauzon-msft
Copy link
Member

This has been fully released in version 12.12.0.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests