test(controlplane): add ServerOperationsMap authz consistency tests#3256
Merged
Merged
Conversation
Add tests that assert every ServerOperationsMap key matches a real controlplane.v1 wire procedure, and that every wire procedure is explicitly classified as role-gated, admin-only, or authz-exempt. This guards against typo'd or stale authz keys and against newly added RPCs silently defaulting to admin-only. Remove the dead ServerOperationsMap key CASRedirectService/DownloadRedirect, which matched no procedure after the RPC was renamed to GetDownloadURL. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 20f7fc97-938f-4737-99a4-4a1b963d61fc
Contributor
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| created | ai | app/controlplane/pkg/authz/authz_consistency_test.go |
+168 / -0 |
| modified | ai | app/controlplane/pkg/authz/authz.go |
+1 / -3 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-20f7fc |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-20f7fc |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-20f7fc |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-20f7fc |
- |
Powered by Chainloop and Chainloop Trace
matiasinsaurralde
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds consistency tests for the control plane authorization
ServerOperationsMap:ServerOperationsMapkey matches a realcontrolplane.v1wire procedure, so a typo'd or stale key (which is silently unenforced) fails the build.controlplane.v1wire procedure is explicitly classified — role-gated inServerOperationsMap, intentionally admin-only, or exempt from the authorization middleware — so a newly added RPC cannot silently default to admin-only without a reviewed decision.Also removes the dead
CASRedirectService/DownloadRedirectkey, which matched no procedure after the RPC was renamed toGetDownloadURL.This work was assisted by AI (Claude Code).
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri