refactor(controlplane): make CAS source_internal resolution best-effort#3201
Merged
Conversation
Flagging a CAS token as internal platform traffic now happens only when a system API token explicitly requests it. Any other caller requesting it is silently not flagged instead of being rejected, so outdated systems whose tokens are not yet marked as system continue to work. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 8734066a-0121-4178-a08a-a59b8b8c8676
Contributor
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | app/controlplane/internal/service/cascredential.go |
+9 / -17 |
| modified | ai | app/controlplane/internal/service/cascredential_test.go |
+7 / -15 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-873406 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-873406 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-873406 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-873406 |
- |
Powered by Chainloop and Chainloop Trace
matiasinsaurralde
approved these changes
Jun 12, 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
Follow-up to #3199.
Resolving whether a CAS credential should be flagged as internal platform traffic (
source_internal) is now best-effort. The flag is set only when a system API token explicitly requests it. Any other caller requesting it is silently not flagged instead of being rejected with aForbiddenerror.This tolerates outdated systems whose token store does not yet mark their tokens as system: rather than failing the request, the credential is simply minted without the internal flag.
AI assistance
This change was developed with the assistance of Claude Code.
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri