cockroachdb / cockroachdb/cockroach
security/ldapauth: LDAP bind credentials in HBA conf are a security risk
- 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.**
LDAP authentication bind credentials (e.g., bind DN and bind password) are currently configured inline within the HBA configuration. This presents several security concerns:
1. **Credential exposure**: Sensitive credentials like the bind password must be written in plaintext into the HBA configuration, which is visible to any user with access to cluster settings.
2. **No independent rotation**: If credentials are compromised, rotating them requires a full HBA configuration update for the cluster. This is a risky operation since an incorrect HBA update can lock out users or disrupt authentication entirely.
3. **Blast radius of HBA updates**: Coupling credential rotation with the full HBA configuration means that a simple password change carries the risk of accidentally modifying authentication rules, potentially causing outages.
4. **No separation of concerns**: Security teams managing LDAP credentials may not be the same teams managing HBA authentication rules, but the current design forces both through the same configuration surface.
**Describe the solution you'd like**
Support a mechanism for managing LDAP bind credentials independently from the HBA configuration, so that credentials can be rotated without requiring a full HBA update and without exposing them in the HBA plaintext.
**Describe alternatives you've considered**
Open for discussion — the right approach depends on how CockroachDB wants to separate credential management from authentication policy configuration.
Jira issue: CRDB-64862
Epic CRDB-54682
Contributor guide
Research direction
Start by reviewing how LDAP bind credentials are currently configured inline in the HBA configuration. The issue leaves the mechanism open for discussion, so first clarify how credentials could be managed and rotated independently; done means they can be rotated without a full HBA update or exposing them in plaintext there.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100