drGrove / mtls-cli

A short-lived certificate tool based on the Zero Trust network model
Other
27 stars 8 forks source link

Using with logcli #38

Open daurnimator opened 4 years ago

daurnimator commented 4 years ago

How can I use logcli to access a loki instance behind mtls?

Loki supports the env vars:

So the right wrapper/alias should work?

drGrove commented 4 years ago

All of the necessary things live in the $XDG_CONFIG_HOME/mtls.

Your key can be found at $XDG_CONFIG_HOME/mtls/$USER.key.gpg (which you would need to decrypt of course). Then the Client and Root certificate can be found at $XDG_CONFIG_HOME/mtls/<server-name>/<server-name>.pem and $XDG_CONFIG_HOME/mtls/<server-name>/<server-name>_Root_CA.pem.

Your key is encrypted to your PGP key mostly for safety reasons.

A mtls proxy command could be added as a separate option, but you wouldn't be able to wrap another command and keep the key old decrypted in memory to my knowledge

daurnimator commented 4 years ago

I'd love a subcommand e.g. mtls run logcli that would