Skip to content

ApplicationAuth controller is not able to update userkey of Application when product.Spec.AuthUserKey() != nil #1078

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

Open
vinolipartec opened this issue Mar 20, 2025 · 1 comment

Comments

@vinolipartec
Copy link

vinolipartec commented Mar 20, 2025

When

  1. we have a product with a custom authUserKey field:
apiVersion: capabilities.3scale.net/v1beta1
kind: Product
metadata:
  name: test-product
spec:
  deployment:
    apicastSelfManaged:
      authentication:
        userkey:
          authUserKey: x-api-token
  1. associated with an application:
apiVersion: capabilities.3scale.net/v1beta1
kind: Application
metadata:
  name: test-app
spec:
  productCR:
    name: test-product
  1. and we want to change the user_key using ApplicationAuth:
apiVersion: capabilities.3scale.net/v1beta1
kind: ApplicationAuth
metadata:
  name: test
spec:
  applicationCRName: test-app
  authSecretRef:
    name: test-secret

I expect

that the user_key of application "test-app" will be updated.

Instead

it's not updated.

Notes

  1. if authUserKey == user_key or is not set, update works
  2. the operator uses authUserKey value in the PUT request, it seems that operator has a different behavior from the 3scale cli

if product.Spec.AuthUserKey() == nil {
params["user_key"] = authSecret.UserKey
} else {
params[*product.Spec.AuthUserKey()] = authSecret.UserKey
}

@ioggstream
Copy link
Contributor

ioggstream commented Mar 20, 2025

Further information:

  • Red Hat Integration - 3scale 0.12.2 provided by Red Hat
  • update channel - threescale-2.15

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