-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: Added base key validity period of 60 minutes. #765
Conversation
1. This will ensure that the generated keys are valid for the next 60 minutes 2. Updated Changelog
This issue has not been fixed completely. Android clients are working fine and are getting the correct expiry time but Linux clients are still getting,
|
Fixed.
|
@@ -26,6 +26,10 @@ const ( | |||
// | |||
// See also https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go | |||
NoiseCapabilityVersion = 39 | |||
|
|||
// DefaultKeyExpireTime determines the valid period of a generated key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should end in a period
@@ -26,6 +26,10 @@ const ( | |||
// | |||
// See also https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go | |||
NoiseCapabilityVersion = 39 | |||
|
|||
// DefaultKeyExpireTime determines the valid period of a generated key | |||
// Keys of new machines are valid for this period |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should end in a period
@@ -1,5 +1,9 @@ | |||
# CHANGELOG | |||
|
|||
## 0.17.1 (2022-XX-XX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## 0.17.1 (2022-XX-XX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add this under 0.17.0 ?
|
||
// DefaultKeyExpireTime determines the valid period of a generated key | ||
// Keys of new machines are valid for this period | ||
DefaultKeyExpireTime = 60 * time.Minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any rationale behind 60 minutes?
Digging into this, upstream only seems to say about key expiration this (in
Perhaps could be DefaultKeyExpireTime could be something configurable, with a default time of 60 minutes... |
Hi! as part of #1473, we have reorganised a lot of the code. To clear PRs that needs to be rebased or redone, we are closing open PRs that will require significant code change to be merged. In addition, the issue of the PR might in some cases have been fixed, change or no longer relevant, so it would be great if this is considered as well. Thank you for your contribution! If it is still relevant and the PR is reopened, we will aim at getting the changes into the next release after the reorg if accepted. |
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.