[PR #2046] [MERGED] feat: support client verify for derp (add integration tests) #2466

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2046
Author: @ArcticLampyrid
Created: 8/7/2024
Status: Merged
Merged: 11/22/2024
Merged by: @kradalby

Base: mainHead: verify-client


📝 Commits (10+)

  • 13454a3 feat: support client verify for derp
  • a5f27b2 docs: fix doc for integration test
  • c726224 tests: add integration test for DERP verify endpoint
  • b6adc84 tests: use tailcfg.DERPMap instead of []byte
  • b3beb73 refactor: introduce func ContainsNodeKey
  • 4f294c2 tests(dsic): use string builder for cmd args
  • 689c098 ci: fix tests order
  • b0f074d tests: fix derper failure
  • 28a40c0 chore: cleanup
  • bb79471 tests(verify-client): perfer to use CreateHeadscaleEnv

📊 Changes

14 files changed (+735 additions, -118 deletions)

View changed files

📝 .github/workflows/test-integration.yaml (+1 -0)
Dockerfile.derper (+19 -0)
📝 hscontrol/app.go (+2 -0)
📝 hscontrol/handlers.go (+60 -0)
📝 hscontrol/types/node.go (+10 -0)
📝 integration/README.md (+2 -2)
integration/derp_verify_endpoint_test.go (+96 -0)
integration/dsic/dsic.go (+321 -0)
📝 integration/embedded_derp_test.go (+1 -1)
📝 integration/hsic/hsic.go (+67 -95)
📝 integration/integrationutil/util.go (+90 -0)
📝 integration/scenario.go (+27 -1)
📝 integration/tailscale.go (+1 -0)
📝 integration/tsic/tsic.go (+38 -19)

📄 Description

  • have read the CONTRIBUTING.md file
  • 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

Fixes #1953

By implementing /verify endpoint, derper can verify whether the client is in the node list of Headscale by specifying the --verify-client-url parameter to /verify in Headscale.

This is a continued work on PR #1957, which includes integration testing to meet Headscale's merge requirements.

I am willing to participate in updating the related documentation and change logs, if needed. (Of course, I believe @117503445 is also willing)


🔄 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/2046 **Author:** [@ArcticLampyrid](https://github.com/ArcticLampyrid) **Created:** 8/7/2024 **Status:** ✅ Merged **Merged:** 11/22/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `verify-client` --- ### 📝 Commits (10+) - [`13454a3`](https://github.com/juanfont/headscale/commit/13454a3f2d882128d26a536b0a14ba2ff2a686df) feat: support client verify for derp - [`a5f27b2`](https://github.com/juanfont/headscale/commit/a5f27b226526c2350ff43eb6316c65f5016a2fbb) docs: fix doc for integration test - [`c726224`](https://github.com/juanfont/headscale/commit/c726224e5314da0bae04685b5ba2dd8e3fb43b00) tests: add integration test for DERP verify endpoint - [`b6adc84`](https://github.com/juanfont/headscale/commit/b6adc84dc647c59cf07167d4131a8766a826d1c1) tests: use `tailcfg.DERPMap` instead of `[]byte` - [`b3beb73`](https://github.com/juanfont/headscale/commit/b3beb73f3f86eb0dd4afb6e7fe3ba2a7814f76d5) refactor: introduce func `ContainsNodeKey` - [`4f294c2`](https://github.com/juanfont/headscale/commit/4f294c243c159a27073816ad9453b0b2cb832d6b) tests(dsic): use string builder for cmd args - [`689c098`](https://github.com/juanfont/headscale/commit/689c0983dc4e8d6c6c980538511d1bcbae0205e6) ci: fix tests order - [`b0f074d`](https://github.com/juanfont/headscale/commit/b0f074d18ddbf132ea3bd513977d0912c1ea8414) tests: fix derper failure - [`28a40c0`](https://github.com/juanfont/headscale/commit/28a40c001903a1e6c2b5b537e41d846d69df141f) chore: cleanup - [`bb79471`](https://github.com/juanfont/headscale/commit/bb7947113918a80372d167c90431be1180a351b7) tests(verify-client): perfer to use `CreateHeadscaleEnv` ### 📊 Changes **14 files changed** (+735 additions, -118 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration.yaml` (+1 -0) ➕ `Dockerfile.derper` (+19 -0) 📝 `hscontrol/app.go` (+2 -0) 📝 `hscontrol/handlers.go` (+60 -0) 📝 `hscontrol/types/node.go` (+10 -0) 📝 `integration/README.md` (+2 -2) ➕ `integration/derp_verify_endpoint_test.go` (+96 -0) ➕ `integration/dsic/dsic.go` (+321 -0) 📝 `integration/embedded_derp_test.go` (+1 -1) 📝 `integration/hsic/hsic.go` (+67 -95) 📝 `integration/integrationutil/util.go` (+90 -0) 📝 `integration/scenario.go` (+27 -1) 📝 `integration/tailscale.go` (+1 -0) 📝 `integration/tsic/tsic.go` (+38 -19) </details> ### 📄 Description * [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file * [x] raised a GitHub issue or discussed it on the projects chat beforehand * [ ] added unit tests * [x] added integration tests * [ ] updated documentation if needed * [ ] updated CHANGELOG.md Fixes #1953 By implementing `/verify` endpoint, derper can verify whether the client is in the node list of Headscale by specifying the `--verify-client-url` parameter to `/verify` in Headscale. This is a continued work on PR #1957, which includes integration testing to meet Headscale's merge requirements. I am willing to participate in updating the related documentation and change logs, if needed. (Of course, I believe @117503445 is also willing) --- <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:21:24 +01:00
adam closed this issue 2025-12-29 03:21:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2466