cklein05 commented on a change in pull request #428:
URL: https://github.com/apache/tomcat/pull/428#discussion_r654975580
##########
File path: java/org/apache/catalina/realm/DataSourceRealm.java
##########
@@ -107,6 +134,22 @@
private volatile boolean connectionSuccess = true;
+ /**
+ * The comma separated names of user attributes to additionally query from
the
+ * user table. These will be provided to the user through the created
+ * Principal's <i>attributes</i> map.
+ */
+ protected String userAttributes;
Review comment:
This implementation parses and validates _lazily_ on the first
authentication attempt. With DataSourceRealm, I actually do not need an array
or a collection but only a proper SQL statement. Of course, that is built from
a parsed and validated (temporary) list (using `split()`...). However, I
validate requested attributes and emit log messages for every invalid
attribute. I can't do that in the setter, since `containerLog` is still null
when the setter is invoked while the component gets initialized. So I would end
with only parsing in the setter and still need to validate lazily on the first
authentication attempt.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]