Re: Enhancement: Additional user attributes queried by (some) realms

2021-06-01 Thread Martin Grigorov
On Tue, Jun 1, 2021 at 12:46 PM Carsten Klein wrote: > > > On 01/06/2021 10:18, Mark Thomas wrote: > > > I don't know if you can. I suspect not. By all means see if you can. I'm > > mildly curious to find out the answer. Whether you can or not, you don't > > need to. > > I found nothing to

Re: Enhancement: Additional user attributes queried by (some) realms

2021-06-01 Thread Carsten Klein
On 01/06/2021 10:18, Mark Thomas wrote: I don't know if you can. I suspect not. By all means see if you can. I'm mildly curious to find out the answer. Whether you can or not, you don't need to. I found nothing to re-trigger the Travis CI build so far. However, now the CI test is

Re: Enhancement: Additional user attributes queried by (some) realms

2021-06-01 Thread Mark Thomas
On 01/06/2021 08:39, Carsten Klein wrote: Mark, On 01/06/2021 09:28, Mark Thomas wrote: We have been seeing that a lot lately. As far as I can tell, it is an issue with Travis CI. Can you use the PR anyway? Yes. We don't have a strict CI must pass rule. Whether or not a PR is applied a

Re: Enhancement: Additional user attributes queried by (some) realms

2021-06-01 Thread Carsten Klein
Mark, On 01/06/2021 09:28, Mark Thomas wrote: We have been seeing that a lot lately. As far as I can tell, it is an issue with Travis CI. Can you use the PR anyway? Can/must I re-trigger the Travis build? Carsten - To

Re: Enhancement: Additional user attributes queried by (some) realms

