Skip to content

Conversation

@souravcrl
Copy link
Contributor

@souravcrl souravcrl commented Dec 8, 2025

We introduce an --allow-debug-user flag which now enables the debug_user
from access to both sql and rpc apis.

fixes: None
Epic CRDB-49035

Release Note(security change): We are adding a new flag
--allow-debug-user to the cockroach start command to explicitly allow
enabling the debug_user to log into the system. This flag is currently
experimental and is disabled by default. When not set, authentication
attempts by debug_user will be rejected with an error:
"certificate authentication failed for user "debug_user"" for SQL connections
and "failed to perform RPC, as debug_user login is not allowed" for RPC
connections.

This flag is intended for debugging and troubleshooting purposes and should
only be enabled when necessary for diagnostic operations. The debug_user
should be disabled when not actively in use.

Note: Certificates must include "debug_user" as one of the principals
(CommonName or SubjectAlternativeName) for this functionality. The flag
controls whether such certificates are accepted for both SQL client
connections and RPC connections.

@souravcrl souravcrl requested review from a team as code owners December 8, 2025 05:07
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@souravcrl
Copy link
Contributor Author

test failure not related to the functionality. Being tracked here: #158950

@souravcrl
Copy link
Contributor Author

TFTR!

bors r=pritesh-lahoti

craig bot pushed a commit that referenced this pull request Dec 8, 2025
158963: cli, security: add `--allow-debug-user` flag to enable debug user r=pritesh-lahoti a=souravcrl

 We introduce an `--allow-debug-user` flag which now enables the debug_user
 from access to both sql and rpc apis.

fixes: None
Epic CRDB-49035

 Release Note(security change): We are adding a new flag
 `--allow-debug-user` to the cockroach start command to explicitly allow
 enabling the debug_user to log into the system. This flag is currently
 experimental and is disabled by default. When not set, authentication
 attempts by `debug_user` will be rejected with an error: 
`"certificate authentication failed for user "debug_user""` for SQL connections
 and `"failed to perform RPC, as debug_user login is not allowed"` for RPC
 connections.

 This flag is intended for debugging and troubleshooting purposes and should
 only be enabled when necessary for diagnostic operations. The debug_user
 should be disabled when not actively in use.

 Note: Certificates must include "debug_user" as one of the principals
 (CommonName or SubjectAlternativeName) for this functionality. The flag
 controls whether such certificates are accepted for both SQL client
 connections and RPC connections.

Co-authored-by: souravcrl <sourav.sarangi@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Dec 8, 2025

Build failed:

@souravcrl
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Dec 9, 2025
158963: cli, security: add `--allow-debug-user` flag to enable debug user r=souravcrl a=souravcrl

 We introduce an `--allow-debug-user` flag which now enables the debug_user
 from access to both sql and rpc apis.

fixes: None
Epic CRDB-49035

 Release Note(security change): We are adding a new flag
 `--allow-debug-user` to the cockroach start command to explicitly allow
 enabling the debug_user to log into the system. This flag is currently
 experimental and is disabled by default. When not set, authentication
 attempts by `debug_user` will be rejected with an error: 
`"certificate authentication failed for user "debug_user""` for SQL connections
 and `"failed to perform RPC, as debug_user login is not allowed"` for RPC
 connections.

 This flag is intended for debugging and troubleshooting purposes and should
 only be enabled when necessary for diagnostic operations. The debug_user
 should be disabled when not actively in use.

 Note: Certificates must include "debug_user" as one of the principals
 (CommonName or SubjectAlternativeName) for this functionality. The flag
 controls whether such certificates are accepted for both SQL client
 connections and RPC connections.

Co-authored-by: souravcrl <sourav.sarangi@cockroachlabs.com>
@souravcrl
Copy link
Contributor Author

bors r-

@craig
Copy link
Contributor

craig bot commented Dec 9, 2025

Canceled.

 We introduce an `--allow-debug-user` flag which now enables the debug_user from access to both sql and rpc apis.

fixes: None
Epic CRDB-49035

 Release Note(security change): We are adding a new flag
 `--allow-debug-user` to the cockroach start command to explicitly allow
 enabling the debug_user to log into the system. This flag is currently
 experimental and is disabled by default. When not set, authentication
 attempts by `debug_user` will be rejected with an error: `"certificate
 authentication failed for user "debug_user""` for SQL connections and
 `"failed to perform RPC, as debug_user login is not allowed"` for RPC
 connections.

 This flag is intended for debugging and troubleshooting purposes and should
 only be enabled when necessary for diagnostic operations. The debug_user
 should be disabled when not actively in use.

 Note: Certificates must include "debug_user" as one of the principals
 (CommonName or SubjectAlternativeName) for this functionality. The flag
 controls whether such certificates are accepted for both SQL client
 connections and RPC connections.
@souravcrl
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Dec 10, 2025

@craig craig bot merged commit 81e306b into cockroachdb:master Dec 10, 2025
22 of 24 checks passed
@souravcrl souravcrl deleted the gate-debug-user branch December 11, 2025 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants