Show certificates from truststore in SSL info endpoint#48967
Show certificates from truststore in SSL info endpoint#48967garvit-joshi wants to merge 3 commits intospring-projects:mainfrom
Conversation
Signed-off-by: Garvit Joshi <garvitjoshi9@gmail.com>
|
Hello @garvit-joshi, thanks for the PR. I played around with it a bit, and while this works when the truststore has "Private Key" entries in it (secret key + certificate), it fails when a truststore only contains "Trusted Certificate" entries. The reason is that
To get the (leaf) certificate for a "Trusted Certificate" entry, you'd need to call You can use those two keystores to play around, the passwords for both the keystore and the private keys is We should also verify that it works with a test which doesn't reuse the keystore as the truststore. |
…store tests Signed-off-by: Garvit Joshi <garvitjoshi9@gmail.com>
|
Hi @mhalbritter, Thank you for the detailed feedback and for providing the test keystores! I've updated the implementation to handle trustedCertEntry entries. The code now first tries I've also added a new test Thanks again for your guidance! |
Signed-off-by: Garvit Joshi <garvitjoshi9@gmail.com>
|
Build got failed due to formatting issues. I have formatted the required files. |
…point This project demonstrates the functionality added in spring-projects/spring-boot#48967, which exposes truststore certificates through the SSL info actuator endpoint. The /actuator/info endpoint now includes: - Certificate chains with alias, issuer, subject, and validity info - Truststore certificates with the same detailed information - Support for multiple SSL bundles
|
Hi @mhalbritter, The SSL info endpoint now correctly returns:
|
See gh-48967 Signed-off-by: Garvit Joshi <garvitjoshi9@gmail.com>
|
Thanks @garvit-joshi ! |
Adds trustStoreCertificateChains field to BundleInfo to expose truststore certificates separately from keystore certificates in the SSL info endpoint.
Closes #45845