ApplicationAuth controller is not able to update userkey of Application when product.Spec.AuthUserKey() != nil
When
- 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
- associated with an application:
apiVersion: capabilities.3scale.net/v1beta1
kind: Application
metadata:
name: test-app
spec:
productCR:
name: test-product
- 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
- if authUserKey == user_key or is not set, update works
- the operator uses authUserKey value in the PUT request, it seems that operator has a different behavior from the 3scale cli
https://github.com/3scale/3scale-operator/blob/4e7d68b1cc2068d8f78e3506af35f6170c672f66/controllers/capabilities/applicationauth_controller.go#L251-L255
Further information:
- Red Hat Integration - 3scale 0.12.2 provided by Red Hat
- update channel - threescale-2.15
We are also running into the issue in 11884 when trying to set the app-id and it's a pretty big blocker. Are there timelines about when the fix might be merged and ready on openshift? Thank you.
@dcheng1248 The current plan is 2.17. Depending on the extent of the changes needed, we will decide whether or not to backport to 2.16
@tkan145 thank you for the information. Is inclusion of app-id/app-key also planned for 2.17? This is also covered in issue-1042.
If it is helpful, I'd be happy to do a PR for that. We quite need this for our workflow. Thanks a lot!
@dcheng1248 yes inclusion of app-id/app-key is also currently planed for 2.17.
Thanks for the offer, however we need to merge a few things before we can review #1042. I'll contact you for a review once the PR is up (soon).