Skip to content

Fix user invites preventing tokens list#36048

Merged
gabrielcorado merged 1 commit intomasterfrom
gabrielcorado/fix-tctl-get-tokens-signup
Jan 9, 2024
Merged

Fix user invites preventing tokens list#36048
gabrielcorado merged 1 commit intomasterfrom
gabrielcorado/fix-tctl-get-tokens-signup

Conversation

@gabrielcorado
Copy link
Copy Markdown
Contributor

@gabrielcorado gabrielcorado commented Dec 26, 2023

Closes #34387.

changelog: Fix user invites preventing listing tokens.

When initializing types.SystemRoles from a specification, the initializer converts the roles into strings using StringSlice, which utilizes the String method from types.SystemRole. However, the RoleSignup function may return a value that is not present in the system role mappings, causing a validation failure as shown in the issue.

Alternatively, we could add "password" to the roleMapping so that roles with this name would be correctly matched, and the returned value on tctl get token would still be Password.

@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@gabrielcorado gabrielcorado added the no-changelog Indicates that a PR does not require a changelog entry label Dec 26, 2023
Copy link
Copy Markdown
Contributor

@espadolini espadolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is trusted_cluster special cased, anyway?

@espadolini
Copy link
Copy Markdown
Contributor

BTW I think that mentioning that a bug got fixed is changelog-worthy.

@gabrielcorado gabrielcorado removed the no-changelog Indicates that a PR does not require a changelog entry label Jan 9, 2024
@gabrielcorado gabrielcorado added this pull request to the merge queue Jan 9, 2024
@gabrielcorado
Copy link
Copy Markdown
Contributor Author

Why is trusted_cluster special cased, anyway?

I'm not 100% sure about this, but upon examining the code, it appears its purpose is to rename trustedcluster to trusted_cluster after encoding/parsing the spec.

Merged via the queue into master with commit c3a7049 Jan 9, 2024
@gabrielcorado gabrielcorado deleted the gabrielcorado/fix-tctl-get-tokens-signup branch January 9, 2024 20:22
@public-teleport-github-review-bot
Copy link
Copy Markdown

@gabrielcorado See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Create PR

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User invite prevents token list

3 participants