Summary
Add op-mode command having ability to show certificate full chain in pem format as part of PKI configuration.
Use case
Currently, we have the following to render certificate in PEM format.
- show pki ca <NAME> pem
- show pki certificate <NAME> pem
- show pki certificate <NAME> private pem
But there isn’t a way to render the full chain including the intermediate CA (and the certificate perivate key if requested) for the certificate in PEM format.
We need to allow users to easily export a certificate along with its CA hierarchy for use in external applications that require the full chain to be provided in a single file.
So, for completeness we should have:
- For ca:
- show pki ca NAME pem
- show pki ca NAME pem full-chain
- For certificate:
- show pki certificate NAME pem
- show pki certificate NAME pem full-chain
- show pki certificate NAME private pem
- show pki certificate NAME private pem full-chain
Additional information
The security concern for exposing private key is orthogonal to the implementation.
Necessary restrictions to the operator commands can be applied via command-policy
like set system login operator-group NAME command-policy.