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

Error while creating a vault secret #346

Open
saisandeeperram opened this issue Aug 17, 2022 · 1 comment
Open

Error while creating a vault secret #346

saisandeeperram opened this issue Aug 17, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@saisandeeperram
Copy link

What happened?

While creating a keyvault secret i am getting the below error.
. Status=401 Code="Unauthorized" Message="AKV10022: Invalid audience. Expected https://vault.azure.net, found: https://management.azure.com/.

How can we reproduce it?

The code I am using

kind: KeyVaultSecret
metadata:
  name: example2255
spec:
  forProvider:
    vaultBaseUrl: 'https://myvault.vault.azure.net/'
    name: test-secret
    attributes:
      enabled: true
      notBeforeDate: '2022-12-30T00:00:00Z'
      expirationDate: '2022-12-30T00:00:00Z'
    value:
      namespace: crossplane-system
      name: example-azure-keyvault-secret
      key: value
    contentType: text/plain
    tags:
      created_by: crossplane
  providerConfigRef:
    name: provider-azure 

What environment did it happen in?

Crossplane version: v0.19.0

@saisandeeperram saisandeeperram added the bug Something isn't working label Aug 17, 2022
@jgpelaez
Copy link

We have same problem creating vault, as temporary solution we added a new providerconfig:

apiVersion: azure.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
  labels:
    argocd.argoproj.io/instance: crossplane-providers-hxops-dev-euw-aks
  name: provider-azure-vault
spec:
  credentials:
    secretRef:
      key: credentials-vault.json
      name: azure-provider-credentials
      namespace: crossplane-system
    source: Secret

In credentials-vault.json, there is small change in the json, with

"resourceManagerEndpointUrl": "https://vault.azure.net/",

Works.

Anyway we also think that this is a bug on the provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants