Passkeys: protect your budget#

A passkey is what unlocks your computer: Windows Hello, Touch ID, a security key or your phone. With one set up, the changes that would let an agent spend more need you, at the meter, with a tap. This page says what that covers and what it does not, how to set one up, and what to do when you lose it. It is for anyone who runs agents on a computer they also sign in to.

What it protects#

Without a passkey, Lockpin lets the meter page’s control token loosen a cap. An agent running on your computer can read that token, so those raises are logged as “not confirmed to be a person”.

Once one passkey is set up, the token no longer does these. Each needs a tap of your passkey:

  • Raising a task’s budget beyond its allowance (-allowance-pct, 50 percent by default).

  • Removing a cap (budget 0).

  • Saying yes to a call held at its budget, beyond the allowance.

  • Pausing.

  • Turning off or changing the breaker, or resetting one subject’s trip.

  • On a team node: raising a team’s allowance, or a team’s or the workspace’s limits.

  • Adding another passkey, or removing one.

The claim is exactly this: raises above your allowance need you. It is not “the agent can’t change its limits”.

Still free, with no tap:

  • Lowering a budget, and anything within the allowance.

  • Resume and stop.

  • A yes from a paired phone, Slack, Teams, the approvals API with an owner key, or the approval webhook’s answer token. Those come from another machine or a key you hold. They are logged “not confirmed with a passkey”. lockpin approve is not among them: once a passkey is set up it points you to the meter. On a headless Lockpin (-ask-headless or an approval webhook) that meter cannot confirm anything, so there a yes past the allowance comes only from the approvals API or the webhook’s answer token. See Addresses.

A call from an agent, from VS Code or from lockpin approve gets “this needs a person” and a link to the meter. None of them can start the passkey prompt: your browser asks for it only after you click Confirm with passkey in Lockpin’s own page.

What it does not do#

An agent running as you can still edit or stop Lockpin, delete the passkey file, or run lockpin passkeys reset. Lockpin cannot defend against another program that runs with your rights. What it does is make each such change loud: a red loosened alert at the next start, naming what changed. Lockpin compares the passkey file at every start, so a change made while Lockpin was off is reported.

So the limit is the same as without a passkey, moved up one level: it stops a mistake or a runaway, and it makes a person the one who says yes.

Set one up#

  1. Open http://localhost:8787/lockpin/setup#protect.

  2. Choose Use this computer’s lock. Your browser shows its own prompt (Windows Hello, Touch ID, or Chrome’s own on a Mac).

  3. The meter’s Passkeys panel lists what is set up, when it was added and last used, and lets you remove one.

Lockpin asks for the computer’s own lock and refuses a passkey kept by a password manager’s browser extension (1Password, Bitwarden, KeePassXC, Proton Pass). Those extensions say “user verified” without checking it is you, so anything that can drive your browser could tap through them. The refusal reads: “This passkey is kept by a password manager’s browser extension, which can approve without checking it is you. Choose this computer’s own lock (Windows Hello, Touch ID) or a security key.”

The check goes by the authenticator’s identifier, which a browser may hide. A passkey from a browser that sends none is accepted, so the advice stands: use the computer’s own lock.

The first passkey is added with the page’s control token, so an agent that gets there first can register one. It then shows in the list and as a red alert, and you can remove it. Adding another passkey, or removing one, needs a tap of one you already have.

When nothing works#

Some computers cannot make a passkey for a page on http://localhost: managed Windows with Windows Hello off, Safari with iCloud Keychain blocked, Linux without a Chrome sign-in, a remote desktop, a private window. The setup page then says so and offers, in this order (when the browser finds no built-in lock, the security key comes first and this computer’s lock second):

  1. Use this computer’s lock.

  2. Use a security key.

  3. Use a phone, only when your browser can use one.

  4. Ask admin, on a computer enrolled in a team. Asking from the page is not built yet: it says “tell your admin what you need; they can raise your key’s limit on the team server”.

  5. Skip for now. The meter keeps a reminder you can hide for 7 days.

If none works you lose nothing you had. With no passkey set up, Lockpin stays in the plain mode above: caps, tightening and everything inside the allowance work as before, and a raise above the allowance uses the control token and is logged as not confirmed to be a person. In a team, ask your admin.

The 30-minute window#

When the confirmation dialog offers it, tick Allow raises up to $Y more for the next 30 minutes in this tab. $Y is the amount of the raise you are confirming, and the dialog shows it.

  • It covers only raising a task’s budget and saying yes at the cap, and only up to $Y in total.

  • Pause, no cap, the breaker, teams and passkeys never use it: each needs its own tap.

  • It lives in that browser tab’s memory only. It is not a cookie and it is not written to the browser’s storage. Reloading the page or closing the tab ends it.

  • The meter says when it ends: “Raises up to $5.00 more need no tap until 15:42 in this tab.”

The limit: a program running as you that can read the browser’s memory could use the window until it ends. It is a bounded convenience, not a lock.

VS Code and the overlay#

Neither can run a passkey prompt in its own window. They still answer what needs no passkey: within the allowance, Stop, a loop’s Let it run. For a yes that does need one, the button reads Confirm in browser. Clicking it opens the meter in your default browser at that held call, where you click its own button and tap. The card then says “Waiting for you to confirm in the browser” until the question is gone. They never open the browser on their own.

Lost your passkey#

At the computer’s console, with Lockpin stopped:

lockpin service stop
lockpin passkeys list
lockpin passkeys reset
lockpin service start
  • lockpin passkeys list shows each passkey, how it was added and the address it was made for.

  • lockpin passkeys remove ID takes out one.

  • lockpin passkeys reset takes out every one and starts a new set. It also repairs a damaged passkey file.

  • remove and reset refuse while Lockpin runs, because it holds the passkeys in memory and would write the removed one back. Each asks you to type the word (remove, reset) unless you give -yes.

  • Each is recorded as a red alert. remove says “passkey NAME (ID) removed at the console; not confirmed to be a person”; reset says “every passkey was removed at the console; not confirmed to be a person”.

  • With none left, raises beyond the allowance fall back to the control token until you set one up again.

On your own computer an agent running as you can run lockpin passkeys reset too. That is the limit above, and it is loud. On a team node the file is the node’s, so a reset needs the node’s administrator. See lockpin passkeys.

Where it is kept#

lockpin-passkeys.json, beside the ledger (or in the node’s folder, beside the keys file). It is written with owner-only permissions (mode 0600, where the system has them). It holds each passkey’s public key, id, name, when and how it was added and when it was last used, and a random handle for this install. It holds no private key, no fingerprint or face data, and nothing about you beyond the name you typed. It is never uploaded.

Addresses#

The meter’s pages are at http://localhost:8787/lockpin/. A passkey belongs to a host name, and browsers allow one over plain HTTP only on localhost.

  • Agents and tools keep http://127.0.0.1:8787/v1 and the other base URLs. A browser that opens a meter page at 127.0.0.1 or [::1] is sent to localhost on the same port with a temporary redirect (307). Only a browser’s GET of a page is redirected, and only for 127.0.0.1 and [::1] (another 127.x address is not what localhost reaches). A request that carries a forwarding header (Forwarded, X-Forwarded-*, Via) is never redirected, and anything else gets the page as before.

  • A reverse proxy in front of the meter must pass the original Host (nginx: proxy_set_header Host $host;). A proxy that rewrites Host to 127.0.0.1 and adds no forwarding header would send its visitors to their own localhost.

  • When Lockpin listens on 127.0.0.1 it also listens on [::1] on the same port, because a browser may try [::1] for localhost first. If another program holds that port, Lockpin refuses to start and names the port.

  • Browsers that sync passkeys (Google, Apple) may offer one made for localhost on your other computers. Another computer’s Lockpin does not accept it: each Lockpin accepts only the passkeys in its own file, made for its own port.

  • A change of port changes the address a passkey was made for. A passkey for another address is kept, listed as “for another address”, and never accepted. If none matches, Lockpin treats passkeys as not set up and says so at start. Set one up again, and remove the old one with lockpin passkeys remove ID.

  • A team node served at its own HTTPS name uses that name: -passkey-origin https://lockpin.corp.internal:8790 (a name, never an IP address). Changing the name means setting passkeys up again. The flag is accepted now, and lockpin passkeys add-link prints that origin, but a team node’s meter answers only on the node itself today, so an HTTPS name becomes usable when the remote browser path ships.

  • Containers. A call that reaches Lockpin through a published port does not come from the machine Lockpin runs on: it arrives from the container network. So Lockpin refuses to set up a passkey from it, and refuses to loosen a cap beyond the allowance from it, as it did before passkeys. In the repository’s container, passkeys cannot be set up or used from the host. With its Dockerfile (one machine), the meter’s pages, lowering a budget and raises within the allowance work from the host; raises beyond the allowance do not. With its docker-compose.yml (team mode), the meter is not served through the published port at all. A command run inside the container (docker exec) counts as this machine. -passkey-origin http://localhost:8787, already in both files, only fixes the address Lockpin prints in its links: publish on the same host port, or change the flag to match.

  • The team node image needs no flag: its meter is the pod’s loopback :8790, so a passkey is for http://localhost:8790, and a port-forward (which reaches the pod’s loopback) must use local port 8790. The shipped Kubernetes manifest starts the node headless, though, and a headless Lockpin cannot set up or confirm a passkey.

  • Headless. A Lockpin started with -ask-headless or an approval webhook has no browser path: its meter page carries no control token, and every change sent from that page is refused. So a passkey cannot be set up or confirmed there. A yes past the allowance comes from the approvals API with an owner or admin key, or the webhook’s answer token. If a passkey was set up before Lockpin was started headless, lockpin approve past the allowance is refused; use those remote answers.

A team node#

On the node, give an admin a one-time link at its console:

lockpin passkeys add-link -owner NAME -keys /path/to/lockpin-keys.json

It prints http://localhost:8790/lockpin/#passkey-link=.... Open it on the node itself within 15 minutes; it works once, for that admin. The page also asks for that admin’s lp_ key. Each admin’s passkey confirms only that admin’s own changes, within what their role may change. Pause needs a passkey even with -allow-pause.

add-link needs write access to the node’s folder, so an agent running as a developer cannot make a link. Confirming from an admin’s browser over the network is not built yet; the node’s own loopback meter uses passkeys today, unless the node is headless (-ask-headless or an approval webhook, as in the shipped Kubernetes manifest). See Run a team node and Remote admin.

Verify#

  1. Open http://localhost:8787/lockpin/setup#protect and add a passkey.

  2. Raise a task’s budget past its allowance in the meter. A dialog states the raise and asks for Confirm with passkey.

  3. Run lockpin passkeys list: the passkey is there, with the time it was last used.

Next steps#