OIDC JWT access token attributes missing after migration to v. 6.6.15.2

306 views
Skip to first unread message

Udo Einspanier

unread,
Jul 29, 2024, 8:33:40 PM7/29/24
to CAS Community
Hi everyone,

we are using CAS as OIDC server and return the accessToken as JWT in the authentication response. We just tried to upgrade from 6.6.2 to 6.6.15.2.
But now all the CAS authentication-related attributes that were previously part of the JWT access token are missing. and only the attributes returned during attribute resolution are still there. E.g. these attributes are now missing:

{
  "surrogateUser": "yyy",
  "longTermAuthenticationRequestTokenUsed": false,
  "surrogateEnabled": "true",
  "isFromNewLogin": true,
  "authenticationDate": "2024-07-29T12:44:57.359913Z",
  "surrogatePrincipal": "xxx",
  "successfulAuthenticationHandlers": "QueryDatabaseAuthenticationHandler",
   "credentialType": "SurrogateUsernamePasswordCredential",
  "authenticationMethod": "QueryDatabaseAuthenticationHandler",
  ...
}

From these, we require the surrogate* attributes.
Is it the intended behavior that these attributes are missing now? Is there any configuration setting to get them back into the JWT access token?

Thanks,
Udo

Jorge Bastida Cano

unread,
Jul 30, 2024, 3:18:47 AM7/30/24
to CAS Community, Udo Einspanier
Same problem here. This does not happen to us with version 6.6.15.1.
any solution for 6.6.15.2?

Jorge Bastida Cano

unread,
Sep 4, 2024, 6:41:42 AM9/4/24
to CAS Community, Jorge Bastida Cano, Udo Einspanier
hello, I'm still stuck on this. any ideas?

Udo Einspanier

unread,
Sep 4, 2024, 8:42:36 AM9/4/24
to CAS Community, Jorge Bastida Cano, Udo Einspanier
Same problem here. Unfortunately, I have not found a solution yet. Maybe you could create a your own Groovy attribute resolver and release these as other attributes. But I have not tried it any workarounds yet. Still hoping for an easier solution.

Udo Einspanier

unread,
May 28, 2025, 3:31:26 AM5/28/25
to CAS Community, Udo Einspanier, Jorge Bastida Cano
Hi,

just wanted to check if anyone has updates on this issue. Has it been addressed in newer versions? Or is it no longer possible to get the surrogate authentication attributes into the JWT via configuration?

Best regards,
Udo

Stef

unread,
May 28, 2025, 3:57:34 AM5/28/25
to cas-...@apereo.org, Udo Einspanier, Jorge Bastida Cano
Does your app request openid scope ?

Your problem looks related to this fix
https://apereo.github.io/2024/06/26/oidc-vuln/

--
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/c668dd93-9e94-4ecf-8533-ef188ffdd7c8n%40apereo.org.

Udo Einspanier

unread,
May 28, 2025, 9:21:03 AM5/28/25
to CAS Community, Stef, Udo Einspanier, Jorge Bastida Cano
Hi Stef,

thanks a lot for the reference. Yes, the app requests openid scope, so indeed it could be related. Do you know if there is some documentation how to release the surrogate attributes in the JWT again? Otherwise, I will check the code changes.

Best regards,
Udo

Stef

unread,
May 28, 2025, 12:01:59 PM5/28/25
to cas-...@apereo.org, Udo Einspanier, Jorge Bastida Cano
Have you tried to explicitly release these attributes in your service definition ?

Jonathon Taylor

unread,
May 29, 2025, 11:41:40 PM5/29/25
to cas-...@apereo.org, Udo Einspanier, Jorge Bastida Cano
I believe this was a security-related change with the latest 6.6.  For the 'non-standard' attributes that aren't already part of the OIDC spec you will need to do something like the example below.  You can add that in addition to the scope releases. 

"attributeReleasePolicy": { "@class": "org.apereo.cas.oidc.claims.OidcScopeFreeAttributeReleasePolicy", "allowedAttributes" : [ "java.util.ArrayList", [ "surrogateUser", "surrogatePrincipal", "surrogateEnabled" ] ] },

Udo Einspanier

unread,
May 30, 2025, 1:52:35 AM5/30/25
to CAS Community, Jonathon Taylor, Udo Einspanier, Jorge Bastida Cano
Thanks a lot for the feedback! I will try it out asap.
Reply all
Reply to author
Forward
0 new messages