diff --git a/CHANGELOG.md b/CHANGELOG.md index 12cbc6d..be9e845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # CHANGELOG -## 0.17.0 (2022-xx-xx) +## 0.17.0 (2022-XX-XX) + +## 0.16.2 (2022-08-14) + +### Changes + +- Fixed bugs in the client registration process after migration to NodeKey [#735](https://github.com/juanfont/headscale/pull/735) + +## 0.16.1 (2022-08-12) + +### Changes - Updated dependencies (including the library that lacked armhf support) [#722](https://github.com/juanfont/headscale/pull/722) - Fix missing group expansion in function `excludeCorretlyTaggedNodes` [#563](https://github.com/juanfont/headscale/issues/563) diff --git a/README.md b/README.md index 0cfed4d..911fd2e 100644 --- a/README.md +++ b/README.md @@ -232,13 +232,6 @@ make build unreality - - - Moritz -
- Moritz Poldrack -
- ohdearaugustin/ @@ -246,8 +239,22 @@ make build ohdearaugustin + + + Moritz +
+ Moritz Poldrack +
+ + + + GrigoriyMikhalkin/ +
+ GrigoriyMikhalkin +
+ Niek @@ -262,13 +269,6 @@ make build Eugen Biegler - - - Aaron -
- Aaron Bieber -
- Anton @@ -276,6 +276,13 @@ make build Anton Schubert + + + Aaron +
+ Aaron Bieber +
+ Fernando @@ -283,13 +290,6 @@ make build Fernando De Lucchi - - - GrigoriyMikhalkin/ -
- GrigoriyMikhalkin -
- @@ -496,6 +496,13 @@ make build Pierre Carru + + + Rasmus +
+ Rasmus Moorats +
+ rcursaru/ @@ -503,6 +510,8 @@ make build rcursaru + + WhiteSource @@ -510,8 +519,6 @@ make build WhiteSource Renovate - - Ryan @@ -526,6 +533,13 @@ make build Shaanan Cohney + + + sophware/ +
+ sophware +
+ Tanner/ @@ -540,6 +554,8 @@ make build Teteros + + The @@ -554,8 +570,6 @@ make build Tianon Gravi - - Tjerk @@ -584,6 +598,8 @@ make build Ziyuan Han + + derelm/ @@ -598,8 +614,6 @@ make build henning mueller - - ignoramous/ @@ -628,6 +642,8 @@ make build Wakeful-Cloud + + zy/ diff --git a/api.go b/api.go index 561545b..2d55ccd 100644 --- a/api.go +++ b/api.go @@ -603,10 +603,12 @@ func (h *Headscale) handleMachineExpired( if h.cfg.OIDC.Issuer != "" { resp.AuthURL = fmt.Sprintf("%s/oidc/register/%s", - strings.TrimSuffix(h.cfg.ServerURL, "/"), machineKey.String()) + strings.TrimSuffix(h.cfg.ServerURL, "/"), + NodePublicKeyStripPrefix(registerRequest.NodeKey)) } else { - resp.AuthURL = fmt.Sprintf("%s/register?key=%s", - strings.TrimSuffix(h.cfg.ServerURL, "/"), machineKey.String()) + resp.AuthURL = fmt.Sprintf("%s/register/%s", + strings.TrimSuffix(h.cfg.ServerURL, "/"), + NodePublicKeyStripPrefix(registerRequest.NodeKey)) } respBody, err := encode(resp, &machineKey, h.privateKey) @@ -699,11 +701,12 @@ func (h *Headscale) handleMachineRegistrationNew( resp.AuthURL = fmt.Sprintf( "%s/oidc/register/%s", strings.TrimSuffix(h.cfg.ServerURL, "/"), - machineKey.String(), + NodePublicKeyStripPrefix(registerRequest.NodeKey), ) } else { resp.AuthURL = fmt.Sprintf("%s/register/%s", - strings.TrimSuffix(h.cfg.ServerURL, "/"), NodePublicKeyStripPrefix(registerRequest.NodeKey)) + strings.TrimSuffix(h.cfg.ServerURL, "/"), + NodePublicKeyStripPrefix(registerRequest.NodeKey)) } respBody, err := encode(resp, &machineKey, h.privateKey)