Skip to content

Commit

Permalink
padding ENV secret with HABITUS #70
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel van Gils committed Jun 19, 2017
1 parent a1b5eb2 commit 383f273
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/security_env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM alpine:3.5
ARG host
ENV cachebuster=223
RUN wget -qO- http://$host:8080/v1/secrets/env/my_env_secret | less
2 changes: 1 addition & 1 deletion secrets/env_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type EnvProvider struct {
}

func (env_provider *EnvProvider) GetSecret(name string) (string, error) {
key := env_provider.registry[name]
key := "HABITUS_" + env_provider.registry[name]
dat := os.Getenv(key)
return string(dat), nil
}
Expand Down

0 comments on commit 383f273

Please sign in to comment.