shreemaan-abhishek commented on code in PR #2806:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2806#discussion_r3602444289
##########
internal/webhook/v1/consumer_webhook.go:
##########
@@ -134,6 +134,14 @@ func (v *ConsumerCustomValidator) collectWarnings(ctx
context.Context, consumer
}
visited[nn] = struct{}{}
+ // Don't probe cross-namespace Secrets that no ReferenceGrant
permits: the
+ // found/not-found warning difference would leak Secret
existence across
+ // namespaces. Emit a uniform message and skip the lookup.
+ if namespace != defaultNamespace &&
!controller.CheckConsumerSecretRef(ctx, v.Client, defaultNamespace, nn) {
+ warnings = append(warnings, fmt.Sprintf("Referenced
Secret '%s/%s' is not accessible from this Consumer without a ReferenceGrant",
nn.Namespace, nn.Name))
+ continue
+ }
Review Comment:
intentionally out of scope
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]