[PR #159] [MERGED] Add field AlreadyUsed to AuthKeys #1292

Closed
opened 2025-12-29 02:29:35 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/159
Author: @juanfont
Created: 10/13/2021
Status: Merged
Merged: 10/13/2021
Merged by: @juanfont

Base: mainHead: better-pak-management


📝 Commits (7)

📊 Changes

4 files changed (+23 additions, -6 deletions)

View changed files

📝 api.go (+3 -0)
📝 cmd/headscale/cli/preauthkeys.go (+2 -1)
📝 preauth_keys.go (+4 -4)
📝 preauth_keys_test.go (+14 -1)

📄 Description

We add a new field AlreadyUsed to PreAuthKeys, so we can show in the CLI that a key has been used already (as requested in #157). This boolean field is marked as true with the first usage - in regular, reusable and ephemeral keys.

In the case of regular auth keys, the key cannot be used anymore even if the node is deleted (#158).


🔄 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/159 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 10/13/2021 **Status:** ✅ Merged **Merged:** 10/13/2021 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `better-pak-management` --- ### 📝 Commits (7) - [`30788e1`](https://github.com/juanfont/headscale/commit/30788e1a70969f541bfa699d93f675b24775a5bb) Add AlreadyUsed field to Auth Keys (fixes #157 and #158) - [`93517aa`](https://github.com/juanfont/headscale/commit/93517aa6f897c37902a5cb3c24c16296cc09d0be) Apply suggestions from code review - [`06ae2a6`](https://github.com/juanfont/headscale/commit/06ae2a6c504c35986b4c5be9e968e9a0ff3c832f) Merge branch 'main' into better-pak-management - [`cc3e870`](https://github.com/juanfont/headscale/commit/cc3e8705bd6737226d69e2624a087d42378e70bd) Merge branch 'main' into better-pak-management - [`9a6ac6e`](https://github.com/juanfont/headscale/commit/9a6ac6e3e6dc610293670c68429c8361de195978) Reword errSingleUseAuthKeyHasBeenUsed - [`2ddca36`](https://github.com/juanfont/headscale/commit/2ddca366f26b5aa2937db992a1ab3cea9745d67c) Merge branch 'main' of https://github.com/juanfont/headscale into main - [`7ce8c4c`](https://github.com/juanfont/headscale/commit/7ce8c4c6494a589cd4f0906cd37bd84da5e803dc) Fixed merge ### 📊 Changes **4 files changed** (+23 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `api.go` (+3 -0) 📝 `cmd/headscale/cli/preauthkeys.go` (+2 -1) 📝 `preauth_keys.go` (+4 -4) 📝 `preauth_keys_test.go` (+14 -1) </details> ### 📄 Description We add a new field `AlreadyUsed` to `PreAuthKeys`, so we can show in the CLI that a key has been used already (as requested in #157). This boolean field is marked as `true` with the first usage - in regular, reusable and ephemeral keys. In the case of regular auth keys, the key cannot be used anymore even if the node is deleted (#158). --- <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 02:29:35 +01:00
adam closed this issue 2025-12-29 02:29:35 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1292