Files
tenant-registry/internal/server/authz_catalogue.go
T
Sharang ParnerkarandClaude Opus 5.5 19f2300934
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 8m8s
ci / image (pull_request) Skipped
feat(authz): the catalogue of rights (RBAC step 1)
Capabilities, bundles and the two position variants, versioned in
code and served as GET /v1/authz/catalogue. Today's six roles are
bundles that reproduce the portal surfaces, the Werkmeister
permissions and the registry's own role checks; pin tests fail if
any of them drifts. Nothing reads the catalogue yet, so no right
changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-11-10 22:46:34 +01:00

17 lines
572 B
Go

package server
import (
"net/http"
"git.breakpilot.com/platform/tenant-registry/internal/authz"
)
// getAuthzCatalogue — GET /v1/authz/catalogue: the catalogue of rights
// (capabilities, bundles, position presets; RBAC plan step 1). Read-only
// and the same for everyone; services read it to expand a person's bundle
// (step 2). Route group "authz": a service client needs that grant in
// AUTHZ_RULES. Nothing decides access by it yet.
func (s *Server) getAuthzCatalogue(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, authz.Current())
}