forked from MozillaSecurity/FuzzManager
-
Notifications
You must be signed in to change notification settings - Fork 0
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
FUZ-22 - API Token improvements - Tool Segmentation #28
Draft
gitstart-app
wants to merge
23
commits into
master
Choose a base branch
from
FUZ-22-tool-segmentation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
No Taskcluster jobs started for this pull requestThe |
This PR is estimated to cost 30 credits. |
6312157
to
e08051e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR was created by GitStart to address the requirements from this ticket: FUZ-22.
Description:
This PR adds tool-specific segmentation to API tokens to enhance security in FuzzManager. Currently, API tokens have unrestricted access across all tools, creating potential security risks if compromised.
The changes:
add_tool_to_token
remove_tool_from_token
for token-tool management.This segmentation limits the impact of potential token leaks and provides better access control for crash/coverage reporting.
Demo
https://www.loom.com/share/bcde5c97bec54761a8a11b0f72a54850?sid=0b52a794-a0ad-478b-af24-5c254827e80b
Test Plan
Assign Tool to Token:
add_tool_to_token
management command to assign a specific tool to a token.python manage.py add_tool_to_token <token_string> <tool_name>
Verify Token Restrictions:
curl
to submit crash reports using the segmented token for the assigned tool.curl -H "Authorization: Token <token_string>" -X POST http://<server>/api/crashes/ -d '{"tool": "<tool_name>", "crash_data": "..." }'
curl -H "Authorization: Token <token_string>" -X POST http://<server>/api/crashes/ -d '{"tool": "unauthorized_tool", "crash_data": "..." }'
403 Forbidden
with a message indicating lack of permission.Ensure User Restrictions:
Tool Assignment:
python manage.py add_tool_to_token <token_string> <tool_name>
python manage.py remove_tool_from_token <token_string> <tool_name>