[FABC-905] Add passfile to server config file template#210
[FABC-905] Add passfile to server config file template#210stephyee wants to merge 1 commit intohyperledger:mainfrom
Conversation
c9fe885 to
7b34d63
Compare
| pflags.StringVarP(&s.homeDirectory, "home", "H", "", fmt.Sprintf("Server's home directory (default \"%s\")", filepath.Dir(cfg))) | ||
| util.FlagString(s.myViper, pflags, "boot", "b", "", | ||
| "The user:pass for bootstrap admin which is required to build default config file") | ||
| util.FlagString(s.myViper, pflags, "bootfile", "f", "", |
There was a problem hiding this comment.
Usage question here: when I try to specify a username and passfile, it complains because I haven't specified a password after a colon separator:
fabric-ca-server init -b admin -f pass.file
Error: Failed to create default configuration file: The value 'admin' on the command line is missing a colon separator
While it isn't too difficult to add the : after admin, it feels like we shouldn't require that when -f is used. Any reason that shouldn't be the case?
There was a problem hiding this comment.
As we discussed, this was a design choice (trying to change as little as possible). The init and start commands still require both -b admin:pass with the -f pass.file flag specified. The pass from -b user:pass will be used as a backup when a password cannot be read from pass.file when starting server.
Another option as you suggested is to allow only -b admin when -f pass.file is provided then
- Allow the server to error on startup if the pass.file cannot be read.
- Error when creating the default config file if the pass.file doesn't exist, cannot be read, etc.
Adds support for bootstrapping server using a password file. The password file will take precedence over password specified in config or flag. Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
|
@hyperledger/fabric-core-maintainers @hyperledger/fabric-ca-maintainers I attempted a rebase to resolve the conflicts, but I don't know the code well enough to make a choice. Could someone please rebase this for merging? |
Type of change
Description
Add server config option passfile. This config will take precedence over password and will not be stored in the generated yaml.
Related issues
FABC-905