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 Suggested Role Spec for Enrolling New Resources #34865

Merged
merged 5 commits into from Nov 28, 2023

Conversation

evanfreed
Copy link
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>
Copy link

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
Copy link
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
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
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
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
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
Contributor Author

Should I backport this change? @rudream @kimlisa

@kimlisa
Copy link
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 added this pull request to the merge queue Nov 28, 2023
Merged via the queue into master with commit 252b918 Nov 28, 2023
33 checks passed
@evanfreed evanfreed deleted the evan/fix/enroll-defaults branch November 28, 2023 15:31
@public-teleport-github-review-bot

@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.

None yet

4 participants