Stashbase

Getting started

Load secrets into your applications with the official SDKs.

Stashbase offers official SDKs for loading secrets into your applications, especially in production.

Do not give coding agents an SDK API key. Run them with stashbase agent run so they get placeholders and policy-checked access instead of secret values.

There are two main APIs and each of them has its own SDK client:

  • Environment API
  • Workspace API

Environment API

When using Environment API, you get access only to selected environment and its secrets (based on selected permission). Environment API is only accessible to Environment Accounts and its API Key.

You can create Environment Account from environment dashboard page going to Accounts tab. Each environment account have exactly one API Key that is generated automatically.

Each Environment account can have its own expiration date or can be created without expiration. This API is particularly useful for running your apps in production because with our official SDKs you can run load your environment and inject the secrets as environment variables with just two lines of code.

Environment accounts

Permissions

When you create Environment Account, you can select which permissions you want. By default the generated API Key will have read-only permission to the selected basic environment data, like name, created timestamp, and so on.

For secrets you can select one of the following permissions:

  • read - only read access
  • write - write access (create, update)
  • delete - delete access

For webhooks you can select one of the following permissions:

  • read - only read access
  • test - send test webhook
  • create - create access
  • update - update access
  • delete - delete access

You can also add scan related permissions to the API Key:

  • scan - allows trigger scan requests via API

Workspace API

With Workspace API you can manage your projects and environments in the selected workspace. You can create either user personal API Key or service API Key.

Only users with workspace role Admin or Owner can create Service API Key.
We recommend setting an expiration date for all API keys.

On this page