Skip to content

Commit

Permalink
vault-exec-agent: filter out vault-exec-agent's VAULT_* env vars befo…
Browse files Browse the repository at this point in the history
…re exec-ing
  • Loading branch information
jf committed Sep 2, 2024
1 parent aa3c16e commit b0fe425
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vault-exec-agent/vault-exec-agent.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,16 @@
{}
merged-secret-values))

(def filtered-secret-values
(-> merged-secret-values
(dissoc "VAULT_ADDR"
"VAULT_KV_MOUNT_PATH"
"VAULT_KV_PATH"
"VAULT_TOKEN")))

;; exec program with args with supplied; otherwise the practical result is to simply fileify out the *_FILE env vars
(if *command-line-args*
(apply exec {:extra-env fileified-secret-values} *command-line-args*)
(apply exec {:extra-env filtered-secret-values} *command-line-args*)
"")

(comment
Expand Down

0 comments on commit b0fe425

Please sign in to comment.