Skip to content

Comments

feat: add tenant admin#13

Merged
ontehfritz merged 11 commits intomainfrom
feat-tenant-admin
Jan 25, 2026
Merged

feat: add tenant admin#13
ontehfritz merged 11 commits intomainfrom
feat-tenant-admin

Conversation

@ontehfritz
Copy link
Contributor

No description provided.

@ontehfritz ontehfritz requested a review from Copilot January 23, 2026 03:01
@ontehfritz ontehfritz changed the title feat: add tenantID admin feat: add tenant admin Jan 23, 2026
Copy link

Copilot AI left a 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 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 TenantAdminService to 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

ontehfritz and others added 2 commits January 25, 2026 13:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ontehfritz ontehfritz merged commit 1e21685 into main Jan 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant