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

Better describe AccessCapabilities response when role filtering is applied #49062

Closed
wants to merge 1 commit into from

Conversation

kopiczko
Copy link
Contributor

Some clarifications I added while trying to understand access capabilities rpc.

@kopiczko kopiczko added the no-changelog Indicates that a PR does not require a changelog entry label Nov 15, 2024
@github-actions github-actions bot requested review from kimlisa and rudream November 15, 2024 16:07
@kopiczko kopiczko requested review from tcsc and smallinsky November 15, 2024 16:07
Copy link

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

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

disableFilter bool
allowedResourceIDs []types.ResourceID
expectedRoles []string
name string
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this change is intended PR desc says:

Better describe AccessCapabilities response when role filtering is applied

However, while the changes look good overall, they reorder tests (like filter by resources <-->"filtering disabled, rename some test cases, and add additional expectedApplicableRolesForResources and additional test case. From a review perspective, this makes it a bit messy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test changes:

  • rename can view resource but not assume rolecan request resource but not assume role
  • add confirm can request resource when filtering disabled
  • don’t know how I managed to reorder filtering disabled with filter by resources - sorry for the unnecessary nosie

Adding expectedApplicableRolesForResources made it easier for me to comprehend what's going on here and how those two thing relate, but it may be subjective. I won't disagree with that.

Naming PR Better ... may be controversial. It was easier to understand it for me. I hoped it may be the same for others. If the general consensus is it makes less understandable then I'm happy to close it.

@kopiczko
Copy link
Contributor Author

I'm closing it. After learning more, I'm not certain about the value of this PR. The whole access capabilities thing is quite complicated unfortunately.

@kopiczko kopiczko closed this Nov 28, 2024
@kopiczko kopiczko deleted the kopiczko/access-capabilities-clarification branch November 28, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants