THREESCALE-11081 The ability to set the application_id & application_key in the application CRD creation#1129
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.
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.
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.
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