gravitee-io / issues

Gravitee.io - API Platform - Issues
65 stars 26 forks source link

Admission webhook rejects valid secretRef ManagementContext #10182

Open joeclarkpodium opened 6 days ago

joeclarkpodium commented 6 days ago

Describe the bug

Since GKO v4.5.0 and the addition of new admission webhook, valid secretRef ManagementContexts now get rejected.

To Reproduce

Steps to reproduce the behaviour:

  1. Attempt to create a valid Secret and secretRef ManagementContext resource, using a valid bearer token for the APIM instance, for example:
    apiVersion: v1
    kind: Secret
    metadata:
    name: mgmt-ctx-secret
    type: Opaque
    data:
    bearerToken: YmFzZTY0LWVuY29kZWQtc3RyaW5n
    ---
    apiVersion: gravitee.io/v1alpha1
    kind: ManagementContext
    metadata:
    name: example-context
    spec:
    baseUrl: http://example-apim-deployment:83
    environmentId: DEFAULT
    organizationId: DEFAULT
    auth:
    secretRef:
      name: mgmt-ctx-secret

Expected behaviour

The resource is created.

Current behaviour

The resource is rejected by the admission webhook with the error bad credentials for context.

Environment

What is the impacted version? 4.5.0