Repository navigation
Conversation
moonming
left a comment
There was a problem hiding this comment.
The field-specific handling makes sense for the Admin API fix. There are two related cases worth covering here or tracking separately: deployment.etcd.password (and the top-level etcd.password) and apisix.data_encryption.keyring. Their schemas require strings, but substitutions outside deployment.admin.admin_key[].key still go through tonumber / boolean conversion. A numeric etcd password or a digit-only keyring entry therefore still loses its original type. Could we add regression coverage for those fields and make the remaining scope explicit?
Please also add an upgrade note: environment-supplied Admin API keys such as 0 or false, which previously did not match a request, will start matching their exact text after this change. Deployments using those values as placeholders should replace or remove them before upgrading. This concerns environment-variable substitutions; it does not mean this PR converts numeric YAML literals into strings.
References: the current field allowlist, etcd string fields, and keyring string schema.
|
Thanks, @moonming. I updated the PR in 10bd0e0 to preserve environment-substituted values as strings for both etcd password paths and for I added an upgrade note to the English and Chinese Admin API docs. It asks operators to replace or remove environment-supplied placeholder keys such as I verified the new CLI configurations in the APISIX Docker image and checked the Admin API over HTTP. |
Description
An Admin API key from
config.yamlcan lose its type or spelling during environment-variable substitution. For example,00123456becomes the number123456, which does not match the request header.Keep substitutions under
deployment.admin.admin_key[].keyas 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
bash -n t/cli/test_standalone.shandgit diff --checkpassed.Checklist
AI assistance: Codex helped implement and verify the change.