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

fix: prevent tctl edit overwriting static file config #48329

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

nklaassen
Copy link
Contributor

tctl create -f prevents overwriting the cluster_auth_preference, cluster_networking_config, or session_recording_config if their configuration is coming from a static config file. Any dynamic edits made to these resources would be overwritten the next time the auth server restarts, so a user trying to edit them using tctl is usually making a mistake. tctl create prevents this mistake unless the user explicitly passes --confirm which might be useful in some break-glass scenarios.

But unfortunately tctl edit does nothing to prevent edits to these resources and I have confused myself many times when my config later gets overwritten after a successful tctl edit. This PR updates tctl edit to do the same check and require the --confirm flag to edit any resources configured statically.

changelog: Added a warning to tctl edit about dynamic edits to statically configured resources

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-48329.d3pp5qlev8mo18.amplifyapp.com

@nklaassen nklaassen enabled auto-merge November 4, 2024 15:23
@nklaassen nklaassen added no-changelog Indicates that a PR does not require a changelog entry and removed no-changelog Indicates that a PR does not require a changelog entry labels Nov 4, 2024
@nklaassen nklaassen added this pull request to the merge queue Nov 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 4, 2024
@nklaassen nklaassen added this pull request to the merge queue Nov 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 4, 2024
@nklaassen nklaassen added this pull request to the merge queue Nov 4, 2024
Merged via the queue into master with commit 9c8d93e Nov 4, 2024
42 of 43 checks passed
@nklaassen nklaassen deleted the nklaassen/tctl-edit-file-config branch November 4, 2024 19:29
@public-teleport-github-review-bot

@nklaassen See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR
branch/v16 Create PR
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants