Skip to main content

Stash

Alpha

This feature is alpha. Names, fields, and behavior can change or be removed at any time without notice.

A stash holds key and value entries on a project, an environment, a component, an instance, or a deployment. Each of these has its own stash. You own the data in it. Massdriver keeps it until you delete it or until it expires.

Deployments and scripts use the stash to pass values between steps, to record results, and to keep values for a set time. The Massdriver UI shows stash values as metadata, in notes, and in widgets.

Stashes do not inherit. A key on an environment is not visible from the stash of its instances or deployments. To read it, read the environment's stash.

Entries​

Each entry has these fields.

FieldRules
KeyLetters, digits, and the characters _, ., /, and -. Up to 255 characters.
ValueAlways a string. Massdriver returns it exactly as written. It cannot contain the null character.
FormatTEXT (the default) or JSON. A JSON value must be a JSON object. The API also returns a JSON value parsed, in the data field.
LabelOptional. A name for the entry, up to 255 characters. Entries with a label show on the Metadata panels. The label is not encrypted, so do not put secrets in it.
TTLOptional. Seconds until the entry expires, up to 315360000 (10 years). An expired entry is not returned and is deleted soon after. Without a TTL, the entry stays until you delete it.
ImmutableOptional. When true, the key cannot be set again until the entry expires or is deleted. You can still delete it. An immutable write fails when the key already has a value.
SensitiveOptional. When true, the value is encrypted with your organization's key. It is masked for callers who cannot change the stash. It is never sent in events, and it is never available to notes or widgets.

A set replaces the whole entry: the value, the format, the label, the TTL, and both flags. A setting that you leave out goes back to its default.

Limits​

LimitDefaultSetting for self-hosted installations
Value size65536 bytesMD_STASH_MAX_VALUE_BYTES
Keys in one stash1000MD_STASH_MAX_KEYS_PER_SCOPE

Expired entries do not count toward the key limit.

Well-known md/ keys​

Keys that start with md/ are reserved for widgets. The server checks each md/ write. See Well-known keys.

Permissions​

You need project:view on the project to read a stash. Sensitive values are masked unless you can change the stash.

To set or delete an entry, or to read a sensitive value, you need the permission for the stash:

StashPermission
Projectproject:update
Environmentenvironment:update
Componentproject:design
Instanceinstance:configure
Deploymentinstance:configure on the deployment's instance

A deployment's own credentials can read and write the stash of that deployment and of its instance, environment, component, and project.

Where stash values show​

PlaceWhat shows
The Metadata tab of an instanceThe instance's labeled entries and its widgets
The Deployment metadata section of a deployment's detailsThe deployment's labeled entries
The Metadata card on the project overviewThe project's labeled entries
NotesAny value that you write into the note
Widgetsmd/ keys, and the keys that you choose for your own widgets

These places update when a stash value changes. You do not need to reload the page. An entry that expires does not send an update. The UI removes it when its time ends.

Next​