Ymmcc opened a new pull request, #14184:
URL: https://github.com/apache/apisix/pull/14184

   ### Description
   
   An Admin API key from `config.yaml` can lose its type or spelling during 
environment-variable substitution. For example, `00123456` becomes the number 
`123456`, which does not match the request header.
   
   Keep substitutions under `deployment.admin.admin_key[].key` as strings, 
including when the YAML field name itself comes from an environment variable. 
Keep numeric and boolean inference for other fields.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #14178
   
   ### Testing
   
   - Reproduced the conversion in the production Lua resolver under LuaJIT. The 
same check passes after the change and covers leading zeros, boolean-looking 
secrets, multiple keys, defaults, and regular numeric/boolean fields.
   - Added a standalone CLI integration regression for both valid keys and the 
rejected key without leading zeros.
   - `bash -n t/cli/test_standalone.sh` and `git diff --check` passed.
   - The container-based HTTP check is in progress.
   
   ### Checklist
   
   - [x] Explained the need and the change
   - [x] Added regression coverage
   - [x] Updated the Admin API documentation in English and Chinese
   - [x] Verified existing numeric and boolean substitutions
   
   AI assistance: Codex helped implement and verify the change.
   


-- 
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]

Reply via email to