jcshepherd commented on code in PR #4773:
URL: https://github.com/apache/cassandra/pull/4773#discussion_r3150619427
##########
src/java/org/apache/cassandra/auth/AuthConfig.java:
##########
@@ -110,29 +141,19 @@ public static void applyAuth()
// network authorizer
INetworkAuthorizer networkAuthorizer =
authInstantiate(conf.network_authorizer, AllowAllNetworkAuthorizer.class);
-
- if (networkAuthorizer.requireAuthorization() &&
!authenticator.requireAuthentication())
- {
- throw new ConfigurationException(conf.network_authorizer + " can't
be used with " + conf.authenticator.class_name, false);
- }
-
+ validateAuthenticatorNetworkAuthorizerCompatibility(authConfig,
networkAuthorizer);
DatabaseDescriptor.setNetworkAuthorizer(networkAuthorizer);
// cidr authorizer
ICIDRAuthorizer cidrAuthorizer = authInstantiate(conf.cidr_authorizer,
AllowAllCIDRAuthorizer.class);
-
- if (cidrAuthorizer.requireAuthorization() &&
!authenticator.requireAuthentication())
- {
- throw new ConfigurationException(conf.cidr_authorizer + " can't be
used with " + conf.authenticator, false);
- }
-
+ validateAuthenticatorCIDRAuthorizerCompatibility(authConfig,
cidrAuthorizer);
DatabaseDescriptor.setCIDRAuthorizer(cidrAuthorizer);
// Validate at last to have authenticator, authorizer, role-manager
and internode-auth setup
// in case these rely on each other.
- authenticator.validateConfiguration();
+ authConfig.defaultAuthenticator.validateConfiguration();
Review Comment:
Should be invoked on all authenticators, not just the default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]