[Feature] Hashed secrets #1153

Closed
opened 2025-12-29 02:28:35 +01:00 by adam · 1 comment
Owner

Originally created by @Mikilio on GitHub (Nov 19, 2025).

Use case

On a serious production environment, one may want to back up the database. In whatever operations one may want to do with these backups, everything becomes easier if that backup does not contain infrastructure critical secrets (such as api-keys and reusable pre_auth_keys in plaintext).

I believe it is possible to make the entire content of the database non-sensitive. Greatly reducing the attack surface under the assumption of a leaked backup.

Description

I would like to only store hashed versions of preauthkeys and api-keys as the headscale server only needs to verify these but doesn't actually need them itself.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

I'm not a go programmer, but I am a software engineer.
I should be able to do this with some help.

Originally created by @Mikilio on GitHub (Nov 19, 2025). ### Use case On a serious production environment, one may want to back up the database. In whatever operations one may want to do with these backups, everything becomes easier if that backup does not contain infrastructure critical secrets (such as api-keys and reusable pre_auth_keys in plaintext). I believe it is possible to make the entire content of the database non-sensitive. Greatly reducing the attack surface under the assumption of a leaked backup. ### Description I would like to only store hashed versions of preauthkeys and api-keys as the headscale server only needs to verify these but doesn't actually need them itself. ### Contribution - [x] I can write the design doc for this feature - [x] I can contribute this feature ### How can it be implemented? I'm not a go programmer, but I am a software engineer. I should be able to do this with some help.
adam added the enhancement label 2025-12-29 02:28:35 +01:00
adam closed this issue 2025-12-29 02:28:35 +01:00
Author
Owner

@kradalby commented on GitHub (Nov 20, 2025):

preauthkeys and api-keys

api-keys are already hashed (always been)

pre auth keys will be hashed in 0.28, it was merged in https://github.com/juanfont/headscale/pull/2853

@kradalby commented on GitHub (Nov 20, 2025): > preauthkeys and api-keys api-keys are already hashed (always been) pre auth keys will be hashed in 0.28, it was merged in https://github.com/juanfont/headscale/pull/2853
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1153