Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces tenant admin functionality to enable role-based access control for tenant-scoped operations. The feature adds a new tenant_admin role that grants users administrative permissions within their specific tenant, while maintaining the existing system admin capabilities that span all tenants.
Changes:
- Adds middleware to enforce tenant admin or system admin roles on tenant-scoped endpoints
- Implements
TenantAdminServiceto create default roles and permissions for tenants - Creates comprehensive integration tests for tenant admin authorization flows
- Adds complete OpenAPI 3.0 specification documenting all API endpoints
- Updates documentation (README, CLAUDE.md, API.md) with authorization model and usage examples
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/tenants/tenant_admin_integration_test.go | Integration tests verifying tenant admin middleware, role creation, and tenant isolation |
| tests/integration/setup.go | Adds AuthenticateAsUser helper function for testing as different users |
| openapi.yaml | Complete OpenAPI 3.0 specification documenting all API endpoints and schemas |
| internal/tenants/admin_roles.go | Service for creating tenant_admin roles and associated permissions |
| cmd/bulwarkauthadmin/main.go | Initializes tenant admin service and applies authorization middleware |
| api/middleware/tenant_middleware_test.go | Unit tests for authorization helper functions |
| api/middleware/tenant_middleware.go | Middleware implementing tenant admin authorization checks |
| README.md | Adds API documentation section with quick reference examples |
| CLAUDE.md | Documents authorization model, role hierarchy, and implementation conventions |
| API.md | Comprehensive API reference guide with workflows and examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.