Automatically create single-use auth keys #212
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.
This pull request removes the need to specify an auth key. The
create
command will generate a single-use auth key for the exit node.I think this is more robust and safe than automatically creating an auth key and storing it in the config file, but let me know.
Closes #37
Configuration and Command Updates:
AuthKey
field from theTailscaleConfig
struct intailout/config/config.go
.tailscale-auth-key
flag from thebuildCreateCommand
function incmd/create.go
.Core Logic Changes:
Create
method intailout/create.go
to remove the dependency onAuthKey
and instead dynamically create a Tailscale API key with specific capabilities.up
command to use the newly created API key instead of the removedAuthKey
.Documentation:
README.md
to reflect the removal ofAuthKey
and the new method for setting up the Tailscale API key.