-
Notifications
You must be signed in to change notification settings - Fork 61
convert disk, project, and organization lookups to new lookup API #844
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
Conversation
| /// authz checks are required. As a result, it should not be made | ||
| /// accessible outside the DataStore. It should always be wrapped by | ||
| /// something that does the appropriate authz check. | ||
| // TODO-security We should refactor things so that it's harder to |
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.
\o/ We finally did this!
| .lookup_for(authz::Action::CreateChild) | ||
| .await?; | ||
|
|
||
| // TODO-security This may need to be revisited once we implement authz |
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.
This TODO is no longer applicable. We did implement authz for saga actions. The pattern is: we do the authz check before creating the saga for a better user experience, and we also serialize the current authn context, rehydrate it inside the saga, and use that to check again when we run the saga action. So this TODO is resolved.
I suspect we're not actually authorizing the operations that this saga is doing, but that'll be caught when I sweep through DataStore looking for unprotected functions (which is tracked by #419).
The authorize check isn't removed -- it got moved into the lookup now.
| .lookup_for(authz::Action::Delete) | ||
| .await?; | ||
|
|
||
| // TODO: We need to sort out the authorization checks. |
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.
Same as above.
david-crespo
left a comment
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.
looks great!
|
Thanks for the review! |
|
I'm going to close and open a new PR to try to kick the GitHub Actions. |
Pull request was closed
Crucible changes are: Nexus notifications have different importance (#1621) Propolis changes are: lib: don't send CPUID settings in vCPU device state payload (#848) server/lib: add generic hypervisor enlightenment interface (#846) server: read host CPUID values if the spec has none (#844) Added a new field to the Board struct that propolis requires.
Crucible changes are: Nexus notifications have different importance (#1621) Propolis changes are: lib: don't send CPUID settings in vCPU device state payload (#848) server/lib: add generic hypervisor enlightenment interface (#846) server: read host CPUID values if the spec has none (#844) Added a new field to the Board struct that propolis requires. Co-authored-by: Alan Hanson <[email protected]>

See #798. This change:
authz::Organization-- expecting the caller to have done the lookup -- rather than aname.)There are other resources not covered here but they're all harder to deal with. See #845.