cockroachdb / cockroachdb/cockroach

cli: prompt for password when running workloads

Open
#136,896 1 comment 0 reactions 0 assignees View on GitHub
A-testeng-perf C-enhancement T-testeng
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.