-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Describe the problem
In current sharing model we have everything
group with access_all_objects
capability and all objects are automatically shared with that group. The main use-case for that feature is to make all objects in MWDB visible for repository owner. That group is created by default in new MWDB installations.
But sometimes we want to share all objects with some other participants as well, but still be able to limit sharing for some objects that are too sensitive to be shared with broader community (e.g. TLP:RED).
Marking object as TLP:RED
will turn off all of additional sharing features and will share object during upload only with specified group. No shares will be removed during this operation, so if object was already shared with e.g. public
, it won't be unshared during upload operation with tlp:red
mark.
Describe the solution you'd like
Initial steps:
- Create additional capability to give chosen users access to that feature e.g.
adding_restricted_objects
- Add additional argument in upload form
restricted
that limits sharing only to the chosen group - Don't allow to share with
*
andpublic
whenrestricted
is turned on
Sharing rules:
- If uploaded object already exists in MWDB, just make sure if it's shared with chosen group and do nothing special
- If uploaded object doesn't exist, share only with chosen group excluding
access_all_objects
groups
The tricky part is with children of restricted objects, because they can be uploaded without restriction options and be added to everything
group. But if we're aware of these restriction options, we can upload artifacts from karton
restricted by default. Shares to everything
and other groups will be inherited in that case. If the only parent is restricted, descendant objects will be restricted as well.
We may also need special option in https://github.com/CERT-Polska/karton-mwdb-reporter to make it fully functional.
In frontend: option should be presented as additional checkbox under Share with. After checking that checkbox, the only possible Share with
options should be Single group...
and Only me
.
So the other things in todo are:
- Support in frontend part
- Documentation
- Automated tests
Describe alternatives you've considered
None