RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged [v7]
Jayashree Huttanagoudar
duke at openjdk.org
Tue Aug 16 14:59:27 UTC 2022
On Tue, 16 Aug 2022 14:50:11 GMT, Weijun Wang <weijun at openjdk.org> wrote:
> > Ok. But the change what I had for LoginContext.java in this commit was not appropriate : [13a51a6](https://github.com/openjdk/jdk/commit/13a51a6d2e026225ec8ac9f1516c7f709c72ce08) right?
>
> No. If you only put the reason inside an exception but the overall login succeeds, this exception is dismissed and will not show up anywhere.
>
> You just need to add an extra `le.printStackTrace()` call next to the existing "[LoginContext]: login OPTIONAL failure" output. Then no matter if the overall login succeeds or not you can always find it in the debug output.
That means in the source code here: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/javax/security/auth/login/LoginContext.java#L881 ?
-------------
PR: https://git.openjdk.org/jdk/pull/9159
More information about the security-dev
mailing list