-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
RHDG 8.4.6 GA
-
None
A NullPointerException is not user friendly to get the root cause.
If i.e. a HotRod client will not enable security:
If the configuration is the default it will fail if the client is not authenticated
ISPN005003: Exception reported java.lang.SecurityException: ISPN006017: Operation 'EXEC' requires authentication
If the configuration of endpoint will not contain a securit-real it fail to start (if there is still authorization enabled):
ISPN005003: Exception reported java.lang.SecurityException: ISPN006017: Operation 'EXEC' requires authentication
But if the configuration is partially without authentication it could fail
— config
<endpoint socket-binding="default">
<hotrod-connector/>
<rest-connector>
<authentication security-realm="default" mechanisms="BASIC DIGEST"/>
</rest-connector>
</endpoint>
-------
— Exception
2024-03-25 13:56:30,078 ERROR (non-blocking-thread--p2-t16) [org.infinispan.server.hotrod.BaseRequestProcessor] ISPN005003: Exception reported org.infinispan.commons.CacheException: Cannot invoke "javax.security.auth.Subject.getPrincipals()" because "subject" is null
at org.infinispan.server.core.admin.AdminOperationsHandler.lambda$runTask$1(AdminOperationsHandler.java:55)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "javax.security.auth.Subject.getPrincipals()" because "subject" is null
at org.infinispan.security.impl.Authorizer.computeSubjectACL(Authorizer.java:157)
at org.infinispan.security.impl.Authorizer.getPermissions(Authorizer.java:126)
at org.infinispan.security.impl.AuthorizationManagerImpl.getPermissions(AuthorizationManagerImpl.java:69)
at org.infinispan.manager.DefaultCacheManager.getAccessibleCacheNames(DefaultCacheManager.java:999)
at org.infinispan.server.core.admin.embeddedserver.CacheNamesTask.execute(CacheNamesTask.java:32)
at org.infinispan.server.core.admin.embeddedserver.CacheNamesTask.execute(CacheNamesTask.java:19)
at org.infinispan.server.core.admin.AdminServerTask.execute(AdminServerTask.java:57)
at org.infinispan.server.core.admin.AdminOperationsHandler.lambda$runTask$0(AdminOperationsHandler.java:51)
at org.infinispan.security.Security.doAs(Security.java:142)
at org.infinispan.server.core.admin.AdminOperationsHandler.lambda$runTask$1(AdminOperationsHandler.java:51)
... 6 more