Skip to content

Commit

Permalink
e2e: fix destination of templates in VaultSecrets test (#9146)
Browse files Browse the repository at this point in the history
The `$NOMAD_SECRETS_DIR` environment variable is rendered as `/secrets`, which
prior to the recent security patch would unintentionally escape the file
sandbox and get dropped in a directory named `/secrets` where the Nomad client
binary was running. The `VaultSecrets` test was accidentally relying on this
behavior and that causes the test to fail.
  • Loading branch information
tgross committed Oct 22, 2020
1 parent 3347b40 commit 8aed53c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/vaultsecrets/input/secrets.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ job "secrets" {
{{ end }}
EOT

destination = "${NOMAD_SECRETS_DIR}/certificate.crt"
destination = "secrets/certificate.crt"
change_mode = "noop"
}

Expand All @@ -42,7 +42,7 @@ EOT
SOME_SECRET={{ with secret "secrets-TESTID/data/myapp" }}{{- .Data.data.key -}}{{end}}
EOT

destination = "${NOMAD_SECRETS_DIR}/access.key"
destination = "secrets/access.key"
}

resources {
Expand Down

0 comments on commit 8aed53c

Please sign in to comment.