meta-issue: improvements to password authentication #51601
Labels
A-authentication
Pertains to authn subsystems
A-cc-enablement
Pertains to current CC production issues or short-term projects
A-security
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
meta-issue
Contains a list of several other issues.
T-server-and-security
DB Server & Security
X-server-triaged-202105
This issue is intended to serve as high-level overview of the strategy for password authn in CockroachDB/CC.
It outlines how the engineering discussions were orienting towards a "blue" strategy with limitations. It also explains how a different "green" strategy was developed recently. It explains why/how we are going to target "green" and de-prioritize "blue".
Background
Over the past two years a number of issues have been raised over seemingly disconnected aspects of pw authn, including but not limited to:
This collection of issues bury their lede: what is the high-level problem to solve?
They also point to conflicting directions: if we persist to use bcrypt-based authn, that precludes SCRAM-SHA-256 which is desirable for e.g. compatibility. Which one should we choose?
Objectives: security and compatibility
There are 3 security objectives:
A. protect CockroachDB/CC clusters against Denial-of-Service attacks, where a malicious users exhausts resources. This can be achieved today using e.g. many connections performing unsuccessful password authn attempts.
B. protect CockroachDB/CC clusters against various spoofing attacks, where a malicious user gains access to a SQL session they don't have legitimate access to.
C. make it possible for CC to offer services securely to end-users without requiring allow-listing of client IP addresses.
This objective partially overlaps with objectives A and B above, but restricts the range of allowable solutions.
We also want to offer some protection against the consequences of a CC node compromise (either server compromise or SQL escalation of privileges). We want that a successful attack of this type does not give the attacker access to other CC clusters from the same user/customer.
We also have one compatibility objective:
D. Whatever solution is adopted should enable client authn by existing pg drivers, without introducing non-standard authn algorithms.
Two strategies
Over the past year, there have been two strategies discussed to achieve the goals identified above.
The Blue strategy:
The Green strategy:
Blue strategy: narrative
In the gray strategy, we perform some incremental changes to various pieces in CockroachDB and achieve 60% of the security objectives.
Objective A:
Objective B:
Objective C: not covered by strategy
Objective D: the only authn method remains
password
, i.e. password as-is transferred over encrypted TLS connections. This is compatible with existing pg clients but does not achieve SCRAM compatibility.Green strategy: narrative
In the white strategy, we adopt a more principled approach.
Objective A:
Objective B: we mandate SCRAM for password authentication. SCRAM offers resistance to cred reuse and injection even when the transport is compromised by MITM. docs: new RFC on password modernization #51599 this also addresses pgwire: verifying user passwords is too aggressive #36160
Objective C:
Objective D: we support the pg-standard
scram-sha-256
password method. docs: new RFC on password modernization #51599Detailed explanation here: https://docs.google.com/document/d/1HOpN_P9fJOIyh-bCvOti6lBNLDS4Ia-2nrJEPGeUnA0/edit#
Summary: aiming for green
So we're going to aim for the "green" strategy and de-prioritize the proposals from the "blue" strategy.
The text was updated successfully, but these errors were encountered: