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

improve tctl config loading ux #42469

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

GavinFrazar
Copy link
Contributor

@GavinFrazar GavinFrazar commented Jun 5, 2024

changelog: tctl will now ignore any configuration file if the auth_service section is disabled, and prefer loading credentials from a given identity file or tsh profile instead.

Fixes #25620

This issue frequently trips customers (and me) up - see the linked issue and the issues linking to it.

This PR checks the config file that tctl finds and ignores it if the auth service section is not enabled.
That makes it far more friendly to use tctl on a host where a teleport agent is running (or even just configured).

I also updated the docs and error messages to hint towards tsh/identity file credential loading.

I'm not sure if this is a "breaking" change, but it seems that tctl only loads the config file to get an auth server address + credentials, both of which are provided by identity file (we already require the address flag be provided with an id file) and tsh profile already, so it seems fine to me.

@GavinFrazar GavinFrazar added ux tctl tctl - Teleport admin tool backport/branch/v16 labels Jun 5, 2024
@GavinFrazar GavinFrazar requested a review from zmb3 June 5, 2024 02:10
@github-actions github-actions bot added documentation size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

🤖 Vercel preview here: https://docs-ptot57dgq-goteleport.vercel.app/docs/ver/preview

@zmb3
Copy link
Collaborator

zmb3 commented Jun 5, 2024

Nice!

tool/tctl/common/tctl.go Outdated Show resolved Hide resolved
tool/tctl/common/tctl.go Outdated Show resolved Hide resolved
tool/tctl/common/tctl.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jun 5, 2024

🤖 Vercel preview here: https://docs-14mjru27i-goteleport.vercel.app/docs/ver/preview

Copy link

github-actions bot commented Jun 5, 2024

🤖 Vercel preview here: https://docs-6cujf3h0g-goteleport.vercel.app/docs/ver/preview

Copy link

github-actions bot commented Jun 5, 2024

🤖 Vercel preview here: https://docs-hawsu40ok-goteleport.vercel.app/docs/ver/preview

Copy link

github-actions bot commented Jun 8, 2024

🤖 Vercel preview here: https://docs-ff6ocna1b-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-eny3l0st9-goteleport.vercel.app/docs/ver/preview

@GavinFrazar
Copy link
Contributor Author

@gabrielcorado this needs G2

tool/tctl/common/tctl_test.go Outdated Show resolved Hide resolved
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from gabrielcorado June 14, 2024 01:32
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/update-tctl-config-loading branch from e19b377 to d61866b Compare June 14, 2024 01:36
Copy link

🤖 Vercel preview here: https://docs-qmg2sapb9-goteleport.vercel.app/docs/ver/preview

@GavinFrazar GavinFrazar force-pushed the gavinfrazar/update-tctl-config-loading branch from d61866b to 6b6ebde Compare June 14, 2024 18:08
Copy link

🤖 Vercel preview here: https://docs-nrqbcsk33-goteleport.vercel.app/docs/ver/preview

@GavinFrazar GavinFrazar added this pull request to the merge queue Jun 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 14, 2024
Copy link

🤖 Vercel preview here: https://docs-npjndv4vh-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-ozurok71t-goteleport.vercel.app/docs/ver/preview

@GavinFrazar GavinFrazar added this pull request to the merge queue Jun 14, 2024
Merged via the queue into master with commit 74800d6 Jun 14, 2024
40 checks passed
@GavinFrazar GavinFrazar deleted the gavinfrazar/update-tctl-config-loading branch June 14, 2024 21:45
@public-teleport-github-review-bot

@GavinFrazar See the table below for backport results.

Branch Result
branch/v16 Create PR

@ravicious
Copy link
Member

Would it be worthwhile to backport it to v15 as well? I think people are hitting this issue pretty often.

@webvictim
Copy link
Contributor

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v15 backport/branch/v16 documentation size/md tctl tctl - Teleport admin tool tsh tsh - Teleport's command line tool for logging into nodes running Teleport. ux
Projects
None yet
7 participants