Skip to content

A script given the wrong IDs deleted 883 cloud sites

On 5 April 2022 a script meant to delete an app was given the IDs of whole cloud sites. It deleted 883 sites belonging to 775 customers.2

883 sites of 775 customers deleted; some down for up to 14 days.2

Get 30 minutes free every day, forever.3SOC 2 Type II499.9% uptime SLA on Pro4
AtlassianApril 2022Limited

36 of 50

Stopped Limited: the payment went out through the bank’s own system This case: Atlassian. A cap limits it.

What happened

The API accepted site IDs where app IDs were meant, without warning.

  1. 5 April 2022. Atlassian ran a script to delete an app from customer sites.

  2. The IDs. The requesting team supplied IDs of whole cloud sites. The API accepted either kind with no warning.

  3. By 08:01 UTC. Starting at 07:38, the script deleted 883 sites. All were restored by 18 April.2

How the gate handles it

With the sealed gate, the deletes would have hit an hourly ceiling.

Deletes would have waited for a person, and a script approved once would still have hit a ceiling on deletes per hour. Press Play to watch the same deletes.5

Approved script deleting hundreds of sites in an hourSample6
  1. requestDELETE /sites/{site_id}repeat: 883within: 23mapproved: trueLimited429count: 20

LimitedDeletes wait; even an approved script hits the hourly ceiling.

How easy

Atlassian could have put an hourly ceiling on site deletes in three steps.

Sample
Seal a keycloud-api
Maintenance API key
Paste the API key
The script never sees the API key.
Delete rulescloud-api
Reads
Deletes
Delete ceiling20 an hour · holds after approval
The ceiling holds even after an approval.
Where approvals goAsk first
Slack
Microsoft Teams
Telegram
Email
A person approves or denies each call that asks first.

Approvals and signed records come with Pro, Gate only and Custom. On Free, a rule that asks first refuses instead.7

In code

Or in four lines of code.

The same three steps, from the terminal.

Sample
What each line does
1Seal the keysealedbox keys sealThe script gets sbk_live_9Kd5…w4.
2Set the rulessealedbox rules addDeletes ask; 20 an hour at most.
3Connect approvalssealedbox approvals connectAsk-first calls go to #cloud-ops.
Try it

Put the gate in front of your agent today.

Run three practice calls in five minutes, then check their records on your own computer. Test mode, on every plan.

Start free$ sealedbox try5-minute practice run9
Scope

What the gate doesn’t change, and three failures like this one.

Related cases
Answers11

Questions about this case and the gate.

Still have a question?Book a callAll questions
What if someone approves the deletes?

Not past the ceiling. Hourly ceilings on deletes hold even for approved calls, so past it each delete gets a 429.

Would an approver have caught the wrong IDs?

They would have seen each delete drawn from the request itself, never from the script’s own description. An approval proves who said yes to that exact request, not that anyone read it.

Can we set our own ceiling?

Yes. The ceiling is a blank you fill in the rule; 20 an hour on this page is a sample value.

What happens to deletes past the ceiling?

They get a 429 and do not reach the service. Limited calls still count as gate requests.

Could deletes made in parallel slip past the count?

No. Counts are atomic, so parallel calls cannot add up past the ceiling.

Do ceilings come with every plan?

Yes, with rules, caps and the stop. Approvals come with Pro, Gate only and Custom; on Free, deletes set to ask first are refused instead.