Rita via plug on 10 Jan 2024 17:18:56 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] secure variables in bash


I am hoping there is a clever, unix-y way to do this. 

I have something like this, 

secret=$(curl https://server/api/creds | jq .Secret)
process --secret=$secret

This works fine, but I was wondering if there was a better way to secure my "secret" with tools like ssh, gpg, etc..

My intention is to avoid seeing secret from `ps` or `bash -x`.  It seems deceptively simple but quite hard to do.

Any ideas?




--
--- Get your facts first, then you can distort them as you please.--
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug