From 7f639d89b6c34a97f233884e2c6bf0a314ff2e63 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 2 Nov 2013 11:57:33 +0400 Subject: [PATCH] builder/amazon/*,builder/openstack: properly scrub sensitive [GH-554] --- CHANGELOG.md | 3 +++ builder/amazon/chroot/builder.go | 2 +- builder/amazon/ebs/builder.go | 2 +- builder/amazon/instance/builder.go | 2 +- builder/openstack/builder.go | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9781fa9d7..43e19cf48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ FEATURES: BUG FIXES: * core: Won't panic when writing to a bad pipe. [GH-560] +* builder/amazon/all: Properly scrub access key and secret key from logs. + [GH-554] +* builder/openstack: Properly scrub password from logs [GH-554] * common/uuid: Use cryptographically secure PRNG when generating UUIDs. [GH-552] diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go index f373b4ba2..b0a9df638 100644 --- a/builder/amazon/chroot/builder.go +++ b/builder/amazon/chroot/builder.go @@ -143,7 +143,7 @@ func (b *Builder) Prepare(raws ...interface{}) error { return errs } - log.Println(common.ScrubConfig(b.config), b.config.AccessKey, b.config.SecretKey) + log.Println(common.ScrubConfig(b.config, b.config.AccessKey, b.config.SecretKey)) return nil } diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index d315bc92f..f38c6826c 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -56,7 +56,7 @@ func (b *Builder) Prepare(raws ...interface{}) error { return errs } - log.Println(common.ScrubConfig(b.config), b.config.AccessKey, b.config.SecretKey) + log.Println(common.ScrubConfig(b.config, b.config.AccessKey, b.config.SecretKey)) return nil } diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index b9ab863c9..8b1a5f6af 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -159,7 +159,7 @@ func (b *Builder) Prepare(raws ...interface{}) error { return errs } - log.Println(common.ScrubConfig(b.config), b.config.AccessKey, b.config.SecretKey) + log.Println(common.ScrubConfig(b.config, b.config.AccessKey, b.config.SecretKey)) return nil } diff --git a/builder/openstack/builder.go b/builder/openstack/builder.go index 83c5e0b15..e1db7c5d5 100644 --- a/builder/openstack/builder.go +++ b/builder/openstack/builder.go @@ -51,7 +51,7 @@ func (b *Builder) Prepare(raws ...interface{}) error { return errs } - log.Println(common.ScrubConfig(b.config), b.config.Password) + log.Println(common.ScrubConfig(b.config, b.config.Password)) return nil }