Skip to content

Conversation

@armru
Copy link
Member

@armru armru commented Dec 16, 2025

This commit adds support for the DefaultAzureCredential authentication mechanism in Azure Blob Storage. Users can now use the useDefaultAzureCredentials option to enable Azure's default credential chain, which automatically discovers and uses available credentials in the following order

  1. Environment Variables (Service Principal)
  2. Managed Identity
  3. Azure CLI
  4. Azure PowerShell

This is particularly useful when running on Azure Kubernetes Service (AKS) with
Workload Identity, eliminating the need to explicitly store credentials in
Kubernetes Secrets.

This commit adds support for the DefaultAzureCredential authentication mechanism
in Azure Blob Storage. Users can now use the `useDefaultAzureCredentials` option
to enable Azure's default credential chain, which automatically discovers and uses
available credentials in the following order

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@armru armru requested a review from a team as a code owner December 16, 2025 16:47
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request go Pull requests that update go code labels Dec 16, 2025
@armru armru changed the title feat: Add support for DefaultAzureCredential authentication mechanism feat: add support for DefaultAzureCredential authentication mechanism Dec 16, 2025
Comment on lines +40 to +41
// When using default Azure credentials, no secrets are required
if !barmanCredentials.Azure.UseDefaultAzureCredentials {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include also barmanCredentials.Azure.InheritFromAzureAD here?

Suggested change
// When using default Azure credentials, no secrets are required
if !barmanCredentials.Azure.UseDefaultAzureCredentials {
// When using default Azure credentials or AzureAD, no secrets are required
if !barmanCredentials.Azure.UseDefaultAzureCredentials && !barmanCredentials.Azure.InheritFromAzureAD {

Comment on lines +266 to +267
This is particularly useful when running on Azure Kubernetes Service (AKS) with
[Workload Identity](https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this assessment is totally precise. I think Azure Default Credentials are primarily useful to delegate to the SDK the auth mechanism inferring it from the environment, so that different auth methods can be used in different environments seamlessly.

@GabriFedi97
Copy link
Contributor

@armru the manifests generation seems to be missing in this PR

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
GabriFedi97 added a commit to GabriFedi97/plugin-barman-cloud that referenced this pull request Dec 23, 2025
…g#681)

Make explicit in docs that the inheritFromAzureAD option enables
the usage of Azure Managed Identity authentication mechanism.

Signed-off-by: Gabriele Fedi <gabriele.fedi@enterprisedb.com>
GabriFedi97 added a commit to GabriFedi97/plugin-barman-cloud that referenced this pull request Dec 23, 2025
…g#681)

Make explicit in docs that the inheritFromAzureAD option enables
the usage of Azure Managed Identity authentication mechanism.

Signed-off-by: Gabriele Fedi <gabriele.fedi@enterprisedb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants