-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Fix: Add scopes for devkeys #10984
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: Add scopes for devkeys #10984
Conversation
📝 WalkthroughWalkthroughThis change introduces new granular authorization scopes for developer key operations. The roles configuration file grants admin users two new permissions: Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
✨ Benchmark results
⚡ Benchmark Comparison
|
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.
Pull request overview
This PR introduces separate scopes for dev keys operations to provide more granular access control. Previously, dev keys endpoints reused the generic projects.read and projects.write scopes, which lacked the flexibility to manage dev keys permissions independently from general project permissions.
Key Changes:
- Replaced
projects.readandprojects.writescopes with dedicateddevKeys.readanddevKeys.writescopes across all dev keys endpoints - Registered the new scopes in the application's role configuration
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Appwrite/Platform/Modules/Projects/Http/DevKeys/XList.php | Updated list endpoint to use devKeys.read scope |
| src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Get.php | Updated get endpoint to use devKeys.read scope |
| src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Create.php | Updated create endpoint to use devKeys.write scope |
| src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Update.php | Updated update endpoint to use devKeys.write scope |
| src/Appwrite/Platform/Modules/Projects/Http/DevKeys/Delete.php | Updated delete endpoint to use devKeys.write scope |
| app/config/roles.php | Registered new devKeys.read and devKeys.write scopes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What does this PR do?
Currently project scopes were re-used; separating scopes gives more flexibility
Test Plan
Current tests must pass
Related PRs and Issues
x
Checklist