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

   ### Description
   
   Adds a `file` secret manager so APISIX can read secrets that are mounted as 
files, like a Kubernetes Secret volume, instead of going through environment 
variables or an external manager. You add `/apisix/admin/secrets/file/<id>` 
with a `base_path`, and `$secret://file/<id>/<key>` resolves to the content of 
`<base_path>/<key>`.
   
   The key can point into subdirectories, but it can't start with `/` or 
contain `..` segments, so a reference can't read outside `base_path`. One 
trailing newline is dropped since most tools add one. Values go through the 
normal secret LRU cache, so a rotated Secret is picked up after the TTL without 
a restart.
   
   Tests are in `t/secret/file.t` (schema, key checks, reads, newline handling, 
`fetch_by_uri`, and key-auth with a file-backed key). Docs are in both en and 
zh `terminology/secret.md`, and the Admin API spec has a `FileSecret` schema 
with `admin-api.json` regenerated by `make bundle-admin-api-spec`. 
`validate-admin-api.py` and `t/openapi` pass.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #14099
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)


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