Skip to content

Fix SecretClient Auth Policy #3309

@HectorMorenoTR

Description

@HectorMorenoTR

Bug Title

No response

Crate Name

azure_security_keyvault_secrets

Crate Version

0.9.0

Description

Current secret client has a fixed auth policy restricting the access to Azure Government

  1. create secret on keyvault for Azure Gov
  2. Instantiate a client for Azure Goverment cloud
  3. Try to get the secret using get_secret method
  4. it fails with the following message: The requested identity hasn’t been assigned to this resource.

The code responsible for the error:

let auth_policy: Arc<dyn Policy> = Arc::new(BearerTokenAuthorizationPolicy::new(
credential,
vec!["https://vault.azure.net/.default"],
));

Steps to Reproduce

  1. create secret on keyvault for Azure Gov
  2. Instantiate a client for Azure Goverment cloud
  3. Try to get the secret using get_secret method
  4. it fails with the following message: The requested identity hasn’t been assigned to this resource.

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions