add privileged block in logout#22244
Conversation
|
@glassfishrobot Run CI tests please |
|
Starting CI tests run |
|
This fix looks good, but I wonder if the privileged block can be moved down into the resetPolicyContext() method? If that method is private and used only by other RealmAdapter methods, that's a better implementation. If the method is public and potentially called by external callers, then the current placement is better/safer. (Not at my desk, so can't look for myself.) |
|
All CI tests successful |
|
I had a closer look at the code when I got back to my desk, and I think it would be better to put the That said, |
Fixes #22243
The issue stacktrace catches permission issue PolicyContextHandlerImpl.getInstance(), but PolicyContext.setContextID() also need setPolicy permissions as per javadoc
which why the doPrivileged for whole resetPolicyContext().