[Bug 63982] CombinedRealm makes assumptions about principal implementation

2020-08-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #9 from Michael Osipov  ---
(In reply to Ole Ostergaard from comment #8)
> I'm hit by the upcoming removal of Realm#getRoles(). I was using the
> Realm#getRoles() to get the Roles of a Principal. Is there an alternate way
> to perform this action, in regard of the upcoming removal of the function in
> Realm?

Do what I do cast Principal object to your principal implementation and invoke
your #getRoles() there:
http://tomcatspnegoad.sourceforge.net/xref/net/sf/michaelo/tomcat/realm/ActiveDirectoryPrincipal.html#L134

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2020-08-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #8 from Ole Ostergaard  ---
I'm hit by the upcoming removal of Realm#getRoles(). I was using the
Realm#getRoles() to get the Roles of a Principal. Is there an alternate way to
perform this action, in regard of the upcoming removal of the function in
Realm?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2019-12-06 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

Michael Osipov  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 CC||micha...@apache.org

--- Comment #7 from Michael Osipov  ---
Fixed in:
- master for 9.0.30 onwards
- 8.5.x for 8.5.50 onwards
- 7.0.x for 7.0.99 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2019-12-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #6 from Mark Thomas  ---
(In reply to Michael Osipov from comment #5)

> Even if the behavior is not documented and an implementation detail? How
> would you properly call #getRoles() from the CombinedRealm then?

I wouldn't. I'd leave it alone. It isn't used internally in Tomcat and in case
someone is using it, I don't want to change the API/behaviour. I'd just mark it
as deprecated so no-one new starts using it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2019-12-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #5 from Michael Osipov  ---
(In reply to Mark Thomas from comment #4)
> (In reply to Michael Osipov from comment #3)
> > Even if, it has to be supported until Tomcat 10. Do you consider returning
> > null is better here? That would make like in CombinedRealm easier.
> 
> It has to be present until Tomcat 10. The code is unused (by Tomcat). I
> think it is better to leave the code as is - apart from adding a deprecation
> marker. I don't think now is the time to be changing the behaviour of that
> method.

Even if the behavior is not documented and an implementation detail? How would
you properly call #getRoles() from the CombinedRealm then?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2019-12-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #4 from Mark Thomas  ---
(In reply to Michael Osipov from comment #3)
> Even if, it has to be supported until Tomcat 10. Do you consider returning
> null is better here? That would make like in CombinedRealm easier.

It has to be present until Tomcat 10. The code is unused (by Tomcat). I think
it is better to leave the code as is - apart from adding a deprecation marker.
I don't think now is the time to be changing the behaviour of that method.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2019-12-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #3 from Michael Osipov  ---
(In reply to Mark Thomas from comment #2)
> I think getRoles() can be deprecated. It isn't used anywhere now. It was
> added to support the failed GSoC JASPIC work.

Even if, it has to be supported until Tomcat 10. Do you consider returning null
is better here? That would make like in CombinedRealm easier.

> The proposed solution for hasRole() looks reasonable to me.

Fine.

I will work on this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2019-12-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #2 from Mark Thomas  ---
I think getRoles() can be deprecated. It isn't used anywhere now. It was added
to support the failed GSoC JASPIC work.

The proposed solution for hasRole() looks reasonable to me.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63982] CombinedRealm makes assumptions about principal implementation

2019-12-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63982

--- Comment #1 from Remy Maucherat  ---
It is obvious reading the code in the realm package that it is assumed
GenericPrincipal will have to be used, so that applies to this hypothetical
CustomRealm as well. Of course, there are plenty of people out there who are
actively looking for trouble :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org