Add a -f option to let a user pass a filename for creating secrets#1595
Merged
Conversation
…DIN. Signed-off-by: cyli <ying.li@docker.com>
Current coverage is 53.89% (diff: 100%)@@ master #1595 diff @@
==========================================
Files 84 84
Lines 13942 13937 -5
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 7504 7511 +7
+ Misses 5429 5420 -9
+ Partials 1009 1006 -3
|
diogomonica
approved these changes
Sep 30, 2016
Contributor
diogomonica
left a comment
There was a problem hiding this comment.
Don't have preferences here as long as we chose our examples in the docs wisely.
Collaborator
|
Looks fine to me. I'm sure the real debate will play out when the Docker PR is reviewed, though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1589 This would read the secret from the file instead of STDIN.
This PR also servers as a platform for continuing the discussion from #1567 (comment) and doing a design discussion of what
docker secret create <secret-name>should look like.A summary of that discussion and some IRL discussions:
@aluzzardi suggests the following UI:
docker secret create foo barecho bar | docker secret create foo -echo bar > value.txt && docker secret create foo -f value.txtThe reason the current design does not to accept the secret itself as an argument is that we do not want to encourage users to type the secret into a command. If we did accept a secret as a direct argument, then it would be available in the shell history of any user that created one, unless they explicitly removed it.
With STDIN and file, we can't prevent them from echoing to STDIN or a file, but it doesn't legitimize that as a way to add a secret.
cc @dmp42 on UI
cc @diogomonica