cyberark / summon

CLI that provides on-demand secrets access for common DevOps tools
https://cyberark.github.io/summon
MIT License
704 stars 62 forks source link

Make list of environment variable names available in child process #199

Open doodlesbykumbi opened 3 years ago

doodlesbykumbi commented 3 years ago

Is your feature request related to a problem? Please describe

If we strip both @SUMMONENVFILE and the proposed @SUMMONDOCKERARGSwe see that at the core they use the list of summon injected envvar names. If you know that the envvars that summon injected are A, B and C, then the rest can be done in bash or otherwise with relative ease.

This allows us to not build special cases into Summon. Instead we provide primitives to accommodate such cases and beyond.

Describe the solution you would like

Perhaps Summon injects a special environment variable called SUMMONVARNAMES or has a substitution variable similar to @SUMMONENVFILE called @SUMMONVARNAMES.

Describe alternatives you have considered

N/A

Additional context

N/A

mcanevet commented 3 years ago

Maybe having a json output using a magic string (@SUMMONENVJSON or anything else) would do the trick. This output could be easily formatted with any external tool.