Secrets

Save a secret. The value is sealed and never returned.

kind: env sets the environment variable name on every session that uses it; name follows environment-variable rules and may not be one Rush sets itself. kind: header never reaches the session's environment: E2B's egress proxy adds header_name: header_format(value) to the session's HTTPS requests to each host in targets, outside the sandbox. Basic {value} takes username:password and encodes it. A header secret's name is a label (letters, digits, ., -, _). kind: login takes one https origin in targets plus username, password and an optional base32 totp_secret. Its value is never in the session's environment or conversation: the agent runs rush-sign-in <name> and Rush types it into the session's browser on that origin only. The agent shares that browser, so this keeps the value out of the transcript, not out of the sandbox. source: onepassword (header and login only; an environment variable is readable by the agent, so it stays in Rush) stores no value: value is an op:// reference, read with the creator's connected 1Password service account when a session starts or signs in. A header takes one field (op://Vault/Item/field), a login takes the item (op://Vault/Item, read as its username, password and, with totp: true, its one-time code). The reference must be readable when it is saved, or the request is refused with a SECRET_ONEPASSWORD_* code. project_id is required: the secret reaches every session in that Project.

post/o/{org}/secrets

Request

  • Base URL: https://api.prix.dev
  • URL: https://api.prix.dev/o/{org}/secrets
  • Auth: HTTP bearer

Request body

project_idstring uuid required

A Project of this org; every session in it gets the secret.

namestring required
kind'env' | 'header' | 'login'
valuestring required

The value; with source: onepassword, its op:// reference.

source'rush' | 'onepassword'

Where the value lives. onepassword is for header and login.

totpboolean

login with source: onepassword only: also read the item's one-time password.

descriptionstring
targetsstring[]

header only: bare lowercase hostnames, such as api.stripe.com (no scheme, port, path, wildcard or IP).

header_namestring

header only: the header to set; Host, Content-Length and hop-by-hop headers are refused.

header_format'{value}' | 'Bearer {value}' | 'Basic {value}'

header only.

usernamestring

login only.

passwordstring

login only.

totp_secretstring

login only: the base32 two-factor setup key.

Response

Saved.

Changes

No recorded changes to this operation across all 2 revisions of this API.