[PR #765] [CLOSED] bugfix: Added base key validity period of 60 minutes. #1630

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/765
Author: @ishanjain28
Created: 8/24/2022
Status: Closed

Base: mainHead: postgres_fix


📝 Commits (5)

  • 49870c8 bugfix: Added a base key validity period of 60 minutes.
  • fe586ac bugfix: Add key validity in OIDC renewal and protocol_common.go
  • ae2d5d6 Merge branch 'main' into postgres_fix
  • 2efb3e9 Merge branch 'main' into postgres_fix
  • 8d6e638 Merge branch 'main' into postgres_fix

📊 Changes

3 files changed (+14 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 oidc.go (+1 -1)
📝 protocol_common.go (+9 -1)

📄 Description

  • read the CONTRIBUTING guidelines
  • 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 #764

PR Description,

Currently headscale initializes machine key's expiry time with &time.Time{}. This is formatted to, 0001-01-01T00:00:00Z(in RFC3339 format).

This means, The keys expiry time will always be in the past and clients will be stuck in a loop renewing the key.

This PR addresses this problem by adding a minimum validity of 60 minutes to the generated keys.


🔄 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/765 **Author:** [@ishanjain28](https://github.com/ishanjain28) **Created:** 8/24/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `postgres_fix` --- ### 📝 Commits (5) - [`49870c8`](https://github.com/juanfont/headscale/commit/49870c840c5e9ff7205dfbb23b755e6f08f04202) bugfix: Added a base key validity period of 60 minutes. - [`fe586ac`](https://github.com/juanfont/headscale/commit/fe586accc1d087ce0fc7b2d27baedac21e090f93) bugfix: Add key validity in OIDC renewal and protocol_common.go - [`ae2d5d6`](https://github.com/juanfont/headscale/commit/ae2d5d6fe724b529894a6a31a793d1b15f4ba641) Merge branch 'main' into postgres_fix - [`2efb3e9`](https://github.com/juanfont/headscale/commit/2efb3e98cb4598a97e353ffc2929b7355399ea1b) Merge branch 'main' into postgres_fix - [`8d6e638`](https://github.com/juanfont/headscale/commit/8d6e6384132fc203f3a03b1d67a5035cf840cf09) Merge branch 'main' into postgres_fix ### 📊 Changes **3 files changed** (+14 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `oidc.go` (+1 -1) 📝 `protocol_common.go` (+9 -1) </details> ### 📄 Description <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [x] updated documentation if needed - [x] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> Fixes #764 PR Description, Currently headscale initializes machine key's expiry time with `&time.Time{}`. This is formatted to, `0001-01-01T00:00:00Z`(in RFC3339 format). This means, The keys expiry time will always be in the past and clients will be stuck in a loop renewing the key. This PR addresses this problem by adding a minimum validity of 60 minutes to the generated keys. --- <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 02:31:00 +01:00
adam closed this issue 2025-12-29 02:31:00 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1630