pulumi/cmd
Joe Duffy b2c91f7c24
Detect secret-like config (#1689)
Previously, we would unconditionally warn anytime you added a non-secret
config:

    $ pulumi config set aws:region us-west-2
    warning: saved config key '%s' value '%s' as plaintext;
        re-run with --secret to encrypt the value instead.
        Use --plaintext to avoid this warning

This was particularly annoying, since it is very common to store
non-secret config. For instance, the AWS region. And it was easy to tune
out because it wasn't actually warning about anything interesting.

This change, which resolves pulumi/pulumi#570, uses an approach similar
to Go's gas linter, to detect high entropy values, and issue an error.
This ensures that we only make noise on things we suspect are actually
secrets being stored in plaintext, and forces the user to pass
--plaintext. For instance, the common case issues no errors:

    $ pulumi config set aws:region us-west-2

And in the event that you store something that is secret-like:

    $ pulumi config set aws:region nq8r4B4xslzrtj0a3
    error: config value 'nq8r4B4xslzrtj0a3' looks like a secret;
        rerun with --secret to encrypt it, or --plaintext if you meant
        to store in plaintext

To suppress this, simply pass --secret (to encrypt) or --plaintext (to
override the warning).
2018-08-02 04:14:16 -07:00
..
archive.go Add license headers 2018-05-22 15:02:47 -07:00
cancel.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
config.go Detect secret-like config (#1689) 2018-08-02 04:14:16 -07:00
config_test.go Add license headers 2018-05-22 15:02:47 -07:00
destroy.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
gen_bash_completion.go Add license headers 2018-05-22 15:02:47 -07:00
gen_markdown.go Add license headers 2018-05-22 15:02:47 -07:00
login.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
logout.go Add license headers 2018-05-22 15:02:47 -07:00
logs.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
logs_test.go Add license headers 2018-05-22 15:02:47 -07:00
new.go Make minor improvements to pulumi new (#1659) 2018-07-26 15:49:12 -07:00
plugin.go Add license headers 2018-05-22 15:02:47 -07:00
plugin_install.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
plugin_ls.go Add license headers 2018-05-22 15:02:47 -07:00
plugin_rm.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
preview.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
pulumi.go Prefer "up" over "update" (#1672) 2018-07-31 10:22:16 -07:00
refresh.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_export.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_graph.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_import.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_init.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_ls.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_output.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_output_test.go Add license headers 2018-05-22 15:02:47 -07:00
stack_rm.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
stack_select.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
up.go Prefer "up" over "update" (#1672) 2018-07-31 10:22:16 -07:00
util.go Add optional CI properties to environment metadata (#1678) 2018-07-31 21:38:07 -07:00
version.go Add license headers 2018-05-22 15:02:47 -07:00
whoami.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00