Skip to content

Commit 2582d04

Browse files
Merge pull request cockroachdb#3195 from cockroachdb/admin-ui-user-auth-alpha
Admin UI user auth changes
2 parents 8389b91 + dbb95ea commit 2582d04

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

_includes/sidebar-data-v2.1.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,12 @@
15441544
"/${VERSION}/admin-ui-access-and-navigate.html"
15451545
]
15461546
},
1547+
{
1548+
"title": "Secure the Admin UI",
1549+
"urls": [
1550+
"/${VERSION}/admin-ui-user-authentication.html"
1551+
]
1552+
},
15471553
{
15481554
"title": "Overview Dashboard",
15491555
"urls": [

v2.1/admin-ui-access-and-navigate.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ toc: false
1010

1111
You can access the Admin UI from any node in the cluster.
1212

13+
{{site.data.alerts.callout_info}}By default, CockroachDB allows all users to access and view the Admin UI. For secure clusters, you can choose to <a href="admin-ui-user-authentication.html">enable user authentication</a> to restrict access to the Admin UI to authorized users. {{site.data.alerts.end}}
14+
1315
By default, you can access it via HTTP on port `8080` of the hostname or IP address you configured using the `--host` flag while [starting the node](https://www.cockroachlabs.com/docs/stable/start-a-node.html#general). For example, `http://<any node host>:8080`. If you are running a secure cluster, use `https://<any node host>:8080`.
1416

1517
You can also set the CockroachDB Admin UI to a custom port using `--http-port` or a custom hostname using `--http-host` when [starting each node](start-a-node.html). For example, if you set both a custom port and hostname, `http://<http-host value>:<http-port value>`. For a secure cluster, `https://<http-host value>:<http-port value>`.

v2.1/admin-ui-user-authentication.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Secure the Admin UI
3+
summary: Learn how to enable user authentication for secure clusters for the Admin UI.
4+
toc: false
5+
---
6+
7+
By default, CockroachDB allows all users to access and view the Admin UI. However, for secure clusters, you can enable user authentication so that only authorized users can access and view the Admin UI.
8+
9+
<div id="toc"></div>
10+
11+
1. Start a secure cluster as described in our [deployment tutorials](manual-deployment.html).
12+
13+
However, when starting each node, be sure to set the `COCKROACH_EXPERIMENTAL_REQUIRE_WEB_LOGIN=TRUE` environment variable, for example:
14+
15+
{% include copy-clipboard.html %}
16+
~~~ shell
17+
$ COCKROACH_EXPERIMENTAL_REQUIRE_WEB_LOGIN=TRUE \
18+
./cockroach start --host=<node1 hostname> --certs-dir=certs
19+
~~~
20+
21+
2. For each user who should have access to the Admin UI, [create a user with a password](create-user.html).
22+
23+
On accessing the Admin UI, these users will see a Login screen, where they will need to enter their usernames and passwords.

0 commit comments

Comments
 (0)