smallstep / cli

🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc.
https://smallstep.com/cli
Apache License 2.0
3.57k stars 247 forks source link

Allow users to define certificate comment in agent #1158

Closed redrac closed 2 months ago

redrac commented 2 months ago

Name of feature:

Allow users to define certificate comment in agent

Pain or issue this feature alleviates:

Added a comment flag which allows users to set the comment for a certificate when it gets added to an agent. It defaults to current behavior if not set, which is it uses the subject as the comment. This allows users who interact with multiple CAs with the same identity (email) to have multiple certificates in the agent. It also allows for use cases when users generate SSH certs with different extensions to load multiple certificates in their agent. One use case we currently have is we allow users to add the github extension to their certificate, but we also disable agent forwarding. A user might want to get a regular (non-github extension) certificate into their agent for regular SSHing with agent forwarding while also having another certificate that has the github extension that cannot be forwarded anywhere in their agent. Currently they cannot do this because step complains about duplicate certificates (because the subject is always the comment).