Threat-modelling a signing path: assets, actors, boundaries and what's left over

Start from what you're protecting and who's coming for it, say what each control stops and what it doesn't, and end with what's left over. On a signing path, the attacker usually wants to use the key, not steal it.

Read the briefing
About 3 min to read 6 drills

What to remember

  1. Assets, actors, boundaries, then controls. Listing tools before naming the attacker is the most common way to fail this question, and interviewers notice it in the first sentence.
  2. A signer can be used, not just robbed. An HSM or enclave stops extraction. It doesn't stop anyone who can reach the signing API, so policy matters as much as the box.
  3. Say what your control doesn't stop. It's the fastest proof you've really done this. People who've only read about it never volunteer it.
  4. Insiders include a tired engineer and a stolen laptop. Most serious access on a small team is legitimate access used by the wrong person or at the wrong moment.
  5. End with the residual risk, and who accepted it. Security is a decision about what's left, not a claim that nothing is.

The big picture

A threat model is a structured argument about what can go wrong and what you've done about it. On a signing path it's the first thing a head of security will ask for, because it shows whether you think from the attacker's side or from your tool list. It doesn't need a framework; it needs an order and honesty about limits.

The mental model

Draw the path a signature takes. Every arrow is a boundary. For each one ask: who can reach this, what can they make it do, how would I know, and what's the worst case if I'm wrong?

Diagrams

Where to look on a signing path
service --> policy --> signer --> network
   ^          ^          ^
   |          |          |
 RCE or     who can    root on the box,
 bad crate  change     malicious signed
            the rules  image, the provider

Off to the side: CI, deploy keys, the audit log,
whoever holds the withdraw key.

In depth

The order

Assets. Name them specifically: trading hot keys, validator identity, vote authority, withdraw authority, fee and tip payers, customer API keys, deploy keys, the policy itself, the audit log.

Actors. RCE on a service. An engineer with production access, or a stolen laptop. A bad dependency or CI runner. A hosting provider's staff or the BMC. A former employee.

Boundaries. Where does trust change? Service to signer, host to enclave, CI to production.

For each pair of actor and asset: what can they do, what stops it, how would you know, what's left over.

Use, not theft

Non-extractable keys change the attacker's problem from copying a secret to asking for signatures. That's a big improvement, because asks can be rate-limited, checked and logged. But an attacker with code execution on a service that's allowed to call the signer inherits that service's rights.

Firedancer's source states it directly: without checks, "an attacker with RCE on pack can make the validator sign a transaction that invokes their malicious program which drains the identity key". So its keyguard checks the role and the payload type of each request.

What a good answer sounds like

"Before I design anything: what's the worst thing that can happen? For a hot trading key it's a signature that moves value somewhere it shouldn't. The likeliest route isn't someone stealing the key, it's code execution on a service that can already ask for signatures. So the first control is what the signer will agree to sign, and the second is how little that key holds. An enclave wouldn't help with that case, and I'd say so."

Myths and facts

Myth: We use an HSM, so the key is safe.

Fact: The key can't be copied, but anyone who can reach the HSM's API can use it. Theft becomes use, and use is what you must now control and watch.

Myth: A threat model is a compliance document.

Fact: It's a working tool for deciding what to build next. If it doesn't change a decision, it wasn't a threat model.

Myth: Insiders aren't a threat on a small, trusted team.

Fact: The person is trusted; their laptop, their tired moment and their stolen session aren't. Controls should bound what any one session can do.

Myth: The goal is to eliminate the risk.

Fact: The goal is to know what's left, make it small and bounded, and have someone accept it on purpose.

How pros do it

  • Name assets by what losing each one costs, not by where it's stored.
  • For each control, say which actor it stops and which it doesn't.
  • Bound the worst case with value caps and key separation, so being wrong isn't fatal.
  • Write down the residual risks and who accepted them, and revisit them when the system changes.
  • Include CI, deploy keys and the policy itself. They're often easier targets than the signer.

Questions people ask

Do I need STRIDE or a formal method in the room?

No. Mentioning one is fine, but what scores is the order and the specifics. Say 'here's what I'd protect, who's coming for it, and what stops them' and walk one path properly rather than listing categories.

How deep should I go in an interview?

Pick the one path that matters most, usually a hot key signing value, and go deep on it. State that you're choosing it, name the others in a sentence, and offer to go there next.

The interviewer asks me to threat-model my own project. What's the trap?

Defending it. Open with what it doesn't stop. An interviewer already knows your design has limits, so naming them first earns more trust than any feature.

Further reading

Drills · 6

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Answer out loud

Threat-model the path a trading service uses to get a transaction signed. Start wherever you'd start, and talk me through it.

In short

Name what you protect and who's coming for it first, then each control, what it doesn't stop, how you'd know, and what's left.

What a strong answer does
  • Starts from the attacker: Opens with specific assets and realistic actors, then works from them.
  • Limits and residual risk: Volunteers what each control doesn't stop, and ends with what's left and who accepts it.
  • communication: Says the plan in one line, walks one path deeply, and says what else it would cover.
Why

