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

Fail early when token is about to expire #66

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

onnozweers
Copy link
Contributor

  • Fail when token will expire in 10 seconds
  • Fail when token will expire in 60 seconds, when --recursive was specified
  • Fix date command for MacOS; added -u to assume UTC instead of local time
  • Don't validate token when command is --viewtoken, because we want to view tokens that are invalid.
  • Fix: tr: Illegal byte sequence

* Fail when token will expire in 10 seconds
* Fail when token will expire in 60 seconds, when --recursive was specified
* Fix date command for MacOS; added -u to assume UTC instead of local time
* Don't validate token when command is "--viewtoken", because we want to view tokens that are invalid.
The illegal byte sequence was in the macaroon's signature. But we filter out the signature anyway. So now we filter out the signature before piping through tr.
@onnozweers onnozweers requested a review from hailihu February 19, 2025 16:32
@onnozweers onnozweers linked an issue Feb 19, 2025 that may be closed by this pull request
Copy link
Contributor

@hailihu hailihu left a comment

Choose a reason for hiding this comment

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

Looks good, some minor comments.

@hailihu hailihu merged commit dfa1a05 into master Feb 20, 2025
1 check passed
@onnozweers onnozweers deleted the 61-fail-early-when-token-is-about-to-expire branch February 20, 2025 14:57
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.

Fail early when token is about to expire
2 participants