Connect clients
Give users the address and the sign-in, check what the clients need from the network, and connect the Desktop App or pl-cli to the Backend.
Users work with Platforma through its clients: the Desktop AppDesktop App — The program that each user installs on their own computer to work with Platforma. It is a client of the Backend. Glossary for analysis, and pl-clipl-cli — The command-line client of Platforma. Administrators use it to manage users and projects on the Backend. Glossary for administration from the command line. Each client connects to the BackendBackend — The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs. Glossary with the address and the sign-insign in — To show the Backend who you are, with a sign-in provider or a single-user token. The verb is "sign in"; the noun and the adjective are "sign-in". Glossary that you give.
What clients need
Each client, the Desktop App and pl-cli, connects to the same address of the Backend. Give users this address:
The address is the host name of the entry pointentry point — The way in to the Backend from outside the cluster, a load balancer or an Ingress with a DNS name. It usually ends TLS and sends the traffic to the Backend pod. Glossary: https://platforma.example.com. The port is 443,
so the address does not need it. The installer on AWS shows this address in the stack output
PlatformaUrl.
The address is the host name of the server with the API port: https://platforma.example.com:6345.
The network of each computer with a client must let it reach:
- The address of the Backend. The clients use gRPC over HTTP/2, with long streams. Each proxy, firewall and load balancer on the way must carry it. See What each entry point must carry.
- The primary storageprimary storage — The bucket (Amazon S3 or Google Cloud Storage) or folder where Platforma keeps all results and uploaded files. Glossary, for the Desktop App. The Desktop App uploads and downloads files directly. With a bucket, the computers must reach the endpoint of the bucket (see Primary storage). In Single Server modeSingle Server mode — The mode in which the Backend and all its jobs run on one Linux machine, the server, with no Kubernetes cluster. Glossary with a folder as the primary storage, they must reach port 6347 of the server.
- The Block registryBlock registry — A service from which the Desktop App downloads Blocks. MiLaboratories runs the main one; a company can add its own. Glossary, for the Desktop App. See Outbound connections.
pl-cli connects only to the address of the Backend. Each client must also trust the certificate of the address and follow the proxy rules of the network: see Certificate and proxy.
Users sign in with the sign-in providerssign-in provider — A configured way for users to sign in to the Backend: single sign-on (SSO), LDAP or a static list of users. One Backend can have more than one. Glossary of the Backend: their login in the static list of usersstatic list of users — A sign-in provider that is a file with the logins and the password hashes of the users, in the htpasswd format. The Backend reads it again when it changes. Glossary, their LDAPLDAP — The directory of users of a company. The Backend can check logins and passwords in it. Glossary account, or their account at the SSOsingle sign-on — Sign-in through the identity service of the company, with the same account as for other company systems. Glossary provider. Both clients support each provider. See Authentication.
Certificate and proxy
-
Certificate. A certificate from a public certificate authority works in each client. A certificate of a corporate certificate authority, or a self-signed certificate, works only in a client that trusts it:
- the Desktop App trusts the authorities in the trust store of the operating system: add the certificate there, then start the Desktop App again;
- pl-cli trusts the authorities that come with Node.js: give it the certificate in the
environment variable
NODE_EXTRA_CA_CERTS.
See What clients trust.
-
Proxy. Each client has its own proxy setting:
- the Desktop App uses the proxy of the operating system by default. For the connection to the Backend, it tries the proxy and the direct way, and uses the one that works. To connect directly, select Connect without proxy in the connection form. For another proxy, see Desktop App network settings;
- pl-cli uses the proxy of the environment variable
https_proxy, and does not try the direct way. See pl-cli network settings.
Connect
Choose the client:
-
Install the Desktop App. Download it for the operating system of the computer from platforma.bio/downloads, and install it.
-
Add the server. Start the Desktop App. At the first start, it opens the connection form; when it already has servers, click Add. In Remote address, type the address of the Backend, with
https://.The Desktop App then asks the Backend how users sign in, and shows the fields for it.
-
Sign in.
- With a static list of users or LDAP, type the Login and the Password, and click Connect.
- With SSO, click Login with SSO: the browser opens the page of the identity provider.
When the Backend has more than one sign-in provider, click Use another login method to choose one.
Result: the Desktop App shows the list of projects. It keeps the server in its list: at the next start, click the server to connect.
pl-cli signs in once and keeps the session: later commands do not ask for the sign-in. It signs in with each kind of sign-in provider: SSO in the browser, or a login and a password from a static list of users or LDAP. The sign-in and the stored sessions need Backend 3.6.0 or later.
-
Install Node.js. pl-cli needs Node.js 24 or later, with
npmandnpx. -
Get pl-cli. pl-cli is the npm package
@platforma-sdk/pl-cli. Install it once:Terminal window npm install --global @platforma-sdk/pl-cliOr run it without installation, with
npx @platforma-sdk/pl-cli@latestin place ofpl-cli.npxgets the latest version from the npm registry. -
See the sign-in providers. Write the address with
https://: an address without a scheme connects without TLS.Terminal window pl-cli login -a https://platforma.example.com --list-methodspl-cli shows one line for each provider of the Backend:
ID,KIND(sso,basicfor a password,token),TITLE, and theISSUERof an SSO provider. -
Sign in. Give the ID of the provider in
--method. This option is required: pl-cli does not choose a provider for you.-
With SSO, pl-cli opens the sign-in page of the identity provider in the browser and prints its address:
Terminal window pl-cli login -a https://platforma.example.com --method <id>The identity provider sends the browser back to pl-cli, to a port on
127.0.0.1of the computer where pl-cli runs. The Backend gives the list of these ports. When pl-cli runs on a remote computer over SSH, forward this port from your computer, for examplessh -L 8085:127.0.0.1:8085 <host>. With--no-browser, pl-cli only prints the address of the sign-in page. pl-cli waits 300 seconds for the sign-in (--timeout <seconds>). -
With a static list of users or LDAP, give the login. pl-cli asks for the password and does not show it:
Terminal window pl-cli login -a https://platforma.example.com --method <id> -u <login> -
With a single-user token, pl-cli asks for the token in place of the password.
-
-
Check the connection. After the sign-in, commands do not need the address:
Terminal window pl-cli project list
Result: pl-cli shows the projects of the user.
Sessions. pl-cli keeps the sessions in the file ~/.platforma/pl-cli.sessions. The file holds
only the token that the Backend gives, not a password or the tokens of the identity provider. On
Linux and macOS, only your system user can read it. A command without -a uses the default
session: the last session that you signed in with or selected. Before each command, pl-cli checks
the ID of the Backend instance at the address, and does not send a token to another instance.
When the session is past half of its time, pl-cli renews it. When it has expired, run
pl-cli login again.
| Command | Result |
|---|---|
pl-cli session list |
Shows the stored sessions: instance, login, address, provider, expiry. No tokens |
pl-cli session select <login> -a <address> |
Makes the session of this login the default session |
pl-cli session remove <login> -a <address> |
Removes the session of this login |
pl-cli logout |
Removes the default session from the file. The token stays valid on the Backend until it expires |
Administrator commands. The administrator commands (pl-cli admin ...,
pl-cli maintenance ...) use the stored session of a user with the administrator roleadministrator role — The role in the Backend that can read and change the data of all users and run the pl-cli administrator commands. The operator sets rules that give it to users by login, group or attribute. Glossary, also a
session made with SSO. The Backend checks the role.
Sign-in with each command. -u with -p, or --admin-user with --admin-password (and the
environment variables PL_USER, PL_PASSWORD, PL_ADMIN_USER, PL_ADMIN_PASSWORD), sign in
with a login and a password for this command only, and do not use or change the stored sessions.
-u or --admin-user without a password selects the stored session of this login.
For the certificate authority and the proxy of pl-cli, see pl-cli network settings.