swarmkit icon indicating copy to clipboard operation
swarmkit copied to clipboard

"cluster inspect" prints bcrypted secret

Open aaronlehmann opened this issue 10 years ago • 1 comments

cluster inspect has the following code:

                        if policy.Secret != nil {
                                fmt.Fprintf(w, "    Secret\t: %v\n", string(policy.Secret.Data))
                        }

This appears to be printing bcrypted data. Since one would have reverse the hash to make any use of this output, what's the point of including it in the output?

ping @diogomonica @aluzzardi

aaronlehmann avatar Jul 02 '16 00:07 aaronlehmann

@aaronlehmann , IMO seeing something in the output lets you know that a secret is set, which is moderately useful. I think this is the only way to get at that information other than trying to join a new node to the swarm. Maybe something else would be better to print.

sfsmithcha avatar Jul 02 '16 02:07 sfsmithcha