I'm upgrading Payara from 4.1.1 to 4.1.2.181 and now I'm getting 401 when calling my Auth end point. My auth endpoint returns 200 (ok) but the calling application is getting 401 from Payara (as far as I can tell)
Parent pom.xml:
...
<dependency>
<groupId>fish.payara.extras</groupId>
<artifactId>payara-embedded-all</artifactId>
<version>4.1.2.181</version>
<scope>provided</scope>
</dependency>
...
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
<version>2.25</version>
<scope>test</scope>
</dependency>
Sub-project pom.xml
...
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.27</version>
<scope>provided</scope>
</dependency>
...
The problem goes away when I switch back to version 4.1.1
Please assist in how I can more information in the log file or a solution to this problem.
Updates
- This seems to be related to 4.1.2.181 using JWT?
- Added
<jaxrs-roles-allowed-enabled>false</jaxrs-roles-allowed-enabled>
toglassfisf-web.xml
only gives a warning in the log file I'm seeing the following in the log file:
Could not load service class fish.payara.appserver.roles.api.extension.RolesCDIExtension org.osgi.framework.BundleException: Unresolved constraint in bundle fish.payara.appserver.cdi-auth-roles [374]: Unable to resolve 374.0: missing requirement [374.0] osgi.wiring.package; (osgi.wiring.package=fish.payara.cdi.auth.roles)
I manage to switch on Jersey's tracing logging and got the following as the last trace in the log file:
[2018-07-17T14:41:02.968+0200] [Payara 4.1] [FINE] [] [org.glassfish.jersey.tracing.general] [tid: _ThreadID=28 _ThreadName=http-thread-pool::http-listener-1(2)] [timeMillis: 1531831262968] [levelValue: 500] [CLASSNAME: org.glassfish.jersey.message.internal.TracingLogger$TracingLoggerImpl] [METHODNAME: logImpl] [[ FINISHED Response status: 200/SUCCESSFUL|OK [ ---- ms]]]
Also found this: REST Resources secured with Jersey filter not accessible after upgrade from 174 to 181
Downgrading to Payara 4.1.2.174 works but might not be supported on the target server
Payara 4.1.2.174 is supported on the target server