User Registration and Access Control
Register multiple users to a Synnax Core and manage their roles.
This guide walks through how to register multiple users to a Synnax Core and manage their roles.
Prerequisites
- A Synnax Core installed and running on a reachable network address.
- The Synnax Console installed and running.
- (Optional) If you would like to manage users from a script, the Python or TypeScript clients installed.
Logging Into a Core
To log into a Core, you need the following information:
- Host: the network address of the machine running the Core. Defaults to
"localhost". - Port: the port the Core is running on. Defaults to
9090. - Username: the username of the user to log in as. Defaults to
"synnax". - Password: the password of the user to log in as. Defaults to
"seldon". - Secure: whether the Core was configured with TLS encryption. Defaults to
false.
The Core does not need to be running on the same machine as the Console or clients.
All it takes is for the Core to have a reachable network address. To find the local IP
address of the machine running the Core, run (Get-NetIPAddress -AddressFamily IPv4).IPAddress (Windows) / hostname -I (Linux) / ifconfig getifaddr en0 (macOS).
Then, when you want to connect to the Core from another machine, you use the specified
address as the host argument instead of localhost.
Synnax Console
To log into a Core using the Synnax Console, simply click the Connect a Core button in the top-right corner of the Core Selector and enter your connection parameters:
Python Client
There are two ways to log into a Core using the Python client, the
synnax login
command or by directly
passing in your credentials:
import synnax as sy
client = sy.Synnax(
host="localhost",
port=9090,
username="synnax",
password="seldon",
secure=False
) TypeScript Client
To log in with the TypeScript client, you can simply create a new client:
import { Synnax } from "@synnaxlabs/client";
const client = new Synnax({
host: "localhost",
port: 9090,
username: "synnax",
password: "seldon",
secure: false,
}); Registering Users
By default, Synnax Cores have a single root user, whose username is synnax and
password is seldon. The root user has the Owner role, granting full access to the Core
including the ability to manage users and all other resources.
When registering a new user, you must give them a username, a password, and assign them a role. The role determines what resources the user can view, edit, or delete. The new user can log into the Core by passing their new credentials into the login command instead of the root user’s credentials.
New users can be registered in the Synnax Console, or programmatically using the Python or TypeScript clients.
Synnax Console
Once you’ve logged into the Core, you can register new users with the
“Register a User” command from the
command palette. The command palette can be opened by pressing Ctrl+Shift+P
(Windows/Linux) or Cmd+Shift+P (macOS), and also by clicking the search bar in the top
of the screen and typing >.
Python Client
To create a new user with the Python client, you can use the user.create method:
client.user.create(
username="new_user",
password="password"
) TypeScript Client
To create a new user with the TypeScript client, you can use the user.create method:
client.user.create({
username: "new_user",
password: "password",
}); Managing User Roles
Synnax uses role-based access control to determine what users can and cannot do. Each user is assigned a role, and the role grants specific permissions across all resources in the system.
To change a user’s role in the Synnax Console, find the user in the Users Toolbar on the left-hand side of the screen, right-click the user, and select “Assign to role”. You can also drag a user onto a role in the resource tree to quickly reassign them.
Logging in as a New User
A new user can log into a Core by downloading the Console on their computer, and connecting to a Core using their username and password.
Once logged in, the user’s capabilities depend on their assigned role. For example, a user with the Operator role can control hardware and view resources, but cannot modify system configuration or create schematics. Any workspaces that users create will be shown under their name in the Users Toolbar on the left-hand side of the screen.