Start replacing fly auth token
with more limited tokens
#1741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
This is mostly a conversation starter. We need to move away from telling users to configure things with the output from
fly auth token
. For most users, this output is flyctl's own token, which is invalidated if the user logs out of flyctl and almost certainly has access to more things than necessary. For members of organizations that require SSO, the output fromfly auth token
is a bundle of short-lived tokens (one for each org) that can only be used by flyctl, who knows how to refresh the tokens so they keep working. Eventually,fly auth token
will return this kind of token bundle for all users, making it inappropriate for use other than by flyctl itself.We need to move towards recommending
fly tokens create <token-type>
:fly tokens create deploy [-a app-name]
- Token for accessing a single Fly App.fly tokens create org <org-slug>
- Token for accessing all apps within a single Fly.io organization.fly tokens create readonly <org-slug>
- Token with readonly access to a single Fly.io organization.I updated a few commands in guides and updated a bit of language. This almost certainly needs some tweaking by someone who's better at writing docs 😄
Preview
Related Fly.io community and GitHub links
Notes