Distinguish 404 from 403 in authz-roles policy test snapshot#10559
Merged
Conversation
Contributor
Author
|
@davepacheco curious if you can think of a reason you might have not wanted to distinguish 404s and 403s in this authz snapshot test. The discussion in the PR is about how long it takes to run. |
Collaborator
|
By "snapshot" you mean the file containing the test's expected output, right? I can't think offhand of a particular reason not to distinguish these here. |
The conferred-roles test only registered Fleet-rooted resources (Fleet,
IpPoolList), so it never exercised a conferring user reaching a *different*
Silo than their own. Add a second Silo ("other-silo") to the resource set.
This also gives the test 404-vs-403 coverage: a user with no path to the
other Silo can not see it (404, rendered ∅), while a user whose main-Silo
role confers a Fleet role can (403/visible, rendered ✘/✔). Regenerate
authz-conferred-roles.out accordingly.
e962c93 to
e6b669e
Compare
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.
Built on top of #10550. Big diff but it's all in the snapshot. This snapshot was originally added in #1123 and I don't see a rationale given there for collapsing 404 and 403. I don't see a downside, it just gives you more info. Will take advantage of this in my Oso to Cedar port.