Repository navigation
π‘οΈ Sentinel: [CRITICAL] Fix auth bypass in admin endpoints #460
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/main/java/com/clearfolio/viewer/auth/TenantPermissions.java.orig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| package com.clearfolio.viewer.auth; | ||
|
|
||
| /** | ||
| * Permission names enforced by Clearfolio API endpoints. | ||
| */ | ||
| public final class TenantPermissions { | ||
|
|
||
| /** | ||
| * Permission required to submit a conversion job. | ||
| */ | ||
| public static final String JOB_CREATE = "job:create"; | ||
|
|
||
| /** | ||
| * Permission required to read conversion job status. | ||
| */ | ||
| public static final String JOB_READ = "job:read"; | ||
|
|
||
| /** | ||
| * Permission required to delete a conversion job. | ||
| */ | ||
| public static final String JOB_DELETE = "job:delete"; | ||
|
|
||
| /** | ||
| * Permission required to retry a dead-lettered conversion job. | ||
| */ | ||
| public static final String JOB_RETRY = "job:retry"; | ||
|
|
||
| /** | ||
| * Permission required to read viewer bootstrap payloads. | ||
| */ | ||
| public static final String VIEWER_READ = "viewer:read"; | ||
|
|
||
| /** | ||
| * Permission required to read generated document artifact bytes. | ||
| */ | ||
| public static final String ARTIFACT_READ = "artifact:read"; | ||
|
|
||
| /** | ||
| * Permission required to create signed artifact links. | ||
| */ | ||
| public static final String ARTIFACT_LINK_CREATE = "artifact-link:create"; | ||
|
|
||
| /** | ||
| * Permission required to revoke signed artifact links. | ||
| */ | ||
| public static final String ARTIFACT_LINK_REVOKE = "artifact-link:revoke"; | ||
|
|
||
| /** | ||
| * Permission required to read audit evidence. | ||
| */ | ||
| public static final String AUDIT_READ = "audit:read"; | ||
|
|
||
| /** | ||
| * Permission required to read buyer-demo analytics. | ||
| */ | ||
| public static final String ANALYTICS_READ = "analytics:read"; | ||
|
|
||
| private TenantPermissions() { | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
π Security & Privacy | π Major | β‘ Quick win
μμ μ μ¬μλμ
403νκ· ν μ€νΈλ₯Ό μΆκ°νμΈμ.νμ¬ μΆκ°λ κΆν κ±°λΆ ν μ€νΈλ
getAllJobsλ§ λμμΌλ‘ ν©λλ€.deleteJobλλretryDeadLetteredμμtenantAccessService.require(headers, TenantPermissions.ADMIN)νΈμΆμ΄ λΉ μ Έλ μ΄ νμΌμ μ±κ³΅ κ²½λ‘ ν μ€νΈλ κ³μ ν΅κ³Όν μ μμ΅λλ€. λ μλν¬μΈνΈμλ κΆν μλ μμ²μ μΆκ°νκ³ , κ° κ²½μ°conversionServiceκ° νΈμΆλμ§ μλμ§ κ²μ¦νμΈμ.PR λͺ©νλ μ‘°νΒ·μμ Β·μ¬μλ μλν¬μΈνΈ λͺ¨λμ
ADMINκΆν κ²μ¬λ₯Ό μꡬν©λλ€.π€ Prompt for AI Agents