Skip to content

Security overview

explanationsecurity-overview

See how Platforma is built, where Block code runs and what is open to the network.

How Platforma runs in Kubernetes 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. Computer of each user Corporate infrastructure Namespace of Platforma (all runtime rights are here) Outside endpoints requests files SSO sign-in checks users reads starts bound to read / write read only or a mirror tools that check their license pull, or a mirror updates, optional Blocks, or a mirror copies of copies of not needed to run required Desktop App Sign-in SSO or LDAP Entry point Ingress or Gateway, TLS Primary storage (read and write) Secrets: license, master secret, sign-in Backend Cloud identity Service account of the Backend Jobs Data libraries (read only) Registry and image mirrors (optional) Cluster nodes Desktop App updates cdn-ga.platforma.bio Block registry blocks.pl-open.science Assets registry bin.pl-open.science Monitoring service mon.pl-open.science License service licensing-api.milaboratories.com Images of tools and of the Backend: containers.pl-open.science, quay.io, registry.k8s.io In the namespace of Platforma Corporate resource Corporate resource, optional Required outbound connection MiLaboratories service, not needed to run Endpoint of MiLaboratories or a public image registry that can have a mirror in the corporate network over the internet over the internet, optional
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.

For the parts of Platforma and what each part does, see the Desktop App and the Backend.

Single Server mode

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

Where Block code runs 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. Desktop App Backend Jobs starts Block UI: isolated view, no other pages or windows Block model: JavaScript sandbox Block workflow: sandbox, no network, no files Tools: own container in Kubernetes; network as the cluster allows Program Job request or action
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
Backend Corporate infrastructure or cloud account MiLaboratories The operator installs a new version
Blocks Desktop App and Backend Trusted Block registry: MiLaboratories, or other developers that the user adds Each Block has its own versions
Software packages Jobs 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.

Open ports

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.

Next