| So one issue with using the ruby bindings for openssl is that OpenSSL::X509::Certificate#to_text will print the long friendly name for the extension (assuming the puppet ssl application registers the puppet extensions). So you'll see something like:
Puppet Node Role Name: |
..ci
|
But when writing a manifest, the trusted hash is keyed by the short friendly name:
So I'm thinking it would be most helpful if the command printed the short friendly name, with perhaps an option to show the full OID (in this example "1.3.6.1.4.1.34380.1.1.13"). What about something like?
$ bundle exec puppet ssl show |
Subject: CN=localhost |
Issuer: CN=Puppet CA: localhost |
Serial: 3 |
Validity: '2020-12-02 19:23:06 UTC' to '2025-12-02 19:23:06 UTC' |
Extensions: |
pp_role: ci |
pp_zone: lab |
pp_environment: devel |
pp_datacenter: us1 |
pp_application: jenkins
|
Are there other fields you'd want to see (fingerprint, subjectKeyIdentifier, authorityKeyIdentifier)? |