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

chore: Remote validation for activation keys #283

Merged
merged 11 commits into from
Apr 27, 2024
Merged

Conversation

LukeMathWalker
Copy link
Owner

In preparation for Pavex's open beta, we must move away from the rudimental activation checks implemented in #173. This PR is a first step in that direction.
We still use a "fixed" activation key (the same for all beta testers), but we move validation to a remote server, api.pavex.dev.
The activation key entered by the user is forwarded to the server to:

  • Check its validity
  • Obtain a short-lived (2 days) CLI token

The CLI token is cached on disk, allowing Pavex to be used offline for up to 2 days.
The cached token is refreshed in the background if it's older than 10 minutes to maximise the offline usage window. We could be more aggressive with the refreshing logic, but I don't want to overwhelm the server with unnecessary requests.

Misc:

  • move away from secrecy in favour of redact
  • fix telemetry setup to emit an event when a span closes rather than exits

@LukeMathWalker
Copy link
Owner Author

/ok-to-test sha=abe44b8

@LukeMathWalker LukeMathWalker merged commit 9e3bec9 into main Apr 27, 2024
22 checks passed
@LukeMathWalker LukeMathWalker deleted the token-auth branch April 27, 2024 12:00
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.

1 participant