8000 offline_access scope return always refresh_token by cgeorgilakis · Pull Request #10351 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

offline_access scope return always refresh_token - #10351

Closed
cgeorgilakis wants to merge 1 commit into
keycloak:mainfrom
eosc-kc:RCIAM-744-offline-token
Closed

cgeorgilakis wants to merge 1 commit into
keycloak:mainfrom
eosc-kc:RCIAM-744-offline-token

Conversation

@cgeorgilakis
Copy link
Copy Markdown
Contributor

Closes #10346

@cgeorgilakis
cgeorgilakis force-pushed the RCIAM-744-offline-token branch 3 times, most recently from 99ec788 to d28b88b Compare April 14, 2022 10:29
@cgeorgilakis
cgeorgilakis force-pushed the RCIAM-744-offline-token branch from a18787d to 3b33f6b Compare April 15, 2022 12:23
@stianst stianst added team/core area/oidc OpenID Connect / OAuth 2.0 — tokens, endpoints, scopes, DCR, PAR, DPoP labels Aug 30, 2023
@cgeorgilakis
Copy link
Copy Markdown
Contributor Author

@rmartinc This PR is related with your comment in my PR.
Based on OpenID Connect specification refresh token must always be returned in authorization code.

@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Offline-token is special type of refresh token. Hence if the switch Use Refresh Token is disabled, then any kind of refresh tokens should not be allowed. This means both "regular" refresh tokens as well as offline tokens.

The client switch Use refresh tokens currently maps to the OIDC client registration parameter value refresh_token being present in the property grant_types (See DescriptionConverter class for some additional context). It would be strange to allow offline tokens, but at the same time, not returning refresh_token in the grant_types .

What exactly is the actual use-case? Is it that for client foo, you want to allow offline tokens, but you do not want "regular" refresh tokens? If yes, it can be good to either:

  • introduce dedicated switch on the client (EG. Allow refresh request only for offline)
  • introduce client-policy executor implementation to the client policies, which will allow some configuration for some flexibility (EG. executor will have configuration switches like Allow regular refresh tokens and allow offline refresh tokens. This may allow that former is disabled and latter is enabled to support the use-case like "Allow refresh tokens just if they are offline tokens")

@mposolda
Copy link
Copy Markdown
Contributor

@cgeorgilakis Closing (Please see my last comment for the details). Feel free to open new PR if this is still relevant for you. Please see my last comment for additional details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
7428

Labels

area/oidc OpenID Connect / OAuth 2.0 — tokens, endpoints, scopes, DCR, PAR, DPoP team/core-protocols

Projects

None yet

Development

Successfully merging this pull request may close these issues.

offline_access scope should always return Refresh Token

3 participants

0