eclipse-ee4j / eclipse-ee4j/exousia
NPE in DefaultPolicy
- Dominant language
- Java
- Stars
- 14
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
We are trying to update to GlassFish 8 / Payara 7 (embedded-all) but we hit a NPE with the following stack in exousia in both of them:
```
java.lang.NullPointerException: Cannot invoke "jakarta.security.jacc.PolicyConfiguration.getExcludedPermissions()" because the return value of "jakarta.security.jacc.PolicyConfigurationFactory.getPolicyConfiguration()" is
null
at org.glassfish.exousia.modules.def.DefaultPolicy.isExcluded(DefaultPolicy.java:50)
at jakarta.security.jacc.Policy.implies(Policy.java:53)
at org.glassfish.exousia.AuthorizationService.checkPermission(AuthorizationService.java:550)
at org.glassfish.exousia.AuthorizationService.checkWebRoleRefPermission(AuthorizationService.java:463)
at com.sun.enterprise.security.ee.authorization.WebAuthorizationManagerService.hasRoleRefPermission(WebAuthorizationManagerService.java:436)
at com.sun.web.security.RealmAdapter.hasRole(RealmAdapter.java:1104)
at org.apache.catalina.connector.Request.isUserInRole(Request.java:2772)
at org.apache.catalina.connector.RequestFacade.isUserInRole(RequestFacade.java:814)
...
```
The user is authenticated in a jdbc realm (with `httpServletRequest.login(...)`) and then we are retrieving the roles with `httpServletRequest.isUserInRole(...)` and the following NPE shows up. Those calls are done in a remote EJB that is deployed with glassfish/payara-embedded-all.
The JACC provider is configured like this in the `domain.xml`:
```xml
```
Note that we don't have this exception with GlassFish 7 / Payara 6.
Thanks & best regards,
Cedric
Contributor guide
Assessment
This issue has not been assessed yet.