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

Invalid extKeyUsage expression #216

Open
delubi-ro opened this issue Dec 19, 2023 · 1 comment
Open

Invalid extKeyUsage expression #216

delubi-ro opened this issue Dec 19, 2023 · 1 comment

Comments

@delubi-ro
Copy link

The extKeyUsage in pki secret engine role CRD appears to expect an array of strings.

I have a CR manifest file defined as

apiVersion: redhatcop.redhat.io/v1alpha1
kind: PKISecretEngineRole
metadata:
  name: test-role
spec:
  authentication:
    path: kubernetes
    role: admin
    serviceAccount:
      name: default
  path: pki
  allowSubdomains: true
  allowAnyName: true
  maxTTL: "360h"
  extKeyUsage:
    - ServerAuth
    - ClientAuth

Got the following error during kubectl apply

The PKISecretEngineRole "test-role" is invalid: spec.extKeyUsage: Unsupported value: []interface {}{"ServerAuth", "ClientAuth"}: supported values: "ServerAuth", "ClientAuth", "CodeSigning", "EmailProtection", "IPSECEndSystem", "IPSECTunnel", "IPSECUser", "TimeStamping", "OCSPSigning", "MicrosoftServerGatedCrypto", "NetscapeServerGatedCrypto", "MicrosoftCommercialCodeSigning", "MicrosoftKernelCodeSigning"

Expected outcome: No error.

Vault config operator version: v0.8.24

@raffaelespazzoli
Copy link
Collaborator

yeah, there is an error in the kubebuilder annotation. the right approach is documented here: kubernetes-sigs/kubebuilder#2812 we will queue the work for a fix, or perhaps you could contributed it.

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