Skip to content

Commit 8f67bb6

Browse files
jrhynessclaude
andcommitted
fix: correct CEL syntax for subscription_info has() check
Fix CEL syntax error in AuthPolicy subscription_info field that was causing AuthConfig validation failures and blocking model access. The has() macro in Authorino/Kuadrant CEL does not support map subscript notation has(auth.metadata["subscription-info"]). Changed to check for a specific field within the object: has(auth.metadata["subscription-info"].name). Error message before fix: ERROR: <input>:1:18: invalid argument to has() macro | has(auth.metadata["subscription-info"]) ? ... | .................^ This was causing AuthPolicies to remain in Enforced=False state, preventing smoke tests from passing. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f7f47c8 commit 8f67bb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

maas-controller/pkg/controller/maas/maasauthpolicy_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ allow {
481481
// Contains: name, namespace, labels, organizationId, costCenter, error, message
482482
// Consumers should access nested fields (e.g., subscription_info.organizationId)
483483
"subscription_info": map[string]interface{}{
484-
"expression": `has(auth.metadata["subscription-info"]) ? auth.metadata["subscription-info"] : {}`,
484+
"expression": `has(auth.metadata["subscription-info"].name) ? auth.metadata["subscription-info"] : {}`,
485485
},
486486
// Error information (for debugging - only populated when selection fails)
487487
"subscription_error": map[string]interface{}{

0 commit comments

Comments
 (0)