shreemaan-abhishek opened a new pull request, #13162: URL: https://github.com/apache/apisix/pull/13162
## Summary In standalone YAML mode, `check_consumer` receives `conf_item.key` to determine whether an item is a consumer or a credential. This key is constructed from `item.id` or `item.username`, which means a consumer whose username happens to contain `/credentials/` (e.g. `john#1/credentials/john-a`) would be misidentified as a credential and validated against the wrong schema. This introduces `get_credential_key` which determines the credential key by checking `item.id` against the credential key pattern, rather than relying on the constructed conf key path. ## Test plan - Added `t/config-center-yaml/credentials.t` with a test case that validates a consumer with a username containing `/credentials/` is correctly validated against the consumer schema (not the credential schema). -- 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]
