feat(api-keys): add platform-scoped API keys for control-plane automation
Introduce platform API keys with capability-based access to tenant management, system settings, runtime queues, and audit logs, plus admin UI for key lifecycle and system audit log viewing.
This commit is contained in:
@@ -111,6 +111,10 @@ func IsTenantAccessible(
|
||||
func RequireCrossTenantAccess(cfg *config.Config) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
if scope, ok := types.TenantAPIKeyScopeFromContext(ctx); ok && scope.IsPlatform() {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
// First the cluster-wide flag — if it's off, nobody gets through,
|
||||
// not even users with CanAccessAllTenants=true. This mirrors the
|
||||
// "must require BOTH" rule that previously lived in tenant.go.
|
||||
|
||||
Reference in New Issue
Block a user