Skip to content

Commit

Permalink
FIX / conclude filtering for 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 ea79086 commit acc01b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vault-exec-agent/vault-exec-agent.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,17 @@
{}
merged-secret-values))

(def filtered-secret-values
(-> fileified-secret-values
(def complete-env
(-> (into {} (System/getenv))
(merge fileified-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 filtered-secret-values} *command-line-args*)
(apply exec {:env complete-env} *command-line-args*)
"")

(comment
Expand Down

0 comments on commit acc01b7

Please sign in to comment.