Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeoFS CLI input credentials #610

Closed
alexvanin opened this issue Jun 15, 2021 · 1 comment · Fixed by #612
Closed

NeoFS CLI input credentials #610

alexvanin opened this issue Jun 15, 2021 · 1 comment · Fixed by #612
Assignees
Labels
bug Something isn't working

Comments

@alexvanin
Copy link
Contributor

NeoFS CLI help command suggests to pass WIF, hex or wallet file to get private key.

$ neofs-cli --help
...
Flags:
...
  -k, --key --key new         private key in hex, WIF, NEP-2 or filepath (use --key new to generate key for request)

However after #562 it is not true. I suggest to keep support of WIF or hex encoded files, but we can do that in different arguments (the same way as NEOFS_KEY and NEOFS_WALLET are the same arguments in storage node config).

@alexvanin
Copy link
Contributor Author

alexvanin commented Jun 15, 2021

My proposal to have these arguments used in such priority:

--generated-key                 // generates new private key in runtime
--wif <WIF>                     // expects string with WIF
--binary-key <path>             // expects 32 byte binary file
--wallet -w <path>              // expects path to NEP-2 or NEP-6 wallet file
--address -a <wallet-address>   // used with `--wallet`

You can change naming as you want, though.

Abhimanyu121 added a commit to Abhimanyu121/neofs-node that referenced this issue Jul 27, 2021
Abhimanyu121 added a commit to Abhimanyu121/neofs-node that referenced this issue Jul 29, 2021
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Mar 5, 2022
Currently have static priority of what key is used irregardless of
whether a flag was provided via CLI or in config. This makes it
impossible to override some of the config settings. While we could try
to check if the key is provided by CLI by binding CLI flag under to
viper under a different name the same problem would occur for config/environment
variables. Fixing all of this with current set of keys is too complicate.
In this commit we revert changes from nspcc-dev#610 and use a single flag for all types of keys.

Signed-off-by: Evgenii Stratonikov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants