Skip to content
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

How restrict the workers download? #8714

Open
2 tasks done
azadehashouri opened this issue Nov 16, 2024 · 1 comment
Open
2 tasks done

How restrict the workers download? #8714

azadehashouri opened this issue Nov 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@azadehashouri
Copy link

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Is your feature request related to a problem? Please describe.

Hello,

I want to restrict the download option for worker users, I mean I want my worker members aren't allowed to export jobs, tasks, projects and generally data.

I edited cvat/cvat/apps/engine/rules/jobs.rego file in this way and commented the codes related to export annotation and dataset:

allow if {
    input.scope in {
        utils.VIEW,
#        utils.EXPORT_DATASET, utils.EXPORT_ANNOTATIONS,
        utils.VIEW_ANNOTATIONS, utils.VIEW_DATA, utils.VIEW_METADATA
    }
    utils.is_sandbox
    is_job_staff
}

allow if {
    input.scope in {
        utils.VIEW,
#        utils.EXPORT_DATASET, utils.EXPORT_ANNOTATIONS, 
        utils.VIEW_ANNOTATIONS, utils.VIEW_DATA, utils.VIEW_METADATA
    }
    input.auth.organization.id == input.resource.organization.id
    organizations.has_perm(organizations.WORKER)
    is_job_staff
}

after that I run these commands to rebuild cvat_server:

sudo docker compose -f docker-compose.yml -f docker-compose.dev.yml down

sudo docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build --force-recreate cvat_server

But unfortunately, it doesn't work and my worker members can still export and download data.

Please help me to solve this problem to protect my data.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@azadehashouri azadehashouri added the enhancement New feature or request label Nov 16, 2024
@azadehashouri azadehashouri changed the title How restrict the workers download items? How restrict the workers download? Nov 16, 2024
@bsekachev
Copy link
Member

Try to rebuild and restart all services, not just cvat_server. As it only returns a bundle with rules, hovewer cvat_opa is responsible for authorization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants