-
Notifications
You must be signed in to change notification settings - Fork 505
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
Fix 10221 403 error; Unauthorized studies are displayed as authorized #10241
Fix 10221 403 error; Unauthorized studies are displayed as authorized #10241
Conversation
Fix 10221 Unauthorized studies are displayed as authorized due to issue with using RequestParam adding @RequestParam causes error HTTP 400 error as by default required = true, if set to required = false causes unauthorized studies to be shown as authorized Swagger validation errors fixed via commit a57c489 caused this issue.
d5c78e0
to
7638a27
Compare
@RequestParam(required = false) Authentication authentication) { | ||
@RequestParam(defaultValue = "ASC") Direction direction | ||
) { | ||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); |
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.
Problem:
- The
authentication
param without annotations generates faulty/messy Swagger documentation - The
authentication
param with annotations results in all studies being marked withreadPermission=true
Maybe better to remove the authentication parameter and instead fetch it from the security context?
@dippindots @JREastonMarks
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 looks ok to me, @jagnathan is there any potential issue if we merge this pr as is?
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.
@dippindots in the file org/mskcc/cbio/portal/util/internal/AccessControlImpl.java, there is some more complex logic for getting the authentication object. Do we need to follow that logic?
- Rename StructVar* to StructuralVariant* - Revert JsonInclude Always to NON_NULL -
…yfilter RFC68: Impl. structural variant filtering in Study View filter
…control modify documentation for skin.hide_download_controls
authentication object validity check - only if user authorization is enabled, authentication object is obtained from SecurityContextHolder
Fix 10221 Unauthorized studies are displayed as authorized due to issue with using RequestParam adding @RequestParam causes error HTTP 400 error as by default required = true, if set to required = false causes unauthorized studies to be shown as authorized Swagger validation errors fixed via commit a57c489 caused this issue.
authentication object validity check - only if user authorization is enabled, authentication object is obtained from SecurityContextHolder
…jagnathan/cbioportal into fix10221-403-authorized-studies
Kudos, SonarCloud Quality Gate passed! |
opened a new PR #10267 to replace this PR. |
Fix #10221 Unauthorized studies are displayed as authorized due to issue with using RequestParam