Skip to content

Mark object as TLP:RED for limited sharing (restricted objects) #584

@psrok1

Description

@psrok1

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 * and public when restricted 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:discussionIssues that need to be discussed before implementationtype:featureNew feature description e.g. which involves implementation of new componentszone:backendMWDB backend core related taskszone:frontendMWDB frontend tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions