question: `eyaml createkeys --help` shows a `--pkc...
# puppet
j
question:
eyaml createkeys --help
shows a
--pkcs7-subject=<s>
option, but when i try to use it i get an error message and no public key file is written. is this a bug or am i doing something wrong?
Copy code
# eyaml createkeys --pkcs7-subject 'EYAML Encryption Key'
[hiera-eyaml-core] no implicit conversion of nil into String
# ls -l keys/
total 12
-rw-------. 1 root root 1675 Aug 19 18:20 private_key.pkcs7.pem
#
(this is PE2023.8.5 on RHEL 9 if that matters)
using
eyaml createkeys
with no options seems to work, although the certificate in the generated public has an empty subject.
Copy code
# openssl x509 -noout -subject -in keys/public_key.pkcs7.pem
subject=
c
That's not an option I've ever seen used in practice. My advice would be to just ignore it. I think
hiera-eyaml
has even moved away from using a full x509 certificate and just uses a bare public key.
j
i also thought it was just a public key, but the
public_key.pkcs7.pem
file does contain an X509 certificate. plus the option is there to set the subject, but it doesn't work, so if nothing else it is a low-level bug that should probably be fixed. i wanted to be sure i wasn't using it incorrectly before opening a ticket to report it as a bug (or is eyaml separate from "puppet inc." and i need to open an issue in a github repo somewhere? i haven't dug into it that far yet)
c
eyaml
is a Vox project, so not something Puppet can ship changes for.
j
okay, i'll go look for it (tomorrow) and report it there ... thanks for clarifying
c
Looking at the key generation function, there's no logic that sets the `subject`: https://github.com/voxpupuli/hiera-eyaml/blob/master/lib/hiera/backend/eyaml/encryptors/pkcs7.rb#L64-L92 So, that CLI flag looks like wiring that doesn't attach to anything.
Ah, it was intentionally removed from key generation: https://github.com/voxpupuli/hiera-eyaml/pull/380 But, probably forgot to get rid of the flag definition on the CLI parser.
k
I don't see a
--pkcs7-subject
option with eyaml 4.3.0 🤷
j
this is on PE 2023.8.5, which has eyaml 3.4.0 ...
eyaml createkeys --help
shows a
--pkcs7-subject=<s>
option, and it seems to recognize it AS an option, but when i try to use it it throws an error message ... like @csharpsteen said, it looks like maybe they tried to remove it but forgot to remove it from the command line parser
k
The option probably never worked. There wasn’t a commit for removing the command line option (I’m one of the maintainers)
The version you’re using is before the nonessential attributes were removed.
This is an example of why I think it’s best to just run the latest PE version
j
i'm using the LTS version ... while the concept of "LTS" continues to exist i guess