How to Promote a Normal User to Super Admin in Turbine On-Prem Cluster
Overview
The Super Admin account is initially generated during system installation. Because promoting standard users to Super Admin status cannot be performed directly within the Turbine UI, this operation must be executed via the backend by updating the user record in the PostgreSQL SwimlaneTenant database.
This document provides step-by-step instructions for promoting an existing user account to Super Admin on a Turbine on-premises Kubernetes cluster.
Applies To
- Turbine on-premises (Kubernetes-based) deployments
- PostgreSQL databases managed by Patroni
Prerequisites
- Active kubectl access to the Turbine cluster with permissions to execute commands in pods.
- The target user's Email or UserName.
- An existing account in Turbine. (The user must have logged in at least once or been created via the UI beforehand).
β οΈ CAUTION: Direct database modifications carry operational risk. Ensure a recent backup or snapshot is performed before proceeding, and conduct these steps within an approved maintenance window. |
|---|
Procedure
Step 1: Verify Cluster Health
export ns=<namespace>
kubectl -n $ns get podsVerify that all pods display a Running status and report all containers ready. Do not proceed until the cluster is confirmed healthy.
Step 2: Identify the PostgreSQL Leader Pod
kubectl -n $ns exec -it postgresql-0 -- patronictl listLocate the pod designated with the Leader role in the command output. All subsequent database commands must be run against this specific pod (note that the leader may differ from postgresql-0).
Step 3: Connect to the Database
Access the PostgreSQL prompt on the leader pod (replace <leader-pod> with the actual pod name identified in Step 2, e.g., postgresql-1):
kubectl -n $ns exec -it <leader-pod> -- /bin/bash -c 'psql -d SwimlaneTenant -U $PGUSER_SUPERUSER'Step 4: Locate the User Record
SELECT "UserName", "Email", "IsSuperAdmin" FROM "Users";Locate the user account to be promoted and confirm that its IsSuperAdmin flag is set to f.
π‘ TIP: While SELECT * FROM "Users"; is valid, selecting specific columns keeps the query output clean and prevents sensitive user fields from rendering unnecessarily. |
|---|
Step 5: Promote User to Super Admin
Execute the update query using either the user's email address or username.
Option A: Update by Email
UPDATE "Users" SET "IsSuperAdmin" = 't' WHERE "Email" = '[email protected]';Option B: Update by Username
UPDATE "Users" SET "IsSuperAdmin" = 't' WHERE "UserName" = 'username';Expected Output:
UPDATE 1β οΈ NOTE: An output of UPDATE 0 indicates no records matched. Re-check the case-sensitive username or email values. If the result shows greater than 1, halt immediately to verify record uniqueness. |
|---|
Step 6: Confirm Promotion in Database
SELECT "UserName", "Email", "IsSuperAdmin" FROM "Users" WHERE "Email" = '[email protected]';Verify that IsSuperAdmin reports t. Exit the PostgreSQL prompt by typing \q.
Step 7: Verify Access via UI
Log in to the Turbine web interface using the modified account and confirm Super Admin capabilities are available.
Rollback Procedure
To revoke Super Admin permissions and return the account to a normal user, run the following SQL command on the leader pod:
UPDATE "Users" SET "IsSuperAdmin" = 'f' WHERE "Email" = '[email protected]';