User Registration and Access Control

Register multiple users to a Synnax cluster and manage their permissions.

This guide walks through how to register multiple users to a Synnax cluster and manage their permissions.

Prerequisites

Logging Into a Cluster

To log into a cluster, you need the following information:

  • Host: the network address of the machine running the cluster. Defaults to localhost.
  • Port: the port the cluster 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 cluster was configured with TLS encryption. Defaults to false.

The cluster does not need to be running on the same machine as the console or clients. All it takes is for the cluster to have a reachable network address. To find the local IP address of the machine running the cluster, run (Get-NetIPAddress -AddressFamily IPv4).IPAddress (Windows) / hostname -I (Linux) / ifconfig getifaddr en0 (macOS). Then, when you want to connect to the cluster from another machine, you use the specified address as the host argument instead of localhost.

Synnax Console

To log into a cluster using the Synnax Console, simply click the Add Cluster button in the top right corner of the cluster toolbar and enter your connection parameters:

Python Client

There are two ways to log into a cluster 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 clusters have a single root user, whose username is synnax and password is seldon. The root user has full access to the cluster, and is granted permissions to manage, create, and retrieve every single resource available in the cluster.

When registering a new user, you must give them a username and a password. The new user can log into your Synnax cluster 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 cluster, 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 resources 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 cluster by downloading the console on their computer, and connecting to a cluster 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 resources toolbar on the left-hand side of the screen.