Cover exempted resources in IAM role policy test#10549
Merged
Merged
Conversation
Adds IpPool, VpcRouter, RouterRoute, ConsoleSession, and UserBuiltin to the policy_test resource universe and removes them from the coverage exemption list. All five are role-gated (FleetChild / InProjectFull) so they fit the existing matrix; no new test machinery needed.
david-crespo
commented
Jun 4, 2026
| silo1-proj1-limited-collaborator ✘ ✘ ✘ ✘ ✘ ✘ ✔ ✘ | ||
| silo1-proj1-viewer ✘ ✘ ✘ ✘ ✘ ✘ ✔ ✘ | ||
| unauthenticated ! ! ! ! ! ! ! ! | ||
| scim ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ |
Contributor
Author
There was a problem hiding this comment.
Anybody can create child because that's the perm we use to allocate IP addresses. It would be nice to have this only work for users in a silo linked to the pool, but currently this is enforced in app code.
david-crespo
commented
Jun 4, 2026
| silo1-admin ✘ ✔ ✔ ✔ ✔ ✔ ✔ ✔ | ||
| silo1-collaborator ✘ ✔ ✔ ✔ ✔ ✔ ✔ ✔ | ||
| silo1-limited-collaborator ✘ ✔ ✔ ✔ ✘ ✘ ✘ ✘ | ||
| silo1-viewer ✘ ✔ ✔ ✔ ✘ ✘ ✘ ✘ |
Contributor
Author
There was a problem hiding this comment.
viewer and limited collaborator can't modify networking resources, as expected
david-crespo
added a commit
that referenced
this pull request
Jun 10, 2026
…test (#10550) Built on top of #10549. I'm trying to get as much test coverage as possible for the existing authz setup to increase confidence in a conversion from Oso to Cedar I'm prototyping. Prior to this change, `test_iam_roles_behavior` matrix only tests actors with roles, but there are a few cases where the Polar policy grants permissions based directly on the identity of the actor rather than based on a role. For example, a user can modify their own SSH keys just by virtue of being the owner of those keys. There are also three constant built-in actors (`db-init`, `internal-api`, `external-authn`), whose privileges come from fixed Polar rules and seeded fleet role assignments rather than per-resource roles. This PR adds coverage for the role-less user and the three built-in actors to the big authz snapshot test. It definitely adds noise to the snapshot (+500 lines on top of 2200), but I think it's worth it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add IpPool, VpcRouter, RouterRoute, ConsoleSession, and UserBuiltin to the policy_test resource universe and remove them from the coverage exemption list. As far as I can tell, these were not exempted for any particular reason — the comment just says "Resources that we should test, but for which we have not yet added a test."
This came up because I'm experimenting with an Oso to Cedar conversion and I'm trying to get as much test coverage as possible to validate the port.