Details
-
Bug
-
Status: Closed
-
Major
-
Resolution:
Out of Date
-
6.0.1
-
-
NEW
-
NEW
Description
The Tomcat 8 adapter distributed with Keycloak 6.0.1 does not appear to work properly with Keycloak. If the user is assigned any realm roles or client roles, the following Jackson exception is thrown and authentication into the webapp fails.
The Tomcat log file will log the following error:
org.keycloak.adapters.OAuthRequestAuthenticator.resolveCode failed verification of token: Failed to read access token from JWT
The actual cause of this error will be the following exception:
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `org.keycloak.representations.AccessToken$Access` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('[offline_access, uma_authorization]') at [Source: (byte[])"{"jti":"aab616ac-bad6-450d-b912-a6753df668c8","exp":1564415320,"nbf":0,"iat":1564412320,"iss":"http://app.example.org:8080/auth/realms/myrealm","aud":"account","sub":"19c4c859-e062-4528-b176-3a17caf443af","typ":"Bearer","azp":"myapp","auth_time":1564412288,"session_state":"5e393888-c788-406a-8ee2-6ef8020fbfea","acr":"0","realm_access":{"roles":["offline_access","uma_authorization"]},"resource_access":{"account":{"roles":["manage-account","manage-account-links","view-profile"]}},"sco"[truncated 297 bytes]; line: 1, column: 565] (through reference chain: org.keycloak.representations.AccessToken["realm_access"])