Skip to main content

Security best practices

API Key Manager gives you the tools to limit the damage a leaked key can do. These habits make the most of them.

Give each key one job​

Create one key per integration, with a description that names it. Shared keys cannot be revoked without breaking everything that uses them, and Last used is meaningless on a shared key.

Restrict as far as the job allows​

  • Allow only the HTTP methods needed. Use GET only for anything that just reads.
  • List only the endpoints needed, see Endpoints.
  • In Jira, use a Create Issue key or a Stored JQL key whenever the job fits, they cannot be widened.

An unrestricted key can do everything the app can do (see What a key can reach).

Keep lifespans short, and rotate​

Use the shortest expiry that is practical. Create the replacement key before the old one expires, switch over, then revoke the old one.

Store keys like passwords​

  • Put keys into a secret manager or your CI system's encrypted variables. Never commit them to a repository, paste them into tickets, wiki pages or chat messages.
  • The app shows a key once. Do not leave copies in your clipboard history or unprotected notes.
  • If a key might have leaked, revoke it immediately. Revocation takes effect at once.

Review regularly​

Open the key list now and then:

  • Revoke keys that show never or an old date in Last used.
  • Revoke keys whose integration no longer exists.
  • Check that the methods and endpoints of each key still match what it should do.

Limit who administers keys​

Only site administrators can create, view and revoke keys. Every administrator can create a key that acts with the app's permissions, so keep the number of administrators small.

How the app protects you​

  • Keys are stored as encrypted secrets in Atlassian's Forge storage. The app's UI never receives the key values.
  • Rejections do not reveal why a request was rejected.
  • Rate-limit headers and content encoding are stripped from responses.
  • (Jira) Endpoint paths are normalised, and path-traversal tricks such as .. or encoded slashes are rejected before matching.
  • (Jira) Create Issue keys match the endpoint exactly, so they cannot reach sub-resources.
  • Requests run as the app, never as a user, so a key cannot grant more than the app's approved scopes.