frankgh commented on code in PR #250:
URL: https://github.com/apache/cassandra-sidecar/pull/250#discussion_r2316784325
##########
server/src/main/java/org/apache/cassandra/sidecar/acl/authentication/JwtAuthenticationHandlerFactory.java:
##########
@@ -65,4 +66,16 @@ protected JwtParameters parameterParser(Map<String, String>
parameters)
{
return new JwtParameterExtractor(parameters);
}
+
+ @Override
+ public void validatePrerequisites(SidecarConfiguration
sidecarConfiguration) throws ConfigurationException
+ {
+ boolean isSidecarSchemaEnabled =
sidecarConfiguration.serviceConfiguration()
+
.schemaKeyspaceConfiguration()
+ .isEnabled();
+ if (!isSidecarSchemaEnabled)
+ {
+ throw new ConfigurationException("JwtAuthenticationHandlerFactory
requires Sidecar schema to be enabled for role processing");
+ }
Review Comment:
I don't think it makes sense to have this in the interface, because you
don't know if the implementation requires sidecar schema. It only makes sense
to have this check if you require sidecar schema for the implementation
--
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]