shreemaan-abhishek opened a new pull request, #2899: URL: https://github.com/apache/apisix-ingress-controller/pull/2899
## Summary When the Consumer webhook rejects a duplicate `key-auth` key, the error names the Consumer that already holds the key as `namespace/name`. Consumers from every namespace that share a Gateway are compared, so the error can name a Consumer in a namespace the requester has no access to. The error now names the owner only when it is in the requester's own namespace. Otherwise it reads `duplicate key-auth credential already used by another Consumer`. Same-namespace behavior is unchanged. ## Tests - `TestConsumerValidator_DenyDuplicateKeyAuthCredentialCrossNamespace` asserts a cross-namespace collision is still denied without naming the other Consumer. - `TestConsumerValidator_CrossNamespaceKeyAuthDuplicateOracleSuppressed` now matches the current error prefix. Its old string (`duplicate key-auth credential key`) no longer exists in the code, so the assertion could never fail. -- 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]
