-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
After having to recently rotate my ephemeral auth key, I spent some time after thinking about possible solutions to this problem. Although it would be great from an automation perspective, I doubt Tailscale is changing their position on key expiry anytime soon.
This brings me to the OAuth client documentation, where there is a section regarding key generation.
I can think of one straightforward way of implementing this, but there is room to consider variations of this approach. Here is how I envision this working:
- Store OAuth client ID and secret in a configuration file, along with ACL tag(s).
- When generating a new initramfs, have a hook that calls a script to generate a new ephemeral key.
- Embed this key in the initramfs.
Here are some questions about this approach that I thought of:
- What if someone force updates their initramfs without rebooting, resulting in many keys being generated?
- Keys have a maximum life of 90 days, so they would not persist too long.
- Could have a check to see if a generated key already exists and has a long enough (>= 30 days) duration.
- What about systems that do not reboot often?
- Could have a [systemd] timer to generate an auth key and update the initramfs if there has not been a recent (< 30 days) change.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels