Skip to content

Key Vault clients use hardcoded public cloud scope #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

Labels

KeyVaultKey Vaultblocking-releaseBlocks releasecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.

Type

Projects

Status

In Progress

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions