Skip to content

Tailscale OAuth #8

@Techman

Description

@Techman

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:

  1. Store OAuth client ID and secret in a configuration file, along with ACL tag(s).
  2. When generating a new initramfs, have a hook that calls a script to generate a new ephemeral key.
  3. Embed this key in the initramfs.

Here are some questions about this approach that I thought of:

  1. 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.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions