quarkiverse / quarkus-azure-services

Quarkus extensions for Azure services
Apache License 2.0
14 stars 18 forks source link

Use Token Credentials to upload to blob #282

Open r77o opened 2 months ago

r77o commented 2 months ago

I was going the the implementation in the example for blob storage : https://github.com/quarkiverse/quarkus-azure-services/tree/main/extensions/azure-storage-blob/deployment

Here connection-string is being used probably with a sas token. However, i can't use the sas token as it will give me access to all the containers. i have a specific container where I want to upload the files.

I have use the TokenCredentials that are generated using TenantID, Client and Client Secret for authorization.

Is there a way that I can use TokenCredentials to access the container?

majguo commented 7 hours ago

Hello @r77o, it's a good question. As for now, connection-string is the only way to access the azure storage blob with extension azure-storage-blob. We're planning to enhance the extension to support managed identity based authentication/authorization (see this doc as an example, but using the enhanced quarkus extension), which seems address your requirement. We probably start working in Dec 2024.