cockroachdb / cockroachdb/cockroach

rpc: improve security posture of debug zip user

Open
#158,754 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

We have a created role `debug_user` to collect debug zips. The user needs to be manually created and managed by the cluster administrator. This improves the current security status quo of having to always have a root user to manage the cluster and makes the cockroachdb cluster compliant to security standards since the `debug_user` can be disabled by dropping the user associated with the role.

After some discussions with @cthumuluru-crdb and @aa-joshi, we came to the conclusion that the security posture can be further improved by having a whitelisting for the admin and status endpoints which are only needed for debug zip service. The complete list can be found [here](https://docs.google.com/document/d/1fPsIqLPbhmXtHOnPH5KH5YQhxBz_1QWI_nVFXslBCg0/edit?tab=t.0#heading=h.ku4tvtfr2xtj). This will allow us to have gated access to RPCs and further improve the debug zip service.

Jira issue: CRDB-57473

Contributor guide

Open the contributing guide

Research direction

Start with the debug zip service and the admin and status endpoints listed in the linked design document. Trace how the debug_user role is created and used, then establish the gated RPC scope and verify that debug zip collection works without a root user and that the associated user can be disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.