[PR #666] [CLOSED] add flags for headscale serve to provide initial api key #1560

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/666
Author: @GrigoriyMikhalkin
Created: 6/26/2022
Status: Closed

Base: mainHead: api-key-flag


📝 Commits (2)

  • a4fcb2d add flags for server to provide initial api key
  • 495ce54 Merge branch 'main' into api-key-flag

📊 Changes

3 files changed (+47 additions, -4 deletions)

View changed files

📝 api_key.go (+17 -3)
📝 cmd/headscale/cli/server.go (+29 -0)
📝 cmd/headscale/cli/utils.go (+1 -1)

📄 Description

Just played around to check one of the possible solutions to https://github.com/juanfont/headscale/issues/662.

Here i introduced 3 new flags for headscale serve command: api-key-prefix, api-key-pass and api-key-expiration. Together they allow to save pre-generated API key into DB to use it later for authentication.


🔄 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/666 **Author:** [@GrigoriyMikhalkin](https://github.com/GrigoriyMikhalkin) **Created:** 6/26/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `api-key-flag` --- ### 📝 Commits (2) - [`a4fcb2d`](https://github.com/juanfont/headscale/commit/a4fcb2d5e5eb62708aa99587fed0d7b1b627df77) add flags for server to provide initial api key - [`495ce54`](https://github.com/juanfont/headscale/commit/495ce5422f7ad4938a60f6f5e0d1f1f0adf44a52) Merge branch 'main' into api-key-flag ### 📊 Changes **3 files changed** (+47 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `api_key.go` (+17 -3) 📝 `cmd/headscale/cli/server.go` (+29 -0) 📝 `cmd/headscale/cli/utils.go` (+1 -1) </details> ### 📄 Description Just played around to check one of the possible solutions to https://github.com/juanfont/headscale/issues/662. Here i introduced 3 new flags for `headscale serve` command: `api-key-prefix`, `api-key-pass` and `api-key-expiration`. Together they allow to save pre-generated API key into DB to use it later for authentication. --- <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:30:35 +01:00
adam closed this issue 2025-12-29 02:30: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#1560