[PR #2890] [MERGED] hscontrol/oidc: fix ACL policy not applied to new OIDC nodes #2922

Closed
opened 2025-12-29 04:19:40 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2890
Author: @kradalby
Created: 11/14/2025
Status: Merged
Merged: 11/30/2025
Merged by: @kradalby

Base: kradalby/release-v0.27.2Head: kradalby/2888-oidc-pol


📝 Commits (1)

  • ed1fdc3 hscontrol/oidc: fix ACL policy not applied to new OIDC nodes

📊 Changes

9 files changed (+757 additions, -107 deletions)

View changed files

📝 .github/workflows/test-integration.yaml (+3 -0)
📝 CHANGELOG.md (+7 -0)
📝 hscontrol/auth.go (+5 -9)
📝 hscontrol/grpcv1.go (+4 -4)
📝 hscontrol/oidc.go (+17 -29)
📝 hscontrol/state/state.go (+34 -19)
📝 integration/auth_key_test.go (+182 -0)
📝 integration/auth_oidc_test.go (+490 -0)
📝 integration/route_test.go (+15 -46)

📄 Description

Remove premature policy change notification after user creation in OIDC callback handler. This was causing a race condition where asynchronous policy updates interfered with node registration, resulting in new OIDC nodes receiving incomplete network maps.

The policy manager is still updated synchronously during user creation, and handleRegistration now sends a single consolidated change notification after node registration completes.

Add integration test to validate OIDC nodes immediately receive correct ACL policies and can see advertised routes without requiring a client restart.

Fixes #2888

claude was used in this PR.


🔄 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/2890 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 11/14/2025 **Status:** ✅ Merged **Merged:** 11/30/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `kradalby/release-v0.27.2` ← **Head:** `kradalby/2888-oidc-pol` --- ### 📝 Commits (1) - [`ed1fdc3`](https://github.com/juanfont/headscale/commit/ed1fdc3089f089df572434f826c5e65b061fc4fa) hscontrol/oidc: fix ACL policy not applied to new OIDC nodes ### 📊 Changes **9 files changed** (+757 additions, -107 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration.yaml` (+3 -0) 📝 `CHANGELOG.md` (+7 -0) 📝 `hscontrol/auth.go` (+5 -9) 📝 `hscontrol/grpcv1.go` (+4 -4) 📝 `hscontrol/oidc.go` (+17 -29) 📝 `hscontrol/state/state.go` (+34 -19) 📝 `integration/auth_key_test.go` (+182 -0) 📝 `integration/auth_oidc_test.go` (+490 -0) 📝 `integration/route_test.go` (+15 -46) </details> ### 📄 Description Remove premature policy change notification after user creation in OIDC callback handler. This was causing a race condition where asynchronous policy updates interfered with node registration, resulting in new OIDC nodes receiving incomplete network maps. The policy manager is still updated synchronously during user creation, and handleRegistration now sends a single consolidated change notification after node registration completes. Add integration test to validate OIDC nodes immediately receive correct ACL policies and can see advertised routes without requiring a client restart. Fixes #2888 claude was used in this PR. --- <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 04:19:40 +01:00
adam closed this issue 2025-12-29 04:19:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2922