The order is what's being scored: assets, actors, boundaries, then controls, detection and residual risk. Most candidates open with enclaves or HSMs. The interview signal is starting from what can go wrong, choosing one path to go deep on, and saying plainly what each control leaves open.

The common mistake

Opening with 'we'd put it in an enclave': that names a control before you've said what you're defending against.

2 Pick the strongest answer

Your hot key now lives in a non-extractable HSM. An attacker gets code execution on the trading service that's allowed to call it. What have they got?

  1. Nothing useful: the key can't leave the HSM. They don't need the key. They need signatures, and the service is allowed to ask for them.
  2. The ability to request signatures, limited only by what the signer's policy allows and whatever value the key controls. Extraction is off the table, use isn't. The service's rights are now the attacker's rights.
  3. Only read access to the audit log. The service's purpose is to get signatures. That's precisely the power worth having.
  4. The key itself, because HSMs can be dumped with root on the caller. Root on a client of the HSM doesn't reach the key inside it. It reaches the API.
In short

They can't copy the key, but they can ask it to sign whatever the signer allows, so the policy and the caps decide the damage.

Why

This is the turn that separates people who've run custody from people who've read about it. A non-extractable key converts theft into use. Use can be rate-limited, policy-checked and logged, which is why it's a real improvement, but only if those controls exist. Without them an HSM is a slower file.

The common mistake

Treating non-extractable as the end of the conversation.

3 Scenario: what do you do next?

You've joined a small team where every engineer has direct production access. The head of security asks you to make the signing path safer, without slowing the team down.

Step 1. Where do you start?

  1. Buy an HSM for all the keys. It might come later, but it doesn't answer who can use the keys, which is your actual question.
  2. List what each engineer's session can do to a key today, and what the worst single-session outcome is. You can't bound what you haven't measured. This turns a vague worry into a specific worst case.
  3. Remove production access from everyone and require a ticket. It breaks how the team works, and in the next outage the fast path comes back, unlogged.

Step 2. You find any engineer can reach the signer as a trusted service from any production host. What's next?

  1. Tell the team not to do that, and add it to the runbook. A reminder isn't a control. It fails exactly when it matters.
  2. Move the signer to a hidden port. Obscurity stops nobody who already has a session on the host.
  3. Give the signer caller identity, per-key rules and value caps, so any session is bounded whoever holds it. It bounds a stolen session and a tired one alike, and normal work isn't slowed.

Step 3. How do you keep the speed they value?

  1. Two approvers for every production command. People route around controls that slow everything, and then you've lost the record as well.
  2. Short-lived credentials tied to a person, a logged break-glass, and two people only for what touches keys. Most work stays one person and fast. The record exists anyway, and the rare dangerous thing gets a second look.
In short

Work out what any one session can do today, then bound that with short-lived access, narrow keys and a record, before adding gates.

Why

On a small team, security that assumes a separate operations group fails. The scoring is on sequence: measure what one session can do, bound it, and keep the common path fast. Interviewers listen for whether you'd measure before you restrict.

4 Pick the strongest answer

The interviewer asks: "You've listed your controls. Are we safe now?" What's the best answer?

  1. Only a third-party audit can answer that. An audit finds things, but the residual risk is yours to name.
  2. Yes, with these controls the path is secure. There's no such state, and a head of security will press until you say so.
  3. It depends on the threat model. True, but you've just been asked for yours. It avoids the question.
  4. Here's what's still open, how large it could be, who accepted it, and what would tell us it had happened. Security is a decision about what's left. This is the answer of someone who's actually carried it.
In short

No: say what's still exposed, how big it is, who accepted it, and how you'd know if it happened.

Why

Stating residual risk is the signal. It shows you know controls have limits, you can size what's left, and you know someone has to own that decision.

5 Quick recall

A non-extractable key turns theft into what? One word.

In short

Use: an attacker can't copy the key, so they must use it through an API you can control and watch.

Accepted

use · usage · misuse

Why

"Theft becomes use" is the line to remember. Use can be rate-limited, checked and logged; a silent copy can't.

6 Answer out loud

You built a signing service in a Nitro Enclave. Tell me what it doesn't protect against.

In short

A bug in my code, a malicious signed image, abuse of its signing API, a flaw in Nitro itself, and anything before or after the enclave.

What a strong answer does
  • Honesty about limits: Volunteers API abuse, its own bugs, signed-image risk and trust in the platform, in order of likelihood.
  • Mechanism: Explains why each passes: for example, that PCR8 trusts anything signed by the release key.
  • communication: Ordered by likelihood, says what bounds each, relaxed about it.
Why

The interviewer is checking honesty and depth at once. The list: anyone who can reach the API can ask for signatures. A bug in the enclave's parser or policy runs inside the boundary. A malicious image signed with your release key passes PCR8. You still trust AWS's Nitro implementation. Rollback to an older signed image may pass. Availability isn't protected at all, since the parent can stop it. Say these before they have to.

The common mistake

Saying 'side channels' and stopping there. It sounds informed, but it's the least likely of these, and it dodges the honest ones.

Next lesson Trust on bare metal: first credentials, measured boot, BMCs and the provider
Drill · Threat-modelling a signing path
0:00

Loading…