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

Filter out unauthorized studies when fetching study tags #10277

Conversation

BasLee
Copy link

@BasLee BasLee commented Jul 17, 2023

This PR filters out unauthorized studies by adding the @PreFilter annotation to the /studies/tags/fetch endpoint.

Depends on fixing authorization in /studies (see #10267).

At the moment a user with unauthorized studies gets an error screen on the index page. This is because the tags of all studies are fetched. However, you cannot fetch the study tags of unauthorized studies, resulting in a 403 and an error screen (see #10221) .

By filtering the studies in the backend, the frontend does not need to have any knowledge of authorized studies (see also cBioPortal/cbioportal-frontend#4653).

@sonarcloud
Copy link

sonarcloud bot commented Jul 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@inodb
Copy link
Member

inodb commented Jul 28, 2023

Closing this as I believe we decided to not expose study tags for unauthorized studies due to risk of exposing sensitive data, but feel free to re-open if I'm misremembering the discussion. One alternative implementation would be to allow exposing study tags endpoint by allowing deployers to opt in to sharing the tags or indicating clearly in the docs on this and the portal configuration file with some warnings that it exposes the tags for a study as well

@inodb inodb closed this Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants