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

[C++] Implement all important authentication methods for Azure filesystem #38598

Open
1 task done
Tom-Newton opened this issue Nov 6, 2023 · 6 comments
Open
1 task done

Comments

@Tom-Newton
Copy link
Contributor

Tom-Newton commented Nov 6, 2023

Describe the enhancement requested

So far the Azure filesystem implementation only supports account key authentication. This is ok initially during development but for normal operation role-based access control (RBAC) is recommended.

Azure authentication that I think are important to supported (roughly ordered with most important first):

Related Issues:

Component(s)

C++

@kou
Copy link
Member

kou commented Nov 14, 2023

Can we split this issue to each authentication method?

@pitrou
Copy link
Member

pitrou commented Dec 7, 2023

Can we split this issue to each authentication method?

Seconded. What we did in S3 is simply start with the simplest methods (anonymous, secret key) and then let contributors add whichever auth method they needed.

@Tom-Newton
Copy link
Contributor Author

Ok 👍. I'll probably make each individual auth method a sub ticket of this ticket.

I plan to start working on this quite soon.

@sahil1105
Copy link
Contributor

Hi, I was wondering if there were any examples of using SAS tokens with the AzureFileSystem?

SAS token. I believe SAS token just needs to be appended to the URL in the right places.

My understanding is that the SAS tokens need to be appended to the API requests and therefore we may still need to provide a way at the FileSystem level to specify these tokens so that they can be used when making the API calls. Please correct me if I'm mistaken. When we tried to include the SAS token in the path to "OpenOutputStream" (when trying to write a parquet file), we saw errors like:

Check for Hierarchical Namespace support on 'https://<STORAGE_ACCOUNT_NAME>.blob.core.windows.net/<CONTAINER_NAME>' failed. Azure Error: [AuthenticationFailed] 403 Server failed to authenticate

I'd be interested to pick this up if I can get some guidance on it.

@kou
Copy link
Member

kou commented Aug 16, 2024

You're right.

We need to design API for SAS token support as the first step. Could you investigate APIs of other related libraries?

@Tom-Newton
Copy link
Contributor Author

Tom-Newton commented Oct 4, 2024

It looks like there is AzureSasCredential https://github.com/Azure/azure-sdk-for-cpp/blob/101f20f2bbf3dd5f6438565cd9f709a231317f77/sdk/tables/azure-data-tables/inc/azure/data/tables/credentials/azure_sas_credential.hpp#L16C9-L16C27 in the Azure C++ SDK so I think we can just do it exactly the same as all the other authentication options.

Checking the API on a couple of similar libraries:
adlfs just has a sas_token string argument when initialising the filesystem https://github.com/fsspec/adlfs/blob/7f06dbdd410224047df09d0ef9e5e9913c64bf7d/adlfs/spec.py#L247
object_store has a with_sas_authorization method, but interestingly it wants the URL syntax of the SAS token broken down into query_pairs: impl Into<Vec<(String, String)>>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants