nebula icon indicating copy to clipboard operation
nebula copied to clipboard

🐛 FEATURE: Accept stdin for nebula-cert print

Open NiceGuyIT opened this issue 1 year ago • 3 comments

What version of nebula are you using?

1.6.0

What operating system are you using?

openSUSE Leap 15.4

Describe the Bug

nebula-cert requires the path to be on disk and does not accept - to indicate stdin. It would be nice if nebula-cert supported this so that the bare certificate doesn't need to be saved to disk.

This doesn't work.

yq '.pki.ca | .' < config.yml | nebula-cert print -path -
Error: unable to read cert; open -: no such file or directory

This works.

yq '.pki.ca | .' < config.yml > temp.crt
nebula-cert print -path temp.crt -json | jq '.details.notAfter'
rm temp.crt

Logs from affected hosts

N/A

Config files from affected hosts

N/A

NiceGuyIT avatar Sep 03 '22 16:09 NiceGuyIT

Anyone care if I plan on doing this for hacktoberfest?

jrwren avatar Sep 17 '22 17:09 jrwren

I usually work around this by using:

nebula-cert print -path /dev/stdin

But I agree that making this easier with - would be nice.

wadey avatar Sep 21 '22 14:09 wadey