question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

id_token doesn't have claim `at_hash` in implicit flow

See original GitHub issue

What version of UAA are you running?

4.19.0

How are you deploying the UAA?

I am deploying the UAA

Used https://mvnrepository.com/artifact/org.cloudfoundry.identity/cloudfoundry-identity-uaa/4.19.2 war and deployed to tomcat

What did you do?

I’m using the Implicit flow with below http request

GET /uaa/oauth/authorize?client_id=ui&redirect_uri=http%3A%2F%2Flocalhost%3A9000%2Fcallback&response_type=id_token%20token&scope=openid%20ui.magic&state=35832a9a455d42779705dca17c6650ac&nonce=13a23b28f3d2447f951dddb8356df9a9 HTTP/1.1

After entering credentials in the login screen, it redirected to the url: http://localhost:9000/callback#token_type=bearer&access_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiIyMGQ2N2NiYjNkMzg0ZGMxOTYwNTdkMDdlZjBjMmIxMSIsIm5vbmNlIjoiMTNhMjNiMjhmM2QyNDQ3Zjk1MWRkZGI4MzU2ZGY5YTkiLCJzdWIiOiI2MjU5ZDEwZC1mNjZkLTQ3M2QtYmM0OS1iNjA3OWE1MjYyNDEiLCJzY29wZSI6WyJyZW1hcHBhcGkubGliX2FkbWluIiwib3BlbmlkIiwicmVtYXBwYXBpLnJzX2FkbWluIl0sImNsaWVudF9pZCI6InVpIiwiY2lkIjoidWkiLCJhenAiOiJ1aSIsInVzZXJfaWQiOiI2MjU5ZDEwZC1mNjZkLTQ3M2QtYmM0OS1iNjA3OWE1MjYyNDEiLCJvcmlnaW4iOiJsZGFwIiwidXNlcl9uYW1lIjoicmVtLWFsbCIsImVtYWlsIjoicmVtLWFsbEB1c2VyLmZyb20ubGRhcC5jZiIsImF1dGhfdGltZSI6MTUzMjYwNTg1MCwicmV2X3NpZyI6Im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WYwYzJiMTEiLCJwcmV2aW91c19sb2dvbl90aW1lIjoxNTMyNTk5NTA0NDkzLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImNsaWVudF9pZCI6InVpIiwiY2lkIjoidWkiLCJ1c2VyX25hbWUiOiJyZW0tYWxsIiwicmV2X3NpZyI6ImZkOTYyMTBmIiwidXNlcl9pZCI6IjYyNTlkMTBkLWY2NmQtNDczZC1iYzQ5LWI2MDc5YTUyNjI0MSIsImF1dGhfdGltZSI6MTUzMjYwNTg1MH0.nwmEyq4wxSSYl_bY6NXE8S1_DMkPFbSKOw8rzps6efkgDlMwvddSsxoN2hZZRLw90MbqCT77ljBDZ_wPBvuXzlsS_FEz3DHkMeo9gXNIr2zFLGfPJcCTSpotLaHea9a7P3nf_1VHwfIADD_9grqn1iJ17z_-gX1UaDZ3tMJgWKWN6j9WGQjnY5oZ3nGEcQU4TjR_tLOzOy5PhcPnH68Syf1PKgi-ARvHfkdZixfgQcHYGAZD16wwYUId8zuFHgp1tYhh8s9s54ANQjAQomvJayar9LuUjvS6_-oxssnoanz4LJ-cbIx9j3Y-v145Cphzws11MvmMObLnvtB1sisd4w&state=35832a9a455d42779705dca17c6650ac&expires_in=43199&scope=remappapi.lib_admin%20openid%20remappapi.rs_admin&nonce=13a23b28f3d2447f951dddb8356df9a9&jti=20d67cbb3d384dc196057d07ef0c2b11

What did you expect to see? What goal are you trying to achieve with the UAA?

I expected the id token to have ‘at_hash’ claim as per openid spec.

What did you see instead?

I don’t find at_hash claim in id_token.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DennisDenutocommented, Aug 7, 2018

Hi @vinaylakkam Thanks for creating this issue. You are correct, the spec does specify providing the at_hash claim when using the hybrid flow with id_token and access_token. It should also provide the c_hash when using the hybrid flow with id_token and code.

Can you share how this is affecting your usage of the UAA? Is token validation failing due to this missing claim?

0reactions
strehlecommented, Oct 27, 2022

support public + PKCE until a few hours ago

This was deliverd with https://github.com/cloudfoundry/uaa/releases/tag/v75.21.0 , e.g. https://github.com/cloudfoundry/uaa/pull/1888

The use of public with an UAA client needs to be configured, default is off , but you can use uaac https://github.com/cloudfoundry/cf-uaac/releases

The rotation of refresh tokens was then only consequence of public usage but also no requirment,

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth 2.0 implicit grant flow - The Microsoft identity platform
The defining characteristic of the implicit grant is that tokens (ID tokens or access tokens) are returned directly from the /authorize endpoint ...
Read more >
Implicit Flow with OIDC - Auth0
Learn how the OIDC-conformant pipeline affects the Implicit Flow. ... workflow if the application needs only an ID token to perform user authentication; ......
Read more >
Learn Authentication The Hard Way: Part Three - Andrew Best
It is one of the two flows we need to know to cover most of our application ... Client validates the ID token...
Read more >
OAuth Implicit Flow | Curity Identity Server
It is less secure than the Code Flow since it doesn't authenticate the client. But it is still a useful flow in web...
Read more >
Okta Groups or Attribute Missing from Id Token - Okta Support
This article explains why an Id token might have an attribute or Okta groups ... in implicit flow where response_type = id_token ,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found