-
Notifications
You must be signed in to change notification settings - Fork 36
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
CASSANDRASC-141: Mutual TLS Authentication and Authorization to Sidecar #131
base: trunk
Are you sure you want to change the base?
Conversation
Patch by Raymond Welgosh; Reviewed by TBD for CASSANDRASC-141
requireNonNullElse only available for java9 and up
void testSidecarSpecificPermissions() | ||
{ | ||
|
||
} |
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.
Pending/incomplete test?
if (conf.authenticatorConfiguration() != null && | ||
conf.authenticatorConfiguration().authConfig() != null && | ||
conf.authorizerConfiguration().authConfig().equals(AuthorizerConfig.MutualTlsAuthorizer)) | ||
{ | ||
authProvider = new MutualTlsAuthorizationProvider(permissionsAccessor); | ||
} | ||
else if (conf.authenticatorConfiguration() != null && | ||
conf.authenticatorConfiguration().authConfig() != null && | ||
conf.authorizerConfiguration().authConfig().equals(AuthorizerConfig.AllowAllAuthorizer)) |
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.
Checking for the wrong configuration. Should be authZ
and not authN
.
- This can be implemented as a switch statement over Enums instead after the initial checks. Also apply to other config providers.
- authZ provider can be served/injected by it's own provider method.
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.
Note: Addressed this in my most recent commit to your branch. Just has some minor refactoring of enums and defaults.
b520cc3
to
6b9ec2c
Compare
Patch by Raymond Welgosh; Reviewed by TBD for CASSANDRASC-141