]
Sebastian Łaskawiec updated ISPN-6258:
--------------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 8.2.0.CR1
8.2.0.Final
Resolution: Done
Authorication can fail with NPE when no subject is provided
-----------------------------------------------------------
Key: ISPN-6258
URL:
https://issues.jboss.org/browse/ISPN-6258
Project: Infinispan
Issue Type: Bug
Components: Security
Reporter: Vojtech Juranek
Assignee: Vojtech Juranek
Fix For: 8.2.0.CR1, 8.2.0.Final
When user's subject is null, authorization on secured cache can fail with NPE bellow,
instead of logging {{SecurityException}}
{noformat}
15:14:47,795 ERROR [org.infinispan.server.hotrod.HotRodEncoder] (HotRodServerWorker-9-1)
ISPN005022: Exception writing response with messageId=2: java.lang.NullPointerException
at
org.infinispan.security.impl.CachePrincipalPair.<init>(CachePrincipalPair.java:17)
at
org.infinispan.security.impl.AuthorizationHelper.checkSubjectPermissionAndRole(AuthorizationHelper.java:103)
at
org.infinispan.security.impl.AuthorizationHelper.checkPermission(AuthorizationHelper.java:76)
at
org.infinispan.security.impl.AuthorizationManagerImpl.checkPermission(AuthorizationManagerImpl.java:37)
{noformat}