2021-06-01 Thread Mark Thomas
On 29/05/2021 13:28, Carsten Klein wrote: Mark, On 27/05/2021 18:56, Carsten Klein wrote: Concerning removal of class UserDatabaseRealm.UserDatabasePrincipal: I will provide a PR and file a corresponding issue in Bugzilla soon. My PR and Bugzilla issue are present. However,  Travis CI

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-31 Thread Carsten Klein
Chris, On 28/05/2021 23:16, Christopher Schultz wrote: Yeah, about that... https://openjdk.java.net/jeps/411 IMO this is a Bad Thing for Java. If someone was looking for a reason to abandon the whole Java ecosystem, this would be it. Well, we had a good run. Now we can all run

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-29 Thread Carsten Klein
Mark, On 27/05/2021 18:56, Carsten Klein wrote: Concerning removal of class UserDatabaseRealm.UserDatabasePrincipal: I will provide a PR and file a corresponding issue in Bugzilla soon. My PR and Bugzilla issue are present. However, Travis CI build failed on arm64 architecture for the PR

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-28 Thread Christopher Schultz
Mark, On 5/28/21 04:13, Mark Thomas wrote: On 28/05/2021 07:22, Carsten Klein wrote: Chris, Mark, On 27/05/2021 22:11, Christopher Schultz wrote: After re-reading this, you mentioned reflection while asking how much we trust in Collections.unmodifiableMap(). I didn't get that right, my

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-28 Thread Christopher Schultz
Carsten, On 5/28/21 01:48, Carsten Klein wrote: Chris, Mark, On 27/05/2021 22:11, Christopher Schultz wrote: What's the primary use-case for these kinds of attributes? This has been described in detail here:

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-28 Thread Mark Thomas
On 28/05/2021 07:22, Carsten Klein wrote: Chris, Mark, On 27/05/2021 22:11, Christopher Schultz wrote: After re-reading this, you mentioned reflection while asking how much we trust in Collections.unmodifiableMap(). I didn't get that right, my bad. However, I thought of reflection in

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-28 Thread Carsten Klein
Chris, Mark, On 27/05/2021 22:11, Christopher Schultz wrote: After re-reading this, you mentioned reflection while asking how much we trust in Collections.unmodifiableMap(). I didn't get that right, my bad. However, I thought of reflection in order to implement a deep copy mechanism.

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Carsten Klein
Chris, Mark, On 27/05/2021 22:11, Christopher Schultz wrote: What's the primary use-case for these kinds of attributes? This has been described in detail here: http://mail-archives.apache.org/mod_mbox/tomcat-users/202104.mbox/ajax/%3Cb9a2a913-f00f-f5bf-ca05-8ea4f8663ca9%40datagis.com%3E

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Christopher Schultz
Mark, On 5/27/21 12:22, Mark Thomas wrote: On 27/05/2021 15:04, Christopher Schultz wrote: Mark, On 5/27/21 04:59, Mark Thomas wrote: On 27/05/2021 07:32, Carsten Klein wrote: On 26/05/2021 19:56, Mark Thomas wrote: Given that the attributes may well be security related, you would need to

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Michael Osipov
You read my mind. I always wanted to report this, but never find time. Implemented this for our realm and principal years ago: http://tomcatspnegoad.sourceforge.net/apidocs/net/sf/michaelo/tomcat/realm/ActiveDirectoryPrincipal.html#getAdditionalAttributes-- The entire principal should be

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Carsten Klein
Mark, On 27/05/2021 18:19, Mark Thomas wrote: I will note that it isn't uncommon to have to log out and back in again to pick up newly allocated groups/roles in other environments. Yes, you are right. Didn't see it that way so far. We're talking about live updates for a session during its

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Mark Thomas
On 27/05/2021 15:04, Christopher Schultz wrote: Mark, On 5/27/21 04:59, Mark Thomas wrote: On 27/05/2021 07:32, Carsten Klein wrote: On 26/05/2021 19:56, Mark Thomas wrote: Given that the attributes may well be security related, you would need to make sure neither the Map nor any of the

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Mark Thomas
On 27/05/2021 12:49, Carsten Klein wrote: On 27/05/2021 10:59, Mark Thomas wrote: As far as I can tell, removing UserDatabasePrincipal, relying on GenericPrincipal and User remaining an internal object not exposed via the Servlet API would achieve the same result with less code. At this

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Christopher Schultz
Mark, On 5/27/21 04:59, Mark Thomas wrote: On 27/05/2021 07:32, Carsten Klein wrote: On 26/05/2021 19:56, Mark Thomas wrote: Given that the attributes may well be security related, you would need to make sure neither the Map nor any of the keys/values could be modified. Protecting the Map

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Carsten Klein
On 27/05/2021 10:59, Mark Thomas wrote: As far as I can tell, removing UserDatabasePrincipal, relying on GenericPrincipal and User remaining an internal object not exposed via the Servlet API would achieve the same result with less code. At this point I am looking for a reason not to

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Mark Thomas
On 27/05/2021 07:32, Carsten Klein wrote: On 26/05/2021 19:56, Mark Thomas wrote: Given that the attributes may well be security related, you would need to make sure neither the Map nor any of the keys/values could be modified. Protecting the Map is easy. Protecting the keys/values is a

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-27 Thread Carsten Klein
Hi Mark, thanks for sharing your ideas :) On 26/05/2021 19:56, Mark Thomas wrote: Given that the attributes may well be security related, you would need to make sure neither the Map nor any of the keys/values could be modified. Protecting the Map is easy. Protecting the keys/values is a

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-26 Thread Mark Thomas
On 26/05/2021 18:56, Mark Thomas wrote: On 26/05/2021 12:00, Carsten Klein wrote: Why does UserDatabaseRealm pass a userPrincipal of type UserDatabasePrincipal? Can't we just drop that and do it like JNDIRealm or DataSourceRealm? I don't see any obvious reason. I'll do some digging in

Re: Enhancement: Additional user attributes queried by (some) realms

2021-05-26 Thread Mark Thomas
On 26/05/2021 12:00, Carsten Klein wrote: 1. How to access the Principal's new attributes Simplest is to provide a getter method, that actually returns the map (optionally with a read-only parameter): Given that the attributes may well be security related, you would need to make sure

Enhancement: Additional user attributes queried by (some) realms

2021-05-26 Thread Carsten Klein
Hi there, as already discussed here: http://mail-archives.apache.org/mod_mbox/tomcat-users/202104.mbox/ajax/%3Cb9a2a913-f00f-f5bf-ca05-8ea4f8663ca9%40datagis.com%3E I'm implementing an enhancement for querying configurable extra user attributes through some of the Realm classes from the "user