[PR #297] [MERGED] Configurable mtls #1365

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/297
Author: @ImpostorKeanu
Created: 1/29/2022
Status: Merged
Merged: 2/24/2022
Merged by: @kradalby

Base: mainHead: configurable-mtls


📝 Commits (10+)

  • 9e619fc Making client authentication mode configurable
  • 5935b13 refining
  • c98a559 linting/formatting
  • 0609c97 Merge branch 'main' into configurable-mtls
  • d44b2a7 adding default for tls_client_auth_mode
  • 310e7b1 making alternatives constants
  • 0c3fd16 refining and adding tests
  • 52db80a Merge branch 'configurable-mtls' of github.com:arch4ngel/headscale into configurable-mtls
  • 9de5c7f updating default
  • 168b1bd Merge branch 'main' into configurable-mtls

📊 Changes

6 files changed (+99 additions, -5 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 app.go (+35 -3)
📝 app_test.go (+17 -0)
📝 cmd/headscale/cli/utils.go (+22 -2)
📝 config-example.yaml (+7 -0)
📝 docs/tls.md (+14 -0)

📄 Description

  • read the [CONTRIBUTING guidelines](README.md#user-content-contributing
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • [] added integration tests
  • updated documentation if needed
  • [] updated CHANGELOG.md

The Problem

Currently, mTLS is set to require any certificate from clients when TLS is enabled. Verification of the certificate is not performed by Headscale, and as far as I can tell, there isn't a way to configure the Tailscale client to accept TLS certificate for authentication.

Implemented Solution

This merge makes mTLS configurable by adding a configuration parameter to config.yaml. It's disabled via the disabled value by default and can be configured to require any certificate (relaxed) or require and verify (enforced) a client certificate.

Related Issues

  • #254 calls this out as a question but not really a bug.

🔄 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/297 **Author:** [@ImpostorKeanu](https://github.com/ImpostorKeanu) **Created:** 1/29/2022 **Status:** ✅ Merged **Merged:** 2/24/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `configurable-mtls` --- ### 📝 Commits (10+) - [`9e619fc`](https://github.com/juanfont/headscale/commit/9e619fc020963bc0c1c7664d163d93a1b5dc4d0a) Making client authentication mode configurable - [`5935b13`](https://github.com/juanfont/headscale/commit/5935b13b6780180d717cd66a13657c043c11905b) refining - [`c98a559`](https://github.com/juanfont/headscale/commit/c98a559b4df7222953d5fba6cd781c1cc391efa0) linting/formatting - [`0609c97`](https://github.com/juanfont/headscale/commit/0609c9745958ea03afe61e5d5100149aa573c92b) Merge branch 'main' into configurable-mtls - [`d44b2a7`](https://github.com/juanfont/headscale/commit/d44b2a7c014b98178743421b5ebc0b7b65100cb3) adding default for tls_client_auth_mode - [`310e7b1`](https://github.com/juanfont/headscale/commit/310e7b15c7d436205ff598f131118f45b3fa0be8) making alternatives constants - [`0c3fd16`](https://github.com/juanfont/headscale/commit/0c3fd16113c2d8209cb6575bcb30a3b072482e99) refining and adding tests - [`52db80a`](https://github.com/juanfont/headscale/commit/52db80ab0d77e7429fe92539998c54e5adbca8ec) Merge branch 'configurable-mtls' of github.com:arch4ngel/headscale into configurable-mtls - [`9de5c7f`](https://github.com/juanfont/headscale/commit/9de5c7f8b8a6836197f555b8ed05fd7a0df41012) updating default - [`168b1bd`](https://github.com/juanfont/headscale/commit/168b1bd5796bb92cf4150c61e22bc829db9e4a78) Merge branch 'main' into configurable-mtls ### 📊 Changes **6 files changed** (+99 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `app.go` (+35 -3) 📝 `app_test.go` (+17 -0) 📝 `cmd/headscale/cli/utils.go` (+22 -2) 📝 `config-example.yaml` (+7 -0) 📝 `docs/tls.md` (+14 -0) </details> ### 📄 Description - [x] read the [CONTRIBUTING guidelines](README.md#user-content-contributing - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [x] added unit tests - [] added integration tests - [x] updated documentation if needed - [] updated CHANGELOG.md # The Problem Currently, mTLS is set to require *any* certificate from clients when TLS is enabled. Verification of the certificate is not performed by Headscale, and *as far as I can tell*, there isn't a way to configure the Tailscale client to accept TLS certificate for authentication. # Implemented Solution This merge makes mTLS configurable by adding a configuration parameter to `config.yaml`. It's disabled via the `disabled` value by default and can be configured to require any certificate (`relaxed`) or require and verify (`enforced`) a client certificate. # Related Issues - #254 calls this out as a question but not really a bug. --- <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:50 +01:00
adam closed this issue 2025-12-29 02:29:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1365