User Registration and Access Control
Register multiple users to a Synnax Core and manage their permissions.
This guide walks through how to register multiple users to a Synnax Core and manage their permissions.
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 full access to the Core, and is granted
permissions to manage, create, and retrieve every single resource available in the Core.
When registering a new user, you must give them a username and a password. 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 Permissions
Users can have different permissions in Synnax, which determines what they can and cannot do. Permissions can be managed in the Synnax Console by finding a user in the Users Toolbar on the left-hand side of the screen, right-clicking a user, and selecting “Edit Permissions”.
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.
Since the new user does not have permissions to create or edit schematics, they will not be able to do so from the Console. Any workspaces that they create will be shown under their name in the Users Toolbar on the left-hand side of the screen.