Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: allow refresh flow for public usages #2402

Merged
merged 16 commits into from
Jul 25, 2023
Merged

Conversation

strehle
Copy link
Member

@strehle strehle commented Jul 12, 2023

Only if

  1. token before was created without client authentication (public flow + PKCE)
  2. jwt.refresh.rotate = true , means refresh tokens are rotated

Should solve issue #2138

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/185598571

The labels on this github issue will be updated when the story is started.

@strehle strehle linked an issue Jul 12, 2023 that may be closed by this pull request
@strehle strehle added this to the 76.17.0 milestone Jul 12, 2023
@strehle strehle added the in_review The PR is currently in review label Jul 14, 2023
@strehle
Copy link
Member Author

strehle commented Jul 15, 2023

Test can be done with
Use UAA from branch https://github.com/cloudfoundry/uaa/tree/feature/issue/test-2138
./gradlew run

-> rotate is active and we have RS256 key

Use standard go or spring boot
go: https://github.com/strehle/cmdline-openid-client -> make -> ~/openid-client -issuer http://localhost:8080/uaa/oauth/token -client_id login -port 7000 -refresh

spring boot: https://github.com/strehle/spring-openid-client -> ./start.sh

Both tools / examples use standard oauth2 implementations from vendor and both support public usage with automatic PKCE support.

if you change uaa.yaml rotate to false, then both tools must show an error in refresh. The access_token (and refresh JWT if you have jwt) show client_auth_method with none, ID-token not, ID token shows only acr values, which is similar , an information about the authentication context of the user, e.g. if 2 factor was used etc...

@strehle
Copy link
Member Author

strehle commented Jul 19, 2023

@Tallicia FYI This feature is now ready for review and you can also do a end to end , see
#2402 (comment)

@Tallicia
Copy link
Contributor

Thanks for the notice @strehle , @swalchemist Is this something you can put on your todo list as tribute?

@swalchemist
Copy link
Contributor

I've started reviewing the code - - looking pretty good so far.

@strehle strehle removed this from the 76.17.0 milestone Jul 20, 2023
@strehle strehle added this to the 76.18.0 milestone Jul 20, 2023
@strehle strehle requested a review from swalchemist July 21, 2023 13:51
@strehle
Copy link
Member Author

strehle commented Jul 21, 2023

@strehle
Copy link
Member Author

strehle commented Jul 24, 2023

@swalchemist , did you had the chance to check my new commits ? from my side your requests were solved, I am not sure if I should / can close the conversions here in github review?

@strehle strehle added java Pull requests that update Java code and removed in_review The PR is currently in review labels Jul 25, 2023
@strehle strehle merged commit 3b29d85 into develop Jul 25, 2023
20 checks passed
@strehle strehle deleted the feature/issue/2138 branch July 25, 2023 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java Pull requests that update Java code
Projects
Development

Successfully merging this pull request may close these issues.

Enable refresh_token usage for public clients
4 participants