flowchart LR
subgraph PC["Computer of each user"]
app["Desktop App"]
end
subgraph CO["Corporate infrastructure"]
direction TB
entry["Entry point<br/>Ingress or Gateway, TLS"]
subgraph NS["Namespace of Platforma (all runtime rights are here)"]
direction TB
backend["Backend"]
jobs["Jobs"]
secrets["Secrets: license, master secret, sign-in"]
sa["Service account of the Backend"]
end
nodes["Cluster nodes"]
identity["Cloud identity"]
bucket["Primary storage<br/>(read and write)"]
libs["Data libraries<br/>(read only)"]
idp["Sign-in<br/>SSO or LDAP"]
mirrors["Registry and image mirrors<br/>(optional)"]
end
subgraph NET["Outside endpoints"]
direction TB
lic["License service<br/>licensing-api.milaboratories.com"]
assets["Assets registry<br/>bin.pl-open.science"]
blk["Block registry<br/>blocks.pl-open.science"]
images["Images of tools and of the Backend: containers.pl-open.science, quay.io, registry.k8s.io"]
upd["Desktop App updates<br/>cdn-ga.platforma.bio"]
mon["Monitoring service<br/>mon.pl-open.science"]
end
app -->|requests| entry
entry --> backend
app <-->|files| bucket
app -.->|"SSO sign-in"| idp
backend -.->|checks users| idp
backend -->|reads| secrets
backend -->|starts| jobs
backend --- sa
sa -->|bound to| identity
identity -->|read / write| bucket
identity -.->|read only| libs
backend -->|required| lic
jobs -->|"tools that check their license"| lic
backend -->|"or a mirror"| assets
backend -->|"or a mirror"| blk
app -->|"Blocks, or a mirror"| blk
nodes -->|"pull, or a mirror"| images
app -.->|"updates, optional"| upd
backend -.->|not needed to run| mon
mirrors -.->|copies of| assets
mirrors -.->|copies of| blk
mirrors -.->|copies of| images
classDef nsObj fill:#16a34a,stroke:#14532d,color:#ffffff
classDef companyObj fill:#64748b,stroke:#334155,color:#ffffff
classDef companyOpt fill:#cbd5e1,stroke:#334155,color:#0f172a,stroke-dasharray: 4 3
classDef client fill:#e4f5d8,stroke:#14532d,color:#0f172a
classDef internet fill:#dc2626,stroke:#7f1d1d,color:#ffffff
classDef internetOpt fill:#fca5a5,stroke:#7f1d1d,color:#0f172a
classDef optional fill:#f1f5f9,stroke:#64748b,color:#0f172a,stroke-dasharray: 4 3
class app client
class backend,jobs,secrets,sa nsObj
class entry,nodes,identity,bucket,libs,idp companyObj
class mirrors companyOpt
class lic internet
class assets,blk,images internetOpt
class mon,upd optional
style PC fill:#f0fdf4,stroke:#14532d,stroke-width:2px
style CO fill:#f8fafc,stroke:#334155,stroke-width:2px
style NS fill:#ecfdf5,stroke:#14532d,stroke-width:2px
style NET fill:#fef2f2,stroke:#7f1d1d,stroke-width:2px
At runtime, Platforma works inside one namespace of the Kubernetes cluster: the Backend, its jobs, its secrets (license, master secret, sign-in) and the service account of the Backend are there. Platforma does not need any Kubernetes rights outside this namespace, other than to read the state of its two job queues (the queues that decide when jobs start). Wider rights are necessary only to install it.
Clients reach the Backend through one entry point (an Ingress or a Gateway, with TLS). The Desktop App on the computer of each user sends requests there, exchanges files with the primary storage, and signs in at the corporate identity provider when users sign in with SSO. The Backend checks the users with the corporate identity provider or the corporate LDAP directory.
The service account of the Backend is bound to a cloud identity. Through it, the Backend reads and writes the primary storage and only reads the data libraries. Jobs do not have any cloud rights by default.
Outbound connections: the license service of MiLaboratories (licensing-api.milaboratories.com) is required for the Backend, and for jobs with tools that check their license. The Backend reaches the assets registry (bin.pl-open.science), for assets such as reference genomes, and the Block registry (blocks.pl-open.science). The tools come as the images that the cluster nodes pull; the Desktop App reaches only the Block registry. These registries and the images are reached directly or through optional corporate mirrors. The monitoring service (mon.pl-open.science) gets usage records from the Backend when the license allows them (all licenses allow them); Platforma does not depend on them: it works when they cannot be sent. The Desktop App can get its updates from MiLaboratories (cdn-ga.platforma.bio, optional). For each connection and the reason for it, see Outbound connections.
Legend: green = in the namespace of Platforma. Grey = a corporate resource (dashed: optional). Red = required outbound connection. Pale red = endpoint of MiLaboratories or a public image registry that can have a mirror in the corporate network. Light grey, dashed = MiLaboratories service that is not needed to run Platforma.
At runtime, Platforma works inside one namespace of the KubernetesKubernetes — A system that runs programs on a group of machines (a cluster). Platforma can run in a Kubernetes cluster. Glossary cluster and does not need any Kubernetes
rights outside it. The only exception: it reads the state of its two jobjob — One run of a tool on data. The Backend starts jobs on the server where it runs, or in a Kubernetes cluster. Glossary queues, which decide when
jobs start. Wider rights are necessary only to install it. Clients reach the BackendBackend — The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs. Glossary through one
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, and users 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 with SSOsingle sign-on — Sign-in through the identity service of the company, with the same account as for other company systems. Glossary, LDAPLDAP — The directory of users of a company. The Backend can check logins and passwords in it. Glossary or a 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. The service account of the Backend uses
a cloud identitycloud identity — The identity that the cloud gives to the Platforma pod (IAM roles for service accounts on AWS, Workload Identity on Google Cloud). With it, Platforma needs no access keys. Glossary to reach the corporate storage.
flowchart LR
subgraph PC["Computer of each user"]
app["Desktop App"]
end
subgraph CO["Corporate infrastructure"]
direction TB
subgraph SRV["Server in Single Server mode (all runtime rights are here)"]
direction TB
backend["Backend<br/>accepts clients, TLS optional"]
jobs["Jobs<br/>processes, or containers with Docker"]
secrets["License, master secret, sign-in settings"]
work["Workspace"]
end
bucket["Primary storage<br/>folder on the server or a bucket<br/>(read and write)"]
libs["Data libraries<br/>folders or buckets<br/>(read only)"]
idp["Sign-in<br/>SSO or LDAP"]
mirrors["Registry and image mirrors<br/>(optional)"]
end
subgraph NET["Outside endpoints"]
direction TB
lic["License service<br/>licensing-api.milaboratories.com"]
soft["Software registry<br/>bin.pl-open.science<br/>(only without Docker)"]
assets["Assets registry<br/>bin.pl-open.science"]
blk["Block registry<br/>blocks.pl-open.science"]
images["Software images<br/>(only with Docker)"]
upd["Desktop App updates<br/>cdn-ga.platforma.bio"]
end
app -->|requests| backend
app <-->|files| bucket
app -.->|"SSO sign-in"| idp
backend -.->|checks users| idp
backend -->|reads| secrets
backend -->|starts| jobs
backend <--> work
jobs <--> work
backend <-->|read / write| bucket
backend -.->|read only| libs
backend -->|required| lic
jobs -->|"tools that check their license"| lic
backend -->|"or a mirror"| soft
backend -->|"or a mirror"| assets
backend -->|"or a mirror"| blk
app -->|"Blocks, or a mirror"| blk
jobs -->|"pull, or a mirror"| images
app -.->|"updates, optional"| upd
mirrors -.->|copies of| soft
mirrors -.->|copies of| assets
mirrors -.->|copies of| blk
mirrors -.->|copies of| images
classDef nsObj fill:#16a34a,stroke:#14532d,color:#ffffff
classDef companyObj fill:#64748b,stroke:#334155,color:#ffffff
classDef companyOpt fill:#cbd5e1,stroke:#334155,color:#0f172a,stroke-dasharray: 4 3
classDef client fill:#e4f5d8,stroke:#14532d,color:#0f172a
classDef internet fill:#dc2626,stroke:#7f1d1d,color:#ffffff
classDef internetOpt fill:#fca5a5,stroke:#7f1d1d,color:#0f172a
classDef optional fill:#f1f5f9,stroke:#64748b,color:#0f172a,stroke-dasharray: 4 3
class app client
class backend,jobs,secrets,work nsObj
class bucket,libs,idp companyObj
class mirrors companyOpt
class lic internet
class soft,assets,blk,images internetOpt
class upd optional
style PC fill:#f0fdf4,stroke:#14532d,stroke-width:2px
style CO fill:#f8fafc,stroke:#334155,stroke-width:2px
style SRV fill:#ecfdf5,stroke:#14532d,stroke-width:2px
style NET fill:#fef2f2,stroke:#7f1d1d,stroke-width:2px
In Single Server mode, the Backend and its jobs run on the server itself. Jobs run as processes, or as containers when Docker is on. The Backend accepts the connections of clients directly, and keeps the license, the master secret and the sign-in settings on the server. TLS is optional: the Backend serves it with a corporate or a self-signed certificate; without it, connections are not encrypted.
The Desktop App on the computer of each user sends requests to the Backend, exchanges files with the primary storage, and signs in at the corporate identity provider when users sign in with SSO. The Backend checks the users with the corporate identity provider or the corporate LDAP directory, or with a static list of users in a file on the server, which does not need any network connection. The primary storage is a folder on the server or a bucket; the data libraries are folders or buckets that Platforma only reads.
Outbound connections: the license service of MiLaboratories (licensing-api.milaboratories.com) is required for the Backend, and for jobs with tools that check their license. The Backend reaches the assets registry (bin.pl-open.science), for assets such as reference genomes, and the Block registry (blocks.pl-open.science). When the jobs run without Docker, it also reaches the software registry on the same host; the Desktop App reaches only the Block registry. These registries, and the software images (only with Docker), are reached directly or through optional corporate mirrors. In Single Server mode, the Backend does not send usage records to the monitoring service. The Desktop App can get its updates from MiLaboratories (cdn-ga.platforma.bio, optional). For each connection and the reason for it, see Outbound connections.
Legend: green = on the server of Platforma. Grey = a corporate resource (dashed: optional). Red = required outbound connection. Pale red = endpoint of MiLaboratories or a public image registry that can have a mirror in the corporate network. Light grey, dashed = MiLaboratories service that is not needed to run Platforma.
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, the Backend and its jobs run on the server itself, and the Backend accepts the
connections of clients directly. TLS is optional: the Backend serves it with a corporate or a
self-signed certificate; without it, connections are not encrypted. Users sign in with SSO, LDAP or a static list of users, and the Backend reaches the corporate storage from the server.
In Single Server mode, the protection comes from the server itself. For where the data is and how
it is encrypted, see Where the data is kept.
System user. The Backend runs as the system user that starts it, and its jobs run as the same
user, so the rights of this user set the limit for the Backend and the jobs.
Environment of jobs. Each job gets the environment variables of the Backend, also in a Docker
container, but not its secrets. The Backend removes the license key, the master secret, the
sign-in secrets, the storage keys and the paths of the files that hold them. It also removes the
credentials of the AWS and Google Cloud tools, for example AWS_SECRET_ACCESS_KEY and
GOOGLE_APPLICATION_CREDENTIALS.
Network. By default, the Backend accepts connections only from the server itself. The operatoroperator — The person who installs and runs Platforma in your company, for example an IT engineer or a bioinformatician. Glossary
chooses the address that clients use, and the computers of users then reach two ports: 6345 for
the API and 6347 for the files of a folder storage. The metrics port listens on the server only;
the debug port is off. See Open ports.
TLS. TLS is off by default. The operator turns it on with a corporate certificate, or with a
self-signed certificate that the Backend makes. Without TLS, connections are not encrypted.
Updates. The operator installs a new version of the Backend when they choose.
Sandboxes for Block code
flowchart LR
subgraph DA["Desktop App"]
ui["Block UI: isolated view, no other pages or windows"]
model["Block model: JavaScript sandbox"]
end
subgraph BE["Backend"]
wf["Block workflow: sandbox, no network, no files"]
end
subgraph JB["Jobs"]
tools["Tools: own container in Kubernetes; network as the cluster allows"]
end
ui --> model
model --> wf
wf -->|starts| tools
Block code runs in three places, each with its limits. In the Desktop App, the Block UI runs in an
isolated view that cannot open other pages or windows, and the Block model runs in a JavaScript
sandbox. In the Backend, the Block workflow runs in a sandbox with no network and no file access.
The workflow starts tools as jobs; in Kubernetes each job has its own container, and the tools can
use the network as the cluster allows.
Platforma limits what Block code can do:
The Block UI runs in an isolated view of 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. It cannot open other pages or windows.
The Block model runs in a JavaScript sandbox in the Desktop App.
The Block workflowworkflow — The part of a Block that runs in the Backend. It starts the tools on the data and collects the results. Users do not edit it. Glossary runs in a sandbox in the Backend. It does not have access to the network or to the
file system. It can only call the functions of the Backend.
The tools that a Block starts run as jobs, outside the Backend program. In a Kubernetes cluster,
each job runs in a container of its own. In Single Server mode, a job is
a process on the server, or a container when Docker is turned on.
Sources and updates of each part
Part
Where it runs or lives
Who supplies it
How it changes
Desktop App
Computer of each user
MiLaboratories
Downloads its updates by itself and installs them when the user quits it, or at once when the user agrees
Software registrysoftware registry — A service from which the Backend downloads the software packages of the tools that Blocks use. Only Single Server mode without Docker uses it; in a Kubernetes cluster and with Docker, the tools come as container images. Glossary
Each Block version names its packages
Primary storage
Cloud bucket, or a folder on the Backend server
Operator
Grows with the results
Data libraries
Corporate storage
Operator
Your company adds data
A Block version can require a newer Desktop App. Then the Desktop App does not run that Block
version until the user updates the Desktop App.
In Kubernetes, the entry point can be public, open to the internet or only to the corporate networks, or
private, so that users reach it only through the corporate network or VPN. The Terraform modulesTerraform modules — The Terraform code that MiLaboratories provides to install Platforma. The cloud-specific Terraform modules make the cluster and its cloud parts in AWS or Google Cloud; the cloud-agnostic Terraform modules install Platforma into the cluster. Glossary
make a public entry point that is open to all addresses by default, so users connect from any
network. Each request still needs a session of a user. In both clouds, the operator can let only
the corporate networks reach the entry point, or make the entry point private. The Backend pod has
these ports:
Port
What
Open to
6345
gRPC API for the clients: the Desktop App and pl-clipl-cli — The command-line client of Platforma. Administrators use it to manage users and projects on the Backend. Glossary
Inside the cluster. From outside the cluster, only through the entry point
9090
Metrics and health
Inside the cluster
9091
Debug API
localhost of the Backend pod only
The primary storage in Kubernetes is a bucket: the Desktop App gets the files from the bucket, not
from the Backend. The entry point sends only the gRPC traffic to port 6345 of the pod. Port 6347,
the data address in Single Server mode, is not open to clients. The Helm chart of Platforma does not
open this port in the pod or its Service, and stops when an option would open it.
To reach the debug API, a person needs direct access to the pod, and thus permissions in the
namespace of Platforma.
In Single Server mode, the clients connect to the Backend directly, without an entry point.
The Backend listens on these ports of the server:
Port
What
Open to
6345
gRPC API for the clients: the Desktop App and pl-cli
The computers of users
6347
Data address: the Desktop App uploads and downloads the files of the primary storage, when the primary storage is a folder on the server
The computers of users. With a bucket as the primary storage, the Desktop App does not use this port
9090
Metrics and health
The server only
9091
Debug API, off by default
The server only
The Backend listens on the listen address of the server, 127.0.0.1 by default: to accept
connections from the computers of users, the operator sets this address, for example 0.0.0.0
(all addresses of the server). The firewall of the server must then let the computers of users
reach ports 6345 and 6347, and must not let them reach the other ports.
The Desktop App gets the data address from the Backend. By default, this address is the listen
address with port 6347, and 0.0.0.0 is not an address that a computer can connect to. Thus,
with the listen address 0.0.0.0, the operator also sets the data address to the host name that
users type in the Desktop App, for example https://platforma.example.com:6347. For the options,
see Host name and DNS.