Skip to content

Commit 778a12b

Browse files
[v4.5.0] feat(platform): add guide for disabling local admin after sso setup (#1540) (#1544)
* Backport: Copy platform/configure/single-sign-on/overview.mdx to platform_versioned_docs/version-4.5.0/configure/single-sign-on/overview.mdx * Backport: Copy platform/how-to/disable-local-admin.mdx to platform_versioned_docs/version-4.5.0/how-to/disable-local-admin.mdx --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 017c0e4 commit 778a12b

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed

platform_versioned_docs/version-4.5.0/configure/single-sign-on/overview.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,9 @@ Most SSO provider connections do not allow `localhost` and require that you
8080
<!-- vale on -->
8181

8282
<PartialMultipleSSO />
83+
84+
<!-- vale off -->
85+
## After SSO configuration
86+
<!-- vale on -->
87+
88+
After configuring SSO successfully, consider [disabling the local admin account](../../how-to/disable-local-admin.mdx) as a security best practice. This ensures all authentication flows through your identity provider.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<!-- vale off -->
2+
---
3+
title: Disable the local admin account after SSO setup
4+
sidebar_label: Disable Local Admin
5+
sidebar_position: 6
6+
description: Learn how to secure vCluster Platform by disabling the local admin account after configuring SSO authentication.
7+
---
8+
<!-- vale on -->
9+
10+
import Flow, { Step } from "@site/src/components/Flow";
11+
import NavStep from "@site/src/components/NavStep";
12+
import Label from "@site/src/components/Label";
13+
14+
<!-- vale off -->
15+
After configuring [single sign-on (SSO)](../configure/single-sign-on/overview.mdx) for vCluster Platform, disabling the local admin account is a recommended security practice for enterprise environments. This prevents unauthorized access through the default credentials and ensures all authentication flows through your identity provider.
16+
<!-- vale on -->
17+
18+
## Prerequisites
19+
20+
Before disabling the local admin account:
21+
22+
- SSO is configured and tested successfully
23+
- At least one SSO user has global admin permissions
24+
- You have verified SSO login works with the expected permissions
25+
- You have kubectl access to the cluster running vCluster Platform
26+
27+
:::warning Verify SSO access first
28+
Ensure you can log in via SSO with global admin permissions before disabling the local admin. Locking yourself out requires recovery steps.
29+
:::
30+
31+
## Disable the admin account
32+
33+
There are two steps to fully disable the local admin:
34+
35+
1. Lock the admin user in the UI
36+
2. Prevent the admin from being recreated on upgrades
37+
38+
### Lock the admin user
39+
40+
<Flow id="lock-admin-user">
41+
<Step>
42+
Log in to vCluster Platform using your SSO credentials with global admin permissions.
43+
</Step>
44+
<Step>
45+
Select the <NavStep>Users</NavStep> field on the left menu bar.
46+
</Step>
47+
<Step>
48+
In the admin user row, hover over the blue drop down arrow and select <Label>Lock User</Label> from the menu options.
49+
</Step>
50+
</Flow>
51+
52+
The admin account is now locked. The user cannot log in and any access keys generated for the admin will stop working.
53+
54+
### Prevent admin recreation
55+
56+
To prevent the admin account from being recreated during upgrades, update your Helm values:
57+
58+
```yaml title="vcluster-platform-values.yaml"
59+
admin:
60+
create: false
61+
```
62+
63+
Apply the configuration:
64+
65+
```bash
66+
helm upgrade vcluster-platform loft/vcluster-platform \
67+
--namespace vcluster-platform \
68+
--values vcluster-platform-values.yaml \
69+
--reuse-values
70+
```
71+
72+
:::note
73+
If you previously had admin credentials in your values file, remove them after locking the account. Leaving stale credentials in configuration files is a security risk.
74+
:::
75+
76+
## Recovery
77+
78+
If SSO becomes unavailable and you need to regain access:
79+
80+
1. Re-enable password authentication if it was disabled. Run the following command to generate a new configuration with password login enabled:
81+
82+
```bash
83+
kubectl get secrets/loft-manager-config -n vcluster-platform \
84+
-o jsonpath="{.data.config}" | base64 -d | \
85+
yq "del(.auth.password.disabled)" | base64
86+
```
87+
88+
Copy the output, then edit the secret:
89+
90+
```bash
91+
kubectl edit secret loft-manager-config -n vcluster-platform
92+
```
93+
94+
Replace `.data.config` with the new value and restart the vCluster Platform pods.
95+
96+
<!-- vale off -->
97+
2. Reset the admin password using kubectl. See [Reset Admin Password](./reset-admin-password.mdx) for detailed instructions.
98+
<!-- vale on -->
99+
100+
3. Unlock the admin user:
101+
- Log in with the reset password
102+
- Navigate to **Users**
103+
- Select **Unlock User** from the admin user's dropdown menu
104+
105+
After regaining access, investigate the SSO issue, and fix it before re-locking the admin account.

0 commit comments

Comments
 (0)