Skip to content

Secrets

explanationsecurity-secrets

See which secrets Platforma needs, who makes them and where they are kept.

How secrets are handled

The secrets stay under the control of your company. None of 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 creates a Secret, so no secret value is in the files that Terraform keeps or prints (state, plan, logs). The operatoroperator — The person who installs and runs Platforma in your company, for example an IT engineer or a bioinformatician. Glossary creates the Secrets in the namespace of Platforma: by hand, or with a sync from the corporate secret manager.

The BackendBackend — The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs. Glossary gets each secret in one of three ways: from an environment variable, from a file, or from an option on the command line. These secrets can come from files:

  • the license key;
  • the master secret;
  • 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;
  • the SSOsingle sign-on — Sign-in through the identity service of the company, with the same account as for other company systems. Glossary client secret;
  • the LDAPLDAP — The directory of users of a company. The Backend can check logins and passwords in it. Glossary bind password;
  • the S3 keys of each data librarydata library — A folder or bucket with input data of the company. Users select files from it in the Desktop App. Platforma only reads it. Glossary;
  • the key files of Google service accounts.

Other programs on the same machine can see the command line in the list of processes. So the operator gives secrets as files or environment variables.

The Helm chart of Platforma, which the Terraform modules also use, never puts a secret on the command line of the Backend. It mounts the master secret, 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 secrets and the S3 keys of the data libraries as files from their Secrets. The sign-in secrets are the static list of users, the SSO client secret, the LDAP bind password and certificates. The license key comes as a file and as the environment variable PL_LICENSE. The single-user token and the S3 keys of the primary storageprimary storage — The bucket (Amazon S3 or Google Cloud Storage) or folder where Platforma keeps all results and uploaded files. Glossary come as environment variables. Each value comes from a Secret in the namespace of Platforma.

The Helm chart accepts only the names of Secrets, never secret values. At installation, it checks that each Secret exists and has its key. It stops when a secret option of the Backend is in its extra options, or when a secret variable is in its plain-text variables.

The AWS installer keeps the secrets that the operator gives as stack parameters (the license key, the sign-in secrets and the keys of the data libraries) in AWS Secrets Manager. CloudFormation does not show the values of these parameters, and the installer reads them from Secrets Manager.

The Google Cloud installer keeps each secret value in Google Secret Manager, in the project of the installation. Terraform and Infrastructure Manager do not get the values: only the names of the Secrets. After it makes the cluster, the installer writes the KubernetesKubernetes — A system that runs programs on a group of machines (a cluster). Platforma can run in a Kubernetes cluster. Glossary Secrets in the namespace platforma from Secret Manager. The Backend gets the values from these Secrets. The secrets have the label platforma-installation=<name>-cluster, where <name> is the deployment name:

Secret Manager secret Holds Kubernetes Secret
<name>-cluster-platforma-master-secret the master secret platforma-master-secret
<name>-cluster-admin-password the password of the administrator login platforma platforma-admin-htpasswd (as a hash)
<name>-cluster-license-key the license key platforma-license
<name>-cluster-htpasswd the static list of users platforma-htpasswd-provided
<name>-cluster-ldap-search-password the password of the LDAP search user platforma-ldap-search-password
<name>-cluster-google-client-secret the client secret of Google sign-in platforma-sso-client-secret
<name>-cluster-datasource-<library>-access-key and -secret-key the S3 keys of a data library platforma-datasource-<library>

A secret exists only when its setting is on. The installer makes the master secret and the administrator password itself. The keys of the demo data library of MiLaboratories are public, so they go only into a Kubernetes Secret.

With the Terraform modules, access to the cloud on AWS and Google Cloud uses cloud identities, so there are no long-lived cloud keys to keep.

The secrets of Platforma

Secret Necessary when Made by When it changes
License key Always MiLaboratories gives it; the operator puts it in a Secret The Backend checks the new key
Master secret Always, except with a single-user token Operator: 32 random bytes All sessions end, and all users sign in again. The Backend deletes the stored SSO sessions, and encrypts again the storage keys that the operator gives in its settings. The database and the files stay readable. A storage that is no longer in the settings gets the status “secret lost”.
Static list of users: a file in the format of the htpasswd tool. The Backend accepts all formats of this tool, also weak hashes (MD5, SHA-1) and passwords in plain text. MiLaboratories recommends bcrypt (a strong, slow hash). Sign-in with a static list of users Operator The Backend reads the file again. It refuses to renew the session of a removed user (see Sign-in).
SSO client secret SSO with Google: Google gives a client secret also to a public client. Platforma supports only public clients (with PKCE), and for a public client this value is not a secret: the Backend gives it to any client that starts an SSO sign-in (SSO). Corporate identity provider —
LDAP bind password Sign-in with LDAP Corporate LDAP directory —
Single-user token One user, for example a test installation. The token is the only key: the Backend makes its other keys from it. Operator; if the operator does not give one, the Backend makes a random token The user connects with the new token. The master secret is made from the token, so a new token has the same result as a new master secret.
Storage keys of the primary storage and the data libraries Storage with no 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, for example storage with the Amazon S3 interface in the data center of your company Corporate storage; the operator puts them in Secrets —
TLS certificate In Kubernetes, always, for 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. 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, only when TLS is on in the Backend. Certificate service of the cloud, or the operator. In Single Server mode, the Backend can make a self-signed certificate. The cloud service renews its certificates; the operator renews the other certificates
Secret for jobs (by default, the license Secret) Kubernetes: jobs that need a key, for example a license key of a tool Operator Jobs get the keys that their BlockBlock — A small application for one step of an analysis, for example the import of reads or clustering. It can combine several tools. Glossary asks for
Pull secrets for image mirrors A private mirror that the nodes cannot reach with a cloud identity Operator —

A change of 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 (for example, a new provider) also makes all users sign in again.

With the AWS installer, the operator changes a secret in a stack update, and in the same update raises the parameter SecretsRevision: only then does the installer give the new value to the Backend.

With the Google Cloud installer, the operator changes a secret with a new run of install.sh with the new value. The installer adds a new version of the secret in Secret Manager only when the value is different. Then it writes the Kubernetes Secrets again and shows created, updated or unchanged for each of them. When a secret has a new version, the installer restarts the Backend: it reads the license key, the LDAP search password and the keys of the data libraries only at start. When no value changes, the Backend does not restart. The master secret is an exception: the installer keeps it until the operator gives a new value in MASTER_SECRET (see Change the master secret).

Master secret

What the master secret does The Backend makes five keys from the master secret: a key that signs the sessions of users, a key that signs the references to data, a key that signs the links to files when the primary storage is a folder, a key that encrypts the SSO sessions in the database, and a key that encrypts the storage keys of the primary storage and the data libraries in the database. Signs the sessions of users Signs the references to data Signs the links to files in a folder storage Encrypts the SSO sessions Encrypts the storage keys of the primary storage and the data libraries Master secret
The Backend makes five keys from the master secret: - a key that signs the sessions of users; - a key that signs the references to data; - a key that signs the links to files when the primary storage is a folder; - a key that encrypts the SSO sessions in the database; - a key that encrypts the storage keys of the primary storage and the data libraries in the database.

The Backend makes all its signing and encryption keys from one secret, the master secret. The operator, who sets up Platforma, keeps and backs up one value according to the security standards of your company.

The master secret encrypts only the SSO sessions and the storage keys of the primary storage and the data libraries in the database: the database and the files do not depend on it. The operator can change it; then all users sign in again. If the master secret is lost, the operator sets a new one, and the result is the same as a change.

Next