Skip to content
HalftoneJournal
← All articles

SecurityEngineering

Defaults matter: secrets rotation

Our defaults, our reasoning, and what you can check yourself.

Ada Rivers

Every action is attributed to a person or an agent acting for one. The audit log answers who did what, when, and with which permissions. This post covers what we changed, why, and what it means for you.

Trade-offs

We publish what we change and why. Customers should be able to check our work, not just take our word for it.

Security work is mostly about making the safe path the easy path. If doing the right thing takes extra steps, people will eventually skip them.

ts
const key = `${route}:${hash(content)}:${hash(template)}`;
const hit = await cache.match(key);
if (hit) return hit;

The constraint

Credentials never reach the code that runs on your behalf. A broker holds them and hands out short-lived tokens scoped to a single task.

Permissions only shrink during a run. A task can give up access it no longer needs, but it can never gain access it did not start with.

Diagram of the request path before and after the change
Figure: the request path, before and after.

Rolling it out

We assume something will go wrong and design for recovery. Containment, rollback and clear alerts matter more than any single control.

Every action is attributed to a person or an agent acting for one. The audit log answers who did what, when, and with which permissions.

ts
const key = `${route}:${hash(content)}:${hash(template)}`;
const hit = await cache.match(key);
if (hit) return hit;

Results

We publish what we change and why. Customers should be able to check our work, not just take our word for it.

Security work is mostly about making the safe path the easy path. If doing the right thing takes extra steps, people will eventually skip them.

Credentials never reach the code that runs on your behalf. A broker holds them and hands out short-lived tokens scoped to a single task.

ts
const key = `${route}:${hash(content)}:${hash(template)}`;
const hit = await cache.match(key);
if (hit) return hit;

What's next

Permissions only shrink during a run. A task can give up access it no longer needs, but it can never gain access it did not start with.

We assume something will go wrong and design for recovery. Containment, rollback and clear alerts matter more than any single control.

Diagram of the request path before and after the change
Figure: the request path, before and after.