[PR #2895] preauthkeys: add support expiry by key id #2925

Open
opened 2025-12-29 04:19:41 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2895
Author: @clwluvw
Created: 11/15/2025
Status: 🔄 Open

Base: mainHead: expire-pak-id


📝 Commits (2)

  • a51fa10 preauthkeys: add support expiry by key id
  • 3dac947 preauthkeys: return grpc notfound on ErrPreAuthKeyNotFound

📊 Changes

11 files changed (+179 additions, -34 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 cmd/headscale/cli/preauthkeys.go (+22 -6)
📝 gen/go/headscale/v1/preauthkey.pb.go (+21 -8)
📝 gen/openapiv2/headscale/v1/headscale.swagger.json (+6 -1)
📝 hscontrol/auth_test.go (+2 -1)
📝 hscontrol/db/preauth_keys.go (+22 -0)
📝 hscontrol/db/preauth_keys_test.go (+52 -0)
📝 hscontrol/grpcv1.go (+33 -5)
📝 hscontrol/policy/v2/policy_test.go (+12 -12)
📝 hscontrol/state/state.go (+5 -0)
📝 proto/headscale/v1/preauthkey.proto (+3 -1)

📄 Description

support expiring preauthkeys by providing the key id than the actual key.

  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
    I wasn’t aware of “Open Source, acknowledged contribution” when preparing the change. Since the change is trivial, I submitted it as is. If needed, I’m happy to open an issue and continue the discussion there.
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2895 **Author:** [@clwluvw](https://github.com/clwluvw) **Created:** 11/15/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `expire-pak-id` --- ### 📝 Commits (2) - [`a51fa10`](https://github.com/juanfont/headscale/commit/a51fa10dc56c165c24a5b872f359b4f039bcb323) preauthkeys: add support expiry by key id - [`3dac947`](https://github.com/juanfont/headscale/commit/3dac947d44e20922014a7f64d759dfe8119424a5) preauthkeys: return grpc notfound on ErrPreAuthKeyNotFound ### 📊 Changes **11 files changed** (+179 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `cmd/headscale/cli/preauthkeys.go` (+22 -6) 📝 `gen/go/headscale/v1/preauthkey.pb.go` (+21 -8) 📝 `gen/openapiv2/headscale/v1/headscale.swagger.json` (+6 -1) 📝 `hscontrol/auth_test.go` (+2 -1) 📝 `hscontrol/db/preauth_keys.go` (+22 -0) 📝 `hscontrol/db/preauth_keys_test.go` (+52 -0) 📝 `hscontrol/grpcv1.go` (+33 -5) 📝 `hscontrol/policy/v2/policy_test.go` (+12 -12) 📝 `hscontrol/state/state.go` (+5 -0) 📝 `proto/headscale/v1/preauthkey.proto` (+3 -1) </details> ### 📄 Description support expiring preauthkeys by providing the key id than the actual key. - [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file - [ ] raised a GitHub issue or discussed it on the projects chat beforehand I wasn’t aware of “Open Source, acknowledged contribution” when preparing the change. Since the change is trivial, I submitted it as is. If needed, I’m happy to open an issue and continue the discussion there. - [x] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [x] updated CHANGELOG.md --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2925