storj/cmd
Ivan Fraixedes f5227abd36
uplink: enc.encryption-key flag is only available for setup command (#2090)
* uplink: Mark encryption key config field for setup
  Set the "setup" property to the `EncryptionConfig.EncrptionKey` for
  avoiding to save it in the configuration file.
  This field is only meant for using in the command line parameters which
  need to use a different encryption key than the one present in the key
  file or use it when there is not set any encryption key file path.
* cmd/uplink: Setup non-interactive accept enc key
  Change the uplink CLI setup command non-interactive to save the
  encryption key into a file when it's passed through the flag
  --enc.encryption-key
  Previous to this change it wasn't possible to create an key file despite
  of that the flag was provided, so it was useless on the setup command.
* cmd/uplink: Reuse logic to read pwd from terminal
  Reuse the logic which is already implemented in the pkg/cfgstruct for
  reading a password from the terminal on interactive mode, rather than
  duplicating it in the setup command.
* cmd/gateway: Use encryption key file flags
  The cmd/gateway was still using the `enc.key` configuration field which
  doesn't exist anymore and its setup command wasn't using the
  `enc.key-filepath` with combination of the `enc.encryption-key` for
  generating a file with the encryption key.
  This commit update the cmd/gateway appropriately and move to the uplink
  package the function used by cmd/uplink to save the encryption key for
  allowing to also be used by the cmd/gateway without duplicating the
  logic.
* cmd/storj-sim: Adapt gateway config cmd changes
  Adapt the cmd/storj-sim to correctly pass the parameters to the
  cmd/gateway setup and run command.
* scripts: Don't pass the --enc.encryption-key flag
  uplink configuration has changed to only support the
  `--enc.encryption-key` flag for setup commands and consequently the
  cmd/uplink and cmd/gateway don't accept this flag over other commands,
  hence the test for the uplink had to be updated for no passing the
  flag on the multiples calls that the test do to cmd/uplink.
* uplink: Remove func which aren't useful anymore
  Remove the function which allows to user or load an encryption key
  because it isn't needed anymore since the `--enc.encryption-key` flag is
  only available for the setup command.
  Consequently remove its usage from cmd/uplink and cmd/gateway, because
  such flag will always be empty because in case that's passed Cobra will
  return an error due to a "unknown flag".
2019-06-07 18:14:40 +02:00
..
bootstrap Command line flags features and cleanup (#2068) 2019-05-29 17:56:22 +00:00
certificates pkg/*: add monkit task to missing places (#2109) 2019-06-04 13:36:27 +02:00
gateway uplink: enc.encryption-key flag is only available for setup command (#2090) 2019-06-07 18:14:40 +02:00
identity pkg/*: add monkit task to missing places (#2109) 2019-06-04 13:36:27 +02:00
inspector Inspector draw routing table (#1732) 2019-04-22 11:34:11 +03:00
overlay Command line flags features and cleanup (#2068) 2019-05-29 17:56:22 +00:00
s3-benchmark aws s3 performance tests (#2060) 2019-05-28 11:46:58 -07:00
satellite pkg/bwagreements: remove service (#2138) 2019-06-06 15:57:58 +02:00
statreceiver Command line flags features and cleanup (#2068) 2019-05-29 17:56:22 +00:00
storagenode Command line flags features and cleanup (#2068) 2019-05-29 17:56:22 +00:00
storj-sim uplink: enc.encryption-key flag is only available for setup command (#2090) 2019-06-07 18:14:40 +02:00
uplink uplink: enc.encryption-key flag is only available for setup command (#2090) 2019-06-07 18:14:40 +02:00
versioncontrol Command line flags features and cleanup (#2068) 2019-05-29 17:56:22 +00:00