-
Notifications
You must be signed in to change notification settings - Fork 100
THREESCALE-11081 The ability to set the application_id & application_key in the application CRD creation #1129
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
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
@dcheng1248 would you able to give this PR a quick look and let me know if it meets your requirements? |
|
|
||
| func validateSecretForAuthModeAppIDAppKey(s *corev1.Secret) error { | ||
| if _, ok := s.Data[CredentialSecretKeyNameAppID]; !ok { | ||
| return fmt.Errorf("secret %s used as user-key authentication mode, but lacks %s key", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the error message should say appid/appkey as authentication mode (not user-key), and the lacking key should be appid/appkey instead of userkey. Same issue for OIDC validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks for the review, much appreciated!
|
@tkan145 I cannot test the operator directly on our cluster, but based on the code it would indeed solve our issue, thanks for the work! |
eguzki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just for cuiosity, if I change the secret, the 3scale application gets updated as well?
|
The application ID is a one-time assignment. Once generated, it cannot be modified; you must delete and then recreate the application to change it. If you need to change the key, then we have ApplicationAuth CR for that. If you change the secret, the operator will still read the secret but won't do anything unless: |
Makes sense, thanks for the explanation |
What
THREESCALE-11081
Close #1042
Verification steps
Details
testApptestApp2application underproduct1withUserKeyset totestkeytestApp3application withproduct2withApplication ID/Application Keyset tosomething