qingtianbuyu opened a new pull request, #14243: URL: https://github.com/apache/apisix/pull/14243
### Description Clients that manage certificates through the Admin API need the validity window to plan renewal. The API also needs to catch a mismatched certificate and private key when the configuration is submitted, before it reaches the data plane. - Return `validity_start` and `validity_end` as Unix seconds on SSL list and detail responses. Derive the dates from the first certificate in each PEM chain at read time. - Return `certs_validity` in the same order as `certs`, with `null` entries for references or certificates whose dates cannot be parsed. Continue omitting `key` and `keys` from SSL GET responses. - Validate inline certificate and private-key pairs in SSL Admin API writes. A mismatch returns HTTP 400. A `PATCH` validates the merged resource, so an existing mismatch must be corrected when that resource is updated. Expired certificates with matching keys can still be updated or disabled. - Update the English and Chinese Admin API docs, the OpenAPI schema and bundle, and the Admin API regression tests. #### Which issue(s) this PR fixes Related to #1571, which requested SSL expiration metadata. ### Validation - Exercised the SSL Admin API against an isolated APISIX and etcd instance. Checked RSA and ECDSA pairs, PEM chains, mismatched writes, expired certificate updates, validity fields, and references. - Ran Lua syntax checks on the changed source files and all 28 Lua test blocks in `t/admin/ssl.t`. - Ran `make bundle-admin-api-spec` and verified that the generated bundle matches the committed file. `git diff --check` passed. - The full Test::Nginx run and upstream CI checks are pending. ### 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 - [ ] I have verified that this change is backward compatible -- 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]
