The Lujie Chronicle

Keep your head in the cloud.

Switching off a key without deleting it

Disabling lets you find out what depends on a key before you delete it.

Context

Service account keys are like long-lasting passwords that software uses to sign in to Google Cloud. Until 2021, if you thought a key had leaked, the only fix was to delete it. Deleting a key breaks anything still using it, and you can’t undo it.

My role

As an intern in 2021, I designed and built a way to switch a key off and back on. I worked with four teams to add it everywhere customers manage their keys, and launched it to everyone. It’s available to millions of users.

After joining full-time, I built the feature that switches off a leaked key automatically. This is now on by default across Google Cloud.

Fig. 1 · A key's life, before and after

A key's life, before and afterBefore 2021, a key went from Created to Active, and the only way out was Deleted, which could not be undone: there was no off switch. After: a key goes from Created to Active, can be disabled and re-enabled, and is deleted only once nothing depends on it. When a leak is detected, the key is disabled automatically. This is on by default. Created Active no off switch Deleted Created Active Disabled Deleted Leak detected delete · can't undo disable re-enable delete auto-disable · on by default BEFORE 2021 AFTER A key's life, before and afterBefore 2021, a key went from Created to Active, and the only way out was Deleted, which could not be undone: there was no off switch. After: a key goes from Created to Active, can be disabled and re-enabled, and is deleted only once nothing depends on it. When a leak is detected, the key is disabled automatically. This is on by default. Created Active Deleted Created Active Disabled Deleted Leak detected delete · can't undono off switch disable re-enable auto-disableon by default delete BEFORE 2021 AFTER
Diagram is illustrative.

Why it matters

Disabling lets you find out what depends on a key before you delete it. Auto-disable means a leaked key stops working even if nobody is watching.

Next story · Marbury AI A review agent you can audit Read it next