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

Azure Storage Blob : How to read connection string from external source #289

Open
parasjain27031994 opened this issue Sep 18, 2024 · 1 comment
Assignees

Comments

@parasjain27031994
Copy link

We are using azure-storage-blob extension, however we see that providing connection string is mandatory, this poses a security risk as we do not want to expose this in our application or IAC code.

Is there a way to assign this value at runtime probably by reading it from Secrets Manages or Azure Key vault ?

@majguo
Copy link
Contributor

majguo commented Nov 15, 2024

Hello @parasjain27031994, I haven't tried it yet, but it's possible to read connection string of the azure storage blob from Azure Key Vault using extension io.quarkiverse.azureservices:quarkus-azure-keyvault at runtime:

  1. Create Azure Storage Blob and Azure Key Vault, and add connection string of the Azure Storage Blob as one of the secrets in the Azure key Vault, e.g., secret-azure-storage-blob-conn-string;

  2. Include io.quarkiverse.azureservices:quarkus-azure-keyvault:1.0.7 in your app;

  3. In your application.properties file:

    quarkus.azure.keyvault.secret.endpoint=<your-azure-key-vault-secret-endpoint>
    quarkus.azure.storage.blob.connection-string=${kv//secret-azure-storage-blob-conn-string}
    

References:

@majguo majguo self-assigned this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants