-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Access Control #183
Draft
kushagra189
wants to merge
1
commit into
dev
Choose a base branch
from
feature/addAccessControl
base: dev
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.
Draft
Add Access Control #183
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
Reviewer's Guide by SourceryThis pull request introduces access control to the pro-tes service. It configures authentication and authorization using a policy file and integrates it with the task creation endpoint. It also adds the required dependencies. Sequence diagram for CreateTask with Access ControlsequenceDiagram
participant User
participant API Gateway
participant pro-tes Service
participant Access Control
User->>API Gateway: POST /tasks
API Gateway->>pro-tes Service: Forward request
pro-tes Service->>Access Control: check_permissions
alt User has permission
Access Control-->>pro-tes Service: Permission Granted
pro-tes Service->>pro-tes Service: Create Task
pro-tes Service-->>API Gateway: Task Created
else User does not have permission
Access Control-->>pro-tes Service: Permission Denied
pro-tes Service-->>API Gateway: 403 Forbidden
end
API Gateway-->>User: Response
Class diagram for Access Control ConfigurationclassDiagram
class SecurityConfig {
auth:
required: bool
add_key_to_claims: bool
claim_identity: str
claim_issuer: str
algorithms: list
allow_expired: bool
scopes: list
validation_checks: str
access_control:
db_name: str
collection_name: str
model: str
owner_headers: list
user_headers: list
}
note for SecurityConfig "Configuration for authentication and authorization settings."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
TBA
IMPORTANT: Please create an issue before filing a pull request! Changes need to be discussed before proceeding. Please read the contribution guidelines.
Details
Please provide enough information so that others can review your pull request. Give a brief summary of the motivation. Refer to the corresponding issue/s with
#XXXX
for more information.Testing
Write the appropriate unit and integration tests, if applicable. Make sure these and all other tests pass.
Documentation
Please document your changes and test cases in the appropriate places, if applicable.
Style
Make sure your changes adhere to the coding/documentation style used throughout the project.
Closing issues
If your changes fix any issue/s, put
closes #XXXX
in your comment to auto-close it/them.Credit
Add your credentials to the list of contributors once your pull request was merged.
Summary by Sourcery
Implements access control for the
/tasks
endpoint, allowing different levels of access based on user roles. It also adds authentication to the API, requiring users to authenticate before accessing resources.New Features:
/tasks
endpoint, allowing different levels of access based on user roles such as owner, maintainer, and viewer.Enhancements:
Build:
pymongo
as a project dependency.