Machine allocation logic exists in multiple locations. #109

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

Originally created by @enoperm on GitHub (Jan 29, 2022).

Originally assigned to: @kradalby on GitHub.

Bug description

Machine allocation (at the time of writing) may be performed by one of:

  • Headscale.RegisterMachine (invoked through gRPC)
  • Headscale.handleAuthKey (invoked when a client joins with a preauthkey)
  • Headscale.OIDCCallback (to used, I assume, by the OIDC join method).

Each of these functions contains its own copy of the machine allocation logic, mandating one who wishes to modify it to consistently patch them all. Ideally, these should all be reducable to custom auth, followed by the invocation of a single machine allocation function.

Originally created by @enoperm on GitHub (Jan 29, 2022). Originally assigned to: @kradalby on GitHub. **Bug description** <!-- A clear and concise description of what the bug is. Describe the expected bahavior and how it is currently different. If you are unsure if it is a bug, consider discussing it on our Discord server first. --> Machine allocation (at the time of writing) may be performed by one of: * `Headscale.RegisterMachine` (invoked through gRPC) * `Headscale.handleAuthKey` (invoked when a client joins with a preauthkey) * `Headscale.OIDCCallback` (to used, I assume, by the OIDC join method). Each of these functions contains its own copy of the machine allocation logic, mandating one who wishes to modify it to consistently patch them all. Ideally, these should all be reducable to custom auth, followed by the invocation of a single machine allocation function.
adam added the bug label 2025-12-29 01:23:24 +01:00
adam closed this issue 2025-12-29 01:23: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#109