-
Notifications
You must be signed in to change notification settings - Fork 5
CLOUDP-314901 OIDC CRD changes + validation #50
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
base: master
Are you sure you want to change the base?
Conversation
713d6d2
to
7c23143
Compare
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, one small comment to the URL parse func.
@@ -801,6 +807,22 @@ func (s *Security) IsTLSEnabled() bool { | |||
return s.CertificatesSecretsPrefix != "" | |||
} | |||
|
|||
func (s *Security) IsOIDCEnabled() bool { |
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.
nit, also just an opinion:
func (s *Security) IsOIDCEnabled() bool { | |
func (s *Security) IsOIDCEnabled() bool { | |
if s == nil || s.Authentication == nil || !s.Authentication.Enabled { | |
return false | |
} | |
return s.Authentication.IsOIDCEnabled() | |
} |
return v1.ValidationSuccess() | ||
} | ||
} | ||
|
||
func ldapAuthRequiresEnterprise(d DbCommonSpec) v1.ValidationResult { |
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.
Do we need this check for OIDC as well?
Summary
Adding new
OIDCProviderConfig
struct toAuthentication
struct and new AuthModeOIDC
.Security.Authentication
struct is reused also in AppDBSpec it will be available there as well. It will be as usual overridden inmongodb-kubernetes/api/v1/om/opsmanager_types.go
Line 622 in f0050b8
I believe it is worth noting this behaviour, but not change it as part of this project.
Proof of Work
New Unit test that verify validation and another set of webhook tests are under way.
Next steps
Checklist
Reminder (Please remove this when merging)