cockroachdb / cockroachdb/cockroach
cli: prompt for password when running workloads
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
When running `cockroach workload init`, passing a connection string that doesn't contain the password results in a failed authentication attempt rather than prompting for the password. There are other ways to configure the password without using plaintext such as environment variable but for continuity with `cockroach sql --url ` it would be great if a prompt could be added.
**Describe the solution you'd like**
workload commands using connection strings without the password such as `cockroach workload init tpcc "postgresql://chris@conn-test-8r76.gcp-us-west1.crdb.io:26257/tpcc...` should prompt for the password.
**Describe alternatives you've considered**
It was suggested that the COCKROACH_PASSWORD env var could accomplish this without input the password in plain text.
This is related to this ticket: https://cockroachlabs.atlassian.net/browse/CC-29370
Jira issue: CRDB-45299
Contributor guide
Assessment
This issue has not been assessed yet.