-
Notifications
You must be signed in to change notification settings - Fork 42
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
Authenticated user need privileges on global images and themselves #1341
Merged
davepacheco
merged 18 commits into
oxidecomputer:main
from
jmpesp:global_images_for_everyone
Jul 12, 2022
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2e36125
Authenticated user can list and read global images
jmpesp bf8a5d3
Undo changes, add unprivileged_access instead
jmpesp 3c0ea0d
Merge remote-tracking branch 'upstream/main' into global_images_for_e…
jmpesp 79de404
correct comments
jmpesp d525f41
actor.silo is not a list, use =
jmpesp cc0b58d
make ssh keys work
jmpesp d0ced98
remove roles that do not exist in the db
jmpesp 48ded19
merge
jmpesp 88d8c73
blanket permission statement
jmpesp 10c7e99
Roll back changes to unauthorized.rs
jmpesp 8537597
test accessing your own silo
jmpesp 106d301
add a bunch of authz tests
jmpesp 54dfa15
fmt and clippy
jmpesp b02b652
Merge remote-tracking branch 'upstream/main' into global_images_for_e…
jmpesp 80c9843
Merge branch 'main' into global_images_for_everyone
davepacheco 21dd23c
fix mismerge
davepacheco 4338cbe
another mismerge
davepacheco 31b8895
Merge remote-tracking branch 'origin/main' into global_images_for_eve…
davepacheco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason not to just do something like
actor.id = silo_user.id
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we can't make UUIDs into Polar classes, since we don't own the crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they're already supported:
https://docs.osohq.com/rust/reference/polar/classes.html#uuids-via-the-uuid-crate
I'll take a swing at this in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other problem here is that there's no
id
attribute onsilo_user
. We could add one, but this type is generated by theauthz_resource!
macro so either we'd have to make that configurable or everything would get a newid
attribute. I decided this isn't worth spending more time on.