-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
OIDC: Expire machines/nodes after token expiry #1067
Conversation
This looks reasonable, lets wait for feedback from other users so we have some testers. Ideally we would have a integration test case as well, it shouldnt be too problematic now that you can add a config to the Scenario:
|
Thanks for working on this. Also we might need to differentiate between expiring inactive/offline clients and a forceful expiry after a certain time. |
@reynico What would that property be used for? As far as I understand every OIDC JWT token has an expiry set. @FStelzer: This PR addresses only users/machines which explicitly logs in via OIDC. I think configuring different token lifetimes for employees/freelances should be done in your auth solution (Azure AD, Okta, etc…). As for the diff: I've observed that if only checking for |
0e3b598
to
95e22df
Compare
Ok, that sounds perfect. I think the other comment regarding the config let me think this would be something static/configured. Configuring this via OIDC is perfect. It needs some documentation though. There is no seperate OIDC docs page afaik. So maybe add a comment mentioning this field and its use in the config-example.yaml? Or start an OIDC docs page :)
Thanks for the clarification. That makes sense. Probably not much to improve on this logic. Maybe put the condition in it's own if (...) {continue} with a comment just for readability. |
I fully agree with this. We need a dedicated doc for OIDC. It is not rocket science, but it is not trivial to set up only based on the config example... |
95e22df
to
31001bd
Compare
31001bd
to
1e25134
Compare
d5db5f9
to
8a88820
Compare
2cbadfb
to
e1d9404
Compare
This PR seems to work (at least
headscale mockoidc
and Azure AD) for my use case.Fixes #935.