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

Implement Key Expiry #935

Closed
nikking opened this issue Nov 4, 2022 · 1 comment · Fixed by #1067
Closed

Implement Key Expiry #935

nikking opened this issue Nov 4, 2022 · 1 comment · Fixed by #1067
Labels
enhancement New feature or request

Comments

@nikking
Copy link

nikking commented Nov 4, 2022

Feature request

Tailscale offers a feature called Key Expiry.

As a security feature, users need to periodically reauthenticate on each of their devices. The default expiration period depends on your domain setting. By default, new domains are set with an expiry period of 180 days.

I'm interested to use Headscale with my org and key expiration is a security requirement.

@nikking nikking added the enhancement New feature or request label Nov 4, 2022
@FStelzer
Copy link

FStelzer commented Dec 8, 2022

depending on what the time the expiry should be based on you can quite easily do this using the api.
I'm using something similar to:
headscale nodes list -o json | jq '.[] | select(.last_seen.seconds < (now - 86400)) | .id' | xargs -iID headscale nodes expire -i ID

in a cron to automatically expire keys that have not been online for one day (86400s) in this case. Using the jq selector you can filter for all kinds of user info. try "headscale nodes list -o json" to see whats available and might fit your needs.
Not as easy as just a config flag but quite a bit more flexible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants