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

Machine ID should have a method for refreshing expired certificates without recreating a bot #13091

Closed
timothyb89 opened this issue Jun 2, 2022 · 3 comments
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements machine-id

Comments

@timothyb89
Copy link
Contributor

timothyb89 commented Jun 2, 2022

What would you like Teleport to do?

tctl should have a new function to refresh expired bot credentials by generating a new token for an existing user, expiring any other credentials.

As an example:

$ tctl bots refresh <name>
The new token is: <token>
This token will expire in 59 minutes.

Optionally, if running the bot under an isolated user account, first initialize
the data directory by running the following command as root:

> tbot init \
   --destination-dir=./tbot-user \
   --bot-user=tbot \
   --reader-user=alice

[...]

What problem does this solve?

Currently when a bot's certificates expire, it must be fully deleted and recreated to generate a new token. This is required to reset the server-side generation counter, which is an additional level of certificate theft prevention used with token-based joining.

If a workaround exists, please include it.

$ tctl bots rm <name>
$ tctl bots add <name> --roles=a,b,c

Additionally, AWS IAM joining and GitHub Actions OIDC joining use reusable tokens and are not affected by this.

@thg-adamdean
Copy link
Contributor

This is especially interesting to me because it removes a manual element to our automation.

@strideynet
Copy link
Contributor

Potentially replaced by #26885 - need to think over this.

@strideynet
Copy link
Contributor

Closing as covered by the larger issue described at #26885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements machine-id
Projects
None yet
Development

No branches or pull requests

3 participants