Skip to content
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

Add field AlreadyUsed to AuthKeys #159

Merged
merged 7 commits into from
Oct 13, 2021
Merged

Add field AlreadyUsed to AuthKeys #159

merged 7 commits into from
Oct 13, 2021

Conversation

juanfont
Copy link
Owner

We add a new field AlreadyUsed to PreAuthKeys, so we can show in the CLI that a key has been used already (as requested in #157). This boolean field is marked as true with the first usage - in regular, reusable and ephemeral keys.

In the case of regular auth keys, the key cannot be used anymore even if the node is deleted (#158).

@juanfont juanfont requested review from cure and kradalby October 13, 2021 16:18
Copy link
Collaborator

@kradalby kradalby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "Already" does not provide any value, past time does not matter. Its used or it is not used.

api.go Outdated Show resolved Hide resolved
cmd/headscale/cli/preauthkeys.go Outdated Show resolved Hide resolved
cmd/headscale/cli/preauthkeys.go Outdated Show resolved Hide resolved
preauth_keys.go Outdated Show resolved Hide resolved
preauth_keys.go Outdated Show resolved Hide resolved
preauth_keys.go Outdated Show resolved Hide resolved
preauth_keys_test.go Outdated Show resolved Hide resolved
@juanfont juanfont requested a review from kradalby October 13, 2021 21:29
@juanfont juanfont merged commit abfb179 into main Oct 13, 2021
@juanfont juanfont deleted the better-pak-management branch October 13, 2021 21:45
@juanfont juanfont restored the better-pak-management branch October 13, 2021 21:45
@juanfont juanfont deleted the better-pak-management branch October 13, 2021 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants