[PR #2396] [MERGED] do not allow preauth keys to be deleted if assigned to node #2643

Closed
opened 2025-12-29 03:22:10 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2396
Author: @kradalby
Created: 1/31/2025
Status: Merged
Merged: 2/1/2025
Merged by: @kradalby

Base: mainHead: kradalby/no-delete-authkey


📝 Commits (2)

  • cfd8bb4 do not allow preauth keys to be deleted if assigned to node
  • ae89a46 update changelog

📊 Changes

5 files changed (+54 additions, -4 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 hscontrol/db/db.go (+18 -0)
📝 hscontrol/db/preauth_keys_test.go (+25 -0)
📝 hscontrol/types/node.go (+6 -3)
📝 hscontrol/types/preauth_key.go (+1 -1)

📄 Description

we need to be able to look up the tags on the key, never delete, only expire if in use. There is no API for deleting, but never know if people edit the database.


🔄 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/2396 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 1/31/2025 **Status:** ✅ Merged **Merged:** 2/1/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/no-delete-authkey` --- ### 📝 Commits (2) - [`cfd8bb4`](https://github.com/juanfont/headscale/commit/cfd8bb4328ae4fdbc977aff266a116109c4d32f6) do not allow preauth keys to be deleted if assigned to node - [`ae89a46`](https://github.com/juanfont/headscale/commit/ae89a463209cf925dee63ddf70d7edce17fc3df4) update changelog ### 📊 Changes **5 files changed** (+54 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `hscontrol/db/db.go` (+18 -0) 📝 `hscontrol/db/preauth_keys_test.go` (+25 -0) 📝 `hscontrol/types/node.go` (+6 -3) 📝 `hscontrol/types/preauth_key.go` (+1 -1) </details> ### 📄 Description we need to be able to look up the tags on the key, never delete, only expire if in use. There is no API for deleting, but never know if people edit the database. --- <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 03:22:10 +01:00
adam closed this issue 2025-12-29 03:22:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2643