-
Notifications
You must be signed in to change notification settings - Fork 17
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
PXP-4102 Feat/arb admin #319
Conversation
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
* do-reassign no longer its own function because need to mock arborist requests after post_blgsp_files but before client.put
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 good!! i think you can clean up the various conftest files by
- removing the
admin
fixture - removing
is_admin
from the tokens - using
submitter
in the tests that still useradmin
, with that warning you added to other tests about not checking authz
string: did | ||
string: s3 url that you changed it to | ||
Url: | ||
PUT: /admin/<program>/<project>/files/<file_uuid>/reassign |
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 (updating URLs) should be supported in indexd, not sheepdog... and this code only supports S3 URLs, and it assumes there is only 1 stored URL 🤦♀ we should probably get rid of this and add an endpoint in indexd instead
cc @Avantol13 re:conversation about indexd not supporting URL updates
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.
Should we wait until indexd has the endpoint or shall I go ahead and remove this~
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.
we can wait to be safe, though I don't think it's actually used anywhere? but if we change the public API we need a new major version of sheepdog
Thanku!! I completely forgot 🤦♂ . So that's all done except I didn't add the warning to the other tests--they didn't really claim to be checking authz anyway (whereas the first few either used to check authz, or were next to tests that checked the unauthorized case, so there was the implication). And it would have been a lot of noise :/ |
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.
🎉
Switches Sheepdog authz handling of program/project CRUD to centralized auth/Arborist.
See https://github.com/uc-cdis/commons-users/pull/810 for new Sheepdog admin policy.
(For QAs' benefit) How to test:
admin: true/false
and the new admin policyNew Features
Switch checks guarding program/project CRUD to centralized auth (instead of checking for "admin" in JWT, check for Sheepdog admin policy in Arborist)
Breaking Changes
Having admin: true in user.yaml no longer allows a user to do program/project CRUD in Sheepdog. Users now need to have the Sheepdog admin policy in Arborist.
Deployment changes
The environment's user.yaml needs to be updated to add the new Sheepdog admin policy/resources/roles; for each user that has admin: true, grant them the new policy. See https://github.com/uc-cdis/commons-users/pull/810 for an example.