feat: allow validation of PIV certificate against a CA #589
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again,
This PR introduces an option to ensure users can only add ingress keys which have been signed by a predefined, trusted CA.
If an admin configures the new
pivValidationCA
to point to a CA certificate, the user will be prompted to upload his certificate, instead of the ssh public key. The Bastion then validates the certificated against the configured CA.The
yubico-piv-checker
will generate the ssh pubkey based on the provided certificate and returns it in the JSON output. There's also a new prompt to ask for "from" IPs, since that information can't be passed with the certificate that easily.A PR with the required changes for the
yubico-piv-checker
is here: ovh/yubico-piv-checker#9Currently everything is implemented in a none breaking way. Please let me know if you want any changes or have any suggestions.