[PR #2315] add Tampering Test for PKCE #2601

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2315
Author: @Rorical
Created: 12/22/2024
Status: 🔄 Open

Base: mainHead: pkce-verifier-testing


📝 Commits (3)

  • 8f43c94 feat: add PKCE verifier for OIDC
  • f356d08 chore: update config example
  • 360d1af feat: add tampered request test for pkce feature

📊 Changes

6 files changed (+455 additions, -18 deletions)

View changed files

📝 .github/workflows/test-integration.yaml (+1 -0)
📝 config-example.yaml (+12 -0)
📝 docs/ref/oidc.md (+12 -0)
📝 hscontrol/oidc.go (+53 -15)
📝 hscontrol/types/config.go (+28 -0)
📝 integration/auth_oidc_test.go (+349 -3)

📄 Description

From PR #1812 , above #2314 .

This PR shows how we can mimic a MitM attack inside our integration tests and use that to test if the PKCE verifier is working. However, this code requires lots of change only for this specific test.

Ideally, we need a proxy that can mimic all type of MitM attack for all tests, so we can reuse the code and enhance integration test.


🔄 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/2315 **Author:** [@Rorical](https://github.com/Rorical) **Created:** 12/22/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pkce-verifier-testing` --- ### 📝 Commits (3) - [`8f43c94`](https://github.com/juanfont/headscale/commit/8f43c94693ed46159393c712532e060088e98e0b) feat: add PKCE verifier for OIDC - [`f356d08`](https://github.com/juanfont/headscale/commit/f356d08ec960272830be25a64eae8bb70727f091) chore: update config example - [`360d1af`](https://github.com/juanfont/headscale/commit/360d1afe19e190d34f56a1cc9d53170913864a3c) feat: add tampered request test for pkce feature ### 📊 Changes **6 files changed** (+455 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration.yaml` (+1 -0) 📝 `config-example.yaml` (+12 -0) 📝 `docs/ref/oidc.md` (+12 -0) 📝 `hscontrol/oidc.go` (+53 -15) 📝 `hscontrol/types/config.go` (+28 -0) 📝 `integration/auth_oidc_test.go` (+349 -3) </details> ### 📄 Description From PR #1812 , above #2314 . This PR shows how we can mimic a MitM attack inside our integration tests and use that to test if the PKCE verifier is working. However, this code requires lots of change only for this specific test. Ideally, we need a proxy that can mimic all type of MitM attack for all tests, so we can reuse the code and enhance integration test. --- <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:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2601