Skip to content

roachprod: make clusters secure by default#123593

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
renatolabs:rc/roachprod-default-secure
May 6, 2024
Merged

roachprod: make clusters secure by default#123593
craig[bot] merged 2 commits intocockroachdb:masterfrom
renatolabs:rc/roachprod-default-secure

Conversation

@renatolabs
Copy link
Copy Markdown

roachprod: make clusters secure by default
Roachtest has been creating secure clusters in tests for a while
now. It makes sense for roachprod to use the same, better default when
setting up clusters.

If necessary, users can still create insecure clusters by passing the
--insecure flag to roachprod start and other commands.

Fixes: #38539

Release note: None

roachprod: use non-root user by default in roachprod sql
This brings roachprod's and roachtest's defaults closer. Now that we
create secure roachprod clusters by default (which includes creating
an admin user), we are able to change the default authentication mode
used when starting a SQL shell.

Like with pgurl, the authentication mode can be changed with the
--auth-mode command line flag.

Roachtest has been creating secure clusters in tests for a while
now. It makes sense for roachprod to use the same, better default when
setting up clusters.

If necessary, users can still create insecure clusters by passing the
`--insecure` flag to `roachprod start` and other commands.

Fixes: cockroachdb#38539

Release note: None
@renatolabs renatolabs requested a review from a team as a code owner May 3, 2024 19:42
@renatolabs renatolabs requested review from herkolategan and srosenberg and removed request for a team May 3, 2024 19:42
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

This brings roachprod's and roachtest's defaults closer. Now that we
create secure roachprod clusters by default (which includes creating
an admin user), we are able to change the default authentication mode
used when starting a SQL shell.

Like with `pgurl`, the authentication mode can be changed with the
`--auth-mode` command line flag.

Epic: none

Release note: None
@renatolabs renatolabs force-pushed the rc/roachprod-default-secure branch from 0ccbe82 to b632f68 Compare May 3, 2024 20:25
Copy link
Copy Markdown
Member

@srosenberg srosenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@renatolabs
Copy link
Copy Markdown
Author

TFTR!

bors r=srosenberg

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 6, 2024

@craig craig bot merged commit 27fc5d2 into cockroachdb:master May 6, 2024
@renatolabs renatolabs deleted the rc/roachprod-default-secure branch May 6, 2024 14:59
renatolabs pushed a commit to renatolabs/cockroach that referenced this pull request May 8, 2024
In cockroachdb#123593, we changed roachprod's default when starting clusters: it
will now start secure clusters unless the `--insecure` flag is
passed (mirroring cockroach's behaviour and flag name).

However, this leads to problems when running roachprod commands in
commits before and after this change. In this commit, we temporarily
reintroduce the `--secure` flag to roachprod to reduce
disruptions. Once the new default has existed for a while, we can
revert this commit.

Epic: none

Release note: None
craig bot pushed a commit that referenced this pull request May 8, 2024
123421: ci: check GHA results in TeamCity r=rickystewart a=rail

Bazel Essential CI is a no-op on master and release-24.1 since the GitHub Actions CI migration completed.

This PR adds a new TeamCity build configuration which polls the required GitHub action results and reflects the overall status in TeamCity.

Fixes: DEVINF-1124
Release note: None

123764: drtprod: add datadog-agent setup for workload-chaos r=sudomateo a=itsbilal

This change updates the drtprod script to add the workload-choas datadog-agent setup commands and config files.

Epic: none

Release note: None

123793: sql: don't use SetWithPlanner for `password_encryption` r=yuzefovich a=yuzefovich

Using the default Set method is sufficient.

Epic: None

Release note: None

123826: roachprod: reintroduce --secure flag r=dt,srosenberg a=renatolabs

In #123593, we changed roachprod's default when starting clusters: it will now start secure clusters unless the `--insecure` flag is passed (mirroring cockroach's behaviour and flag name).

However, this leads to problems when running roachprod commands in commits before and after this change. In this commit, we temporarily reintroduce the `--secure` flag to roachprod to reduce disruptions. Once the new default has existed for a while, we can revert this commit.

Epic: none

Release note: None

Co-authored-by: Rail Aliiev <rail@iqchoice.com>
Co-authored-by: Bilal Akhtar <bilal@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Renato Costa <renato@cockroachlabs.com>
srosenberg added a commit to srosenberg/cockroach that referenced this pull request Jun 4, 2025
As of [1], [2], `roachprod` defaulted to
"secure" mode to keep it in one-to-one
correspondence with `roachtest`. However,
upon further reflection (see an internal thread [3]),
"secure mode" adds an unnecessary friction.

As of this change, `roachprod` now defaults to
"insecure" mode while `roachtest` _continues_ to
default to "secure".

We also refactor `drtprod` to reuse the cli wrapper
from `roachprod`. This way both binaries have the same
behavior wrt `--insecure/--secure`.

[1] cockroachdb#123593
[2] cockroachdb#123826
[3] https://cockroachlabs.slack.com/archives/C023S0V4YEB/p1748888536180379?thread_ts=1724452649.312729&cid=C023S0V4YEB

Epic: none
Release note: None
srosenberg added a commit to srosenberg/cockroach that referenced this pull request Jun 26, 2025
As of [1], [2], `roachprod` defaulted to
"secure" mode to keep it in one-to-one
correspondence with `roachtest`. However,
upon further reflection (see an internal thread [3]),
"secure mode" adds an unnecessary friction.

As of this change, `roachprod` now defaults to
"insecure" mode while `roachtest` _continues_ to
default to "secure". Further, `drtprod` also
continues to default to "secure" mode.

[1] cockroachdb#123593
[2] cockroachdb#123826
[3] https://cockroachlabs.slack.com/archives/C023S0V4YEB/p1748888536180379?thread_ts=1724452649.312729&cid=C023S0V4YEB

Epic: none
Release note: None
craig bot pushed a commit that referenced this pull request Jun 27, 2025
147737: roachprod: default `--insecure` to `true` r=herkolategan,darrylwong,nameisbhaskar a=srosenberg

As of [1], [2], `roachprod` defaulted to
"secure" mode to keep it in one-to-one
correspondence with `roachtest`. However,
upon further reflection (see an internal thread [3]),
"secure mode" adds an unnecessary friction.

As of this change, `roachprod` now defaults to
"insecure" mode while `roachtest` _continues_ to
default to "secure". Further, `drtprod` also
continues to default to "secure" mode.

[1] #123593
[2] #123826
[3] https://cockroachlabs.slack.com/archives/C023S0V4YEB/p1748888536180379?thread_ts=1724452649.312729&cid=C023S0V4YEB

Epic: none

Release note: None

Co-authored-by: Stan Rosenberg <stan.rosenberg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

roachprod: Clusters should default to secure

3 participants