You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/current/_includes/releases/v25.3/v25.3.0-rc.1.md
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ Release Date: July 23, 2025
12
12
[#150366][#150366]
13
13
- The session setting `optimizer_min_row_count`, which sets a lower bound on row count estimates for relational expressions during query planning, is now set to `1` by default.
14
14
[#150376][#150376]
15
+
- The `options` column in the output of `SHOW ROLES` and `SHOW USERS` is now returned as an array of strings (e.g., `{NOLOGIN,CREATEDB}`) rather than as a single comma-separated string. This enables more efficient querying of role options using array functions like `unnest()`. For example: `SELECT * FROM [SHOW ROLES] AS r WHERE EXISTS (SELECT 1 FROM unnest(r.options) AS m(option) WHERE option LIKE 'SUBJECT=cn%');`
16
+
[#149537][#149537]
17
+
- The `SHOW ROLES` and `SHOW USERS` commands now include an `estimated_last_login_time` column that displays the estimated timestamp of when each user last authenticated to the database. This column shows `NULL` for users who have never logged in, and for existing users after upgrading to v25.3 until their next login. The tracking is performed on a best-effort basis and may not capture every login event.
Copy file name to clipboardExpand all lines: src/current/v24.3/ldap-authentication.md
+16-10Lines changed: 16 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,13 @@ summary: Learn how to configure CockroachDB for user authentication using LDAP-c
4
4
toc: true
5
5
---
6
6
7
-
CockroachDB supports authentication and authorization using LDAP-compatible directory services, such as Active Directory and Microsoft Entra ID. This allows you to integrate your cluster with your organization's existing identity infrastructure for centralized user management and access control.
7
+
{{site.data.alerts.callout_info}}
8
+
{% include feature-phases/preview.md %}
9
+
{{site.data.alerts.end}}
10
+
11
+
CockroachDB supports authentication and authorization using systems compatible with the Lightweight Directory Access Protocol (LDAP), such as Active Directory and Microsoft Entra ID. This allows you to integrate your cluster with your organization's existing identity infrastructure for centralized user management and access control.
8
12
9
-
This page describes how to configure CockroachDB user authentication using LDAP. You can additionally configure CockroachDB to use the same directory service for user [authorization]({% link v24.3/ldap-authorization.md %}) (role-based access control), which assigns CockroachDB roles to users based on their group memberships in the directory.
13
+
This page describes how to configure CockroachDB user authentication using LDAP. You can additionally configure CockroachDB to use the same directory service for user [authorization]({% link {{ page.version.version }}/ldap-authorization.md %}) (role-based access control), which assigns CockroachDB roles to users based on their group memberships in the directory.
10
14
11
15
## Overview
12
16
@@ -21,12 +25,16 @@ While LDAP configuration is cluster-specific, each request to authenticate a use
21
25
- If a matching record was found, the cluster attempts to verify the user's identity through another LDAP request, this time using the credentials (username and password) provided by that user.
22
26
- If this LDAP bind operation succeeds, the user is authenticated to the CockroachDB cluster.
23
27
1. Authorize the user (optional)
24
-
- If [LDAP authorization]({% link v24.3/ldap-authorization.md %}) is also enabled, an additional request is sent to retrieve the groups to which the user is assigned, using configurable criteria.
28
+
- If [LDAP authorization]({% link {{ page.version.version }}/ldap-authorization.md %}) is also enabled, the cluster sends an additional request to retrieve the groups to which the user is assigned, using configurable criteria.
25
29
- If group memberships are found, any existing CockroachDB roles that match these group names are assigned to the user.
26
30
27
31
These requests use a node's existing connection to the LDAP server, if one is open. Otherwise, the node establishes a new connection. The connection remains open for handling additional LDAP requests until it is closed by the LDAP server, based on its timeout setting.
28
32
29
-
Because CockroachDB maintains no more than one LDAP connection per node, for a cluster with `n` nodes, you can expect up to `n` concurrent LDAP connections.
33
+
Because CockroachDB maintains no more than one LDAP connection per node, for a cluster with `n` nodes, you can expect up to `n` concurrent LDAP connections.
34
+
35
+
{{site.data.alerts.callout_info}}
36
+
LDAP authentication cannot be used for the `root` user or other [reserved identities]({% link {{ page.version.version }}/security-reference/authorization.md %}#reserved-identities). You must manage credentials for `root` separately using password authentication to ensure continuous administrative access regardless of LDAP availability.
37
+
{{site.data.alerts.end}}
30
38
31
39
## Configuration
32
40
@@ -96,17 +104,15 @@ SET CLUSTER SETTING server.ldap_authentication.client.tls_key = '<PEM_ENCODED_KE
96
104
97
105
### Step 4: Sync database users
98
106
107
+
Before LDAP authentication can be enabled for a user, you must create the username directly in CockroachDB. You will need to establish an automated method for keeping users in sync with the directory server, creating and dropping them as needed.
108
+
99
109
{{site.data.alerts.callout_info}}
100
-
LDAP authentication cannot be used for the `root` user or other [reserved identities]({% link {{ page.version.version }}/security-reference/authorization.md %}#reserved-identities). Credentials for `root` must be managed separately using password authentication to ensure continuous administrative access regardless of LDAP availability.
110
+
As of v25.3, CockroachDB can automatically provision users during their first successful LDAP authentication. Refer to the [latest version]({% link {{ site.versions.stable }}/ldap-authentication.md %}) of this page.
101
111
{{site.data.alerts.end}}
102
112
103
-
Before LDAP authentication can be used for a user, the username must be created directly in CockroachDB. You will need to establish an automated method for keeping users in sync with the directory server, creating and dropping them as needed.
104
-
105
113
For Active Directory deployments, the CockroachDB username can typically be set to match the `sAMAccountName` field from the `user` object. This field name would need to be specified in the HBA configuration using `ldapsearchattribute=sAMAccountName`.
106
114
107
-
{{site.data.alerts.callout_info}}
108
115
SQL usernames must comply with CockroachDB's [username requirements]({% link {{ page.version.version }}/create-user.md %}#user-names). Ensure that the values in the field you are using for `ldapsearchattribute` meet these requirements.
109
-
{{site.data.alerts.end}}
110
116
111
117
To create a single user:
112
118
@@ -196,4 +202,4 @@ Potential issues to investigate may pertain to:
196
202
2. Use LDAPS (LDAP over TLS) in production environments.
197
203
3. Use a restricted service account for directory searches.
198
204
4. Regularly audit LDAP group memberships.
199
-
5. Monitor authentication logs for unusual patterns.
205
+
5. Monitor authentication logs for unusual patterns.
Copy file name to clipboardExpand all lines: src/current/v24.3/ldap-authorization.md
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,11 @@ summary: Learn how to configure role-based access control (authorization) using
4
4
toc: true
5
5
---
6
6
7
-
You can configure your cluster to assign [roles]({% link {{ page.version.version }}/ldap-authentication.md %}) based on a user's group membership in an LDAP service, such as Active Directory or Microsoft Entra ID.
7
+
{{site.data.alerts.callout_info}}
8
+
{% include feature-phases/preview.md %}
9
+
{{site.data.alerts.end}}
10
+
11
+
If you manage users through a service compatible with the Lightweight Directory Access Protocol (LDAP), such as Active Directory or Microsoft Entra ID, you can configure CockroachDB to automatically assign [roles]({% link {{ page.version.version }}/security-reference/authorization.md %}) to users based on LDAP group memberships, simplifying access control.
8
12
9
13
When enabled:
10
14
@@ -14,15 +18,15 @@ When enabled:
14
18
15
19
## Prerequisites
16
20
17
-
- Enable [LDAP Authentication]({% link {{ page.version.version }}/ldap-authentication.md %}).
21
+
- Enable [LDAP authentication]({% link {{ page.version.version }}/ldap-authentication.md %}).
18
22
19
23
## Configuration
20
24
21
25
Before you begin, it may be useful to enable authentication logging, which can help you confirm sucessful configuration or troubleshoot issues. For details, refer to [Troubleshooting](#troubleshooting).
22
26
23
27
### Step 1: Enable LDAP Authorization
24
28
25
-
Add the `ldapgrouplistfilter` parameter to the HBA configuration that you enabled for [LDAP Authentication]({% link {{ page.version.version }}/ldap-authentication.md %}). The configuration will include two important LDAP filters:
29
+
Add the `ldapgrouplistfilter` parameter to the HBA configuration that you enabled for [LDAP authentication]({% link {{ page.version.version }}/ldap-authentication.md %}). The configuration will include two important LDAP filters:
26
30
27
31
1.`ldapsearchfilter`: Determines which users can authenticate
28
32
2.`ldapgrouplistfilter`: Defines which groups should be considered for authorization
@@ -131,7 +135,7 @@ Potential issues to investigate may pertain to:
131
135
## Security Considerations
132
136
133
137
1. Always keep a backup authentication method (like password) for administrative users.
134
-
2. Use LDAPS (LDAP over TLS) in production environments.
135
-
3. Use a restricted service account for directory searches.
136
-
4. Regularly audit LDAP group memberships.
137
-
5. Monitor authentication logs for unusual patterns.
138
+
1. Use LDAPS (LDAP over TLS) in production environments.
139
+
1. Use a restricted service account for directory searches.
140
+
1. Regularly audit LDAP group memberships.
141
+
1. Monitor authentication logs for unusual patterns.
Copy file name to clipboardExpand all lines: src/current/v25.1/ldap-authentication.md
+16-10Lines changed: 16 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,13 @@ summary: Learn how to configure CockroachDB for user authentication using LDAP-c
4
4
toc: true
5
5
---
6
6
7
-
CockroachDB supports authentication and authorization using LDAP-compatible directory services, such as Active Directory and Microsoft Entra ID. This allows you to integrate your cluster with your organization's existing identity infrastructure for centralized user management and access control.
7
+
{{site.data.alerts.callout_info}}
8
+
{% include feature-phases/preview.md %}
9
+
{{site.data.alerts.end}}
10
+
11
+
CockroachDB supports authentication and authorization using systems compatible with the Lightweight Directory Access Protocol (LDAP), such as Active Directory and Microsoft Entra ID. This allows you to integrate your cluster with your organization's existing identity infrastructure for centralized user management and access control.
8
12
9
-
This page describes how to configure CockroachDB user authentication using LDAP. You can additionally configure CockroachDB to use the same directory service for user [authorization]({% link v24.3/ldap-authorization.md %}) (role-based access control), which assigns CockroachDB roles to users based on their group memberships in the directory.
13
+
This page describes how to configure CockroachDB user authentication using LDAP. You can additionally configure CockroachDB to use the same directory service for user [authorization]({% link {{ page.version.version }}/ldap-authorization.md %}) (role-based access control), which assigns CockroachDB roles to users based on their group memberships in the directory.
10
14
11
15
## Overview
12
16
@@ -21,12 +25,16 @@ While LDAP configuration is cluster-specific, each request to authenticate a use
21
25
- If a matching record was found, the cluster attempts to verify the user's identity through another LDAP request, this time using the credentials (username and password) provided by that user.
22
26
- If this LDAP bind operation succeeds, the user is authenticated to the CockroachDB cluster.
23
27
1. Authorize the user (optional)
24
-
- If [LDAP authorization]({% link v24.3/ldap-authorization.md %}) is also enabled, an additional request is sent to retrieve the groups to which the user is assigned, using configurable criteria.
28
+
- If [LDAP authorization]({% link {{ page.version.version }}/ldap-authorization.md %}) is also enabled, the cluster sends an additional request to retrieve the groups to which the user is assigned, using configurable criteria.
25
29
- If group memberships are found, any existing CockroachDB roles that match these group names are assigned to the user.
26
30
27
31
These requests use a node's existing connection to the LDAP server, if one is open. Otherwise, the node establishes a new connection. The connection remains open for handling additional LDAP requests until it is closed by the LDAP server, based on its timeout setting.
28
32
29
-
Because CockroachDB maintains no more than one LDAP connection per node, for a cluster with `n` nodes, you can expect up to `n` concurrent LDAP connections.
33
+
Because CockroachDB maintains no more than one LDAP connection per node, for a cluster with `n` nodes, you can expect up to `n` concurrent LDAP connections.
34
+
35
+
{{site.data.alerts.callout_info}}
36
+
LDAP authentication cannot be used for the `root` user or other [reserved identities]({% link {{ page.version.version }}/security-reference/authorization.md %}#reserved-identities). You must manage credentials for `root` separately using password authentication to ensure continuous administrative access regardless of LDAP availability.
37
+
{{site.data.alerts.end}}
30
38
31
39
## Configuration
32
40
@@ -96,17 +104,15 @@ SET CLUSTER SETTING server.ldap_authentication.client.tls_key = '<PEM_ENCODED_KE
96
104
97
105
### Step 4: Sync database users
98
106
107
+
Before LDAP authentication can be enabled for a user, you must create the username directly in CockroachDB. You will need to establish an automated method for keeping users in sync with the directory server, creating and dropping them as needed.
108
+
99
109
{{site.data.alerts.callout_info}}
100
-
LDAP authentication cannot be used for the `root` user or other [reserved identities]({% link {{ page.version.version }}/security-reference/authorization.md %}#reserved-identities). Credentials for `root` must be managed separately using password authentication to ensure continuous administrative access regardless of LDAP availability.
110
+
As of v25.3, CockroachDB can automatically provision users during their first successful LDAP authentication. Refer to the [latest version]({% link {{ site.versions.stable }}/ldap-authentication.md %}) of this page.
101
111
{{site.data.alerts.end}}
102
112
103
-
Before LDAP authentication can be used for a user, the username must be created directly in CockroachDB. You will need to establish an automated method for keeping users in sync with the directory server, creating and dropping them as needed.
104
-
105
113
For Active Directory deployments, the CockroachDB username can typically be set to match the `sAMAccountName` field from the `user` object. This field name would need to be specified in the HBA configuration using `ldapsearchattribute=sAMAccountName`.
106
114
107
-
{{site.data.alerts.callout_info}}
108
115
SQL usernames must comply with CockroachDB's [username requirements]({% link {{ page.version.version }}/create-user.md %}#user-names). Ensure that the values in the field you are using for `ldapsearchattribute` meet these requirements.
109
-
{{site.data.alerts.end}}
110
116
111
117
To create a single user:
112
118
@@ -196,4 +202,4 @@ Potential issues to investigate may pertain to:
196
202
2. Use LDAPS (LDAP over TLS) in production environments.
197
203
3. Use a restricted service account for directory searches.
198
204
4. Regularly audit LDAP group memberships.
199
-
5. Monitor authentication logs for unusual patterns.
205
+
5. Monitor authentication logs for unusual patterns.
Copy file name to clipboardExpand all lines: src/current/v25.1/ldap-authorization.md
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,11 @@ summary: Learn how to configure role-based access control (authorization) using
4
4
toc: true
5
5
---
6
6
7
-
You can configure your cluster to assign [roles]({% link {{ page.version.version }}/ldap-authentication.md %}) based on a user's group membership in an LDAP service, such as Active Directory or Microsoft Entra ID.
7
+
{{site.data.alerts.callout_info}}
8
+
{% include feature-phases/preview.md %}
9
+
{{site.data.alerts.end}}
10
+
11
+
If you manage users through a service compatible with the Lightweight Directory Access Protocol (LDAP), such as Active Directory or Microsoft Entra ID, you can configure CockroachDB to automatically assign [roles]({% link {{ page.version.version }}/security-reference/authorization.md %}) to users based on LDAP group memberships, simplifying access control.
8
12
9
13
When enabled:
10
14
@@ -14,15 +18,15 @@ When enabled:
14
18
15
19
## Prerequisites
16
20
17
-
- Enable [LDAP Authentication]({% link {{ page.version.version }}/ldap-authentication.md %}).
21
+
- Enable [LDAP authentication]({% link {{ page.version.version }}/ldap-authentication.md %}).
18
22
19
23
## Configuration
20
24
21
25
Before you begin, it may be useful to enable authentication logging, which can help you confirm sucessful configuration or troubleshoot issues. For details, refer to [Troubleshooting](#troubleshooting).
22
26
23
27
### Step 1: Enable LDAP Authorization
24
28
25
-
Add the `ldapgrouplistfilter` parameter to the HBA configuration that you enabled for [LDAP Authentication]({% link {{ page.version.version }}/ldap-authentication.md %}). The configuration will include two important LDAP filters:
29
+
Add the `ldapgrouplistfilter` parameter to the HBA configuration that you enabled for [LDAP authentication]({% link {{ page.version.version }}/ldap-authentication.md %}). The configuration will include two important LDAP filters:
26
30
27
31
1.`ldapsearchfilter`: Determines which users can authenticate
28
32
2.`ldapgrouplistfilter`: Defines which groups should be considered for authorization
@@ -131,7 +135,7 @@ Potential issues to investigate may pertain to:
131
135
## Security Considerations
132
136
133
137
1. Always keep a backup authentication method (like password) for administrative users.
134
-
2. Use LDAPS (LDAP over TLS) in production environments.
135
-
3. Use a restricted service account for directory searches.
136
-
4. Regularly audit LDAP group memberships.
137
-
5. Monitor authentication logs for unusual patterns.
138
+
1. Use LDAPS (LDAP over TLS) in production environments.
139
+
1. Use a restricted service account for directory searches.
140
+
1. Regularly audit LDAP group memberships.
141
+
1. Monitor authentication logs for unusual patterns.
0 commit comments