You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Okta as an IDP, and as such, request both groups and offline_access as additional scopes so I can get the groups included in the Token (as our RBAC is based on groups within the token). This works the first time, and I get a valid token for the lifetime of that token. I also get a refresh token. However, once the initial token expires, and the refresh token grant is requested, the initial scopes used aren't passed in the refresh call and no groups are included in the newly minted token, effectively removing my access to K8s.
I am affected by this as well with a suboptimal result: I cannot use refresh tokens, I always need to remove the cached token manually and request a new ID token.
otherwise, the same rules apply as apply when issuing an ID Token at the time of the original authentication.
It's pretty clear here we must include scopes in the refresh requests, otherwise any OIDC compliant provider is free to not include the claims in its response.
As this plugin relies on golang/oauth2 to implement the flows (via oauth2cli), I did a little digging and found numerous issues and PRs about this. The latest is golang/oauth2#621 and from what I read in that description, I am not seeing any upstream support for this anytime soon. OAuth2 does not need this and they are not maintaining an OIDC client. @int128 is there a way out of this dependency nightmare for this project?
Describe the issue
I am using Okta as an IDP, and as such, request both groups and offline_access as additional scopes so I can get the groups included in the Token (as our RBAC is based on groups within the token). This works the first time, and I get a valid token for the lifetime of that token. I also get a refresh token. However, once the initial token expires, and the refresh token grant is requested, the initial scopes used aren't passed in the refresh call and no groups are included in the newly minted token, effectively removing my access to K8s.
Example kube config user:
Your environment
The text was updated successfully, but these errors were encountered: