Skip to content

Fix Suggested Role Spec for Enrolling New Resources#34865

Merged
evanfreed merged 5 commits intomasterfrom
evan/fix/enroll-defaults
Nov 28, 2023
Merged

Fix Suggested Role Spec for Enrolling New Resources#34865
evanfreed merged 5 commits intomasterfrom
evan/fix/enroll-defaults

Conversation

@evanfreed
Copy link
Copy Markdown
Contributor

@evanfreed evanfreed commented Nov 21, 2023

I went to Enroll New Resource and for both EC2 Instance and RDS PostgresSQL I was given a suggested role:

# EC2 example
kind: role
spec:
  allow:
    rules:
    - resources:
      - integration
      verbs:
      - list
      - create
      - use
    - resources:
      - node
      verbs:
      - create
      - update
      - list
      - read

I copied this to my role but I got:

Screenshot 2023-11-21 at 4 28 04 PM

After review it looks like it's missing the read verb in the suggestion. Feel free to let me know if this is the correct place to change this.

changelog: Add read verb to suggested role spec when enrolling new resources.

Signed-off-by: Evan Freed <evan.freed@goteleport.com>
@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.

@ibeckermayer ibeckermayer requested a review from rudream November 22, 2023 00:23
@ibeckermayer
Copy link
Copy Markdown
Contributor

Tagging @rudream in on this, is there any particular reason read wasn't added in the first place. Do you or @kimlisa recall running into this during testing?

Copy link
Copy Markdown
Contributor

@kimlisa kimlisa left a comment

Choose a reason for hiding this comment

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

wow... this was a major oversight on my part, thanks for the fix!

@kimlisa
Copy link
Copy Markdown
Contributor

kimlisa commented Nov 23, 2023

@evanfreed could you also add integrations.read on this line

like this:

integrationAccess.create && integrationAccess.list && integrationAccess.use && integrationAccess.read;

@rudream
Copy link
Copy Markdown
Contributor

rudream commented Nov 23, 2023

is there any particular reason read wasn't added in the first place.

@ibeckermayer not aware of any reason, seems to have just been an oversight and the RBAC for this wasn't properly tested.

Copy link
Copy Markdown
Contributor

@rudream rudream left a comment

Choose a reason for hiding this comment

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

LGTM once @kimlisa's comment is addressed

evanfreed and others added 3 commits November 26, 2023 19:34
Signed-off-by: Evan Freed <evan.freed@goteleport.com>
Signed-off-by: Evan Freed <evan.freed@goteleport.com>
@evanfreed
Copy link
Copy Markdown
Contributor Author

Should I backport this change? @rudream @kimlisa

@kimlisa
Copy link
Copy Markdown
Contributor

kimlisa commented Nov 28, 2023

@evanfreed yes it needs to be backported to branch/v13

@evanfreed evanfreed self-assigned this Nov 28, 2023
@evanfreed evanfreed enabled auto-merge November 28, 2023 15:11
@evanfreed evanfreed added this pull request to the merge queue Nov 28, 2023
Merged via the queue into master with commit 252b918 Nov 28, 2023
@evanfreed evanfreed deleted the evan/fix/enroll-defaults branch November 28, 2023 15:31
@public-teleport-github-review-bot
Copy link
Copy Markdown

@evanfreed See the table below for backport results.

Branch Result
branch/v13 Create PR
branch/v14 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.

4 participants