Skip to main content

Open security points

What is open today in both SDKs (the Python package personal_agent_protocol and the npm package @datalayer/personal-agent-protocol), both roles: residual risks, what a deployment must provide, and the questions the PAP draft leaves open. Anything fixed is gone from this page; the changelog says what each release changed. Report a new problem as the support page says.

Residual risks in the SDKsโ€‹

  • Bearer tokens by default. The reference companies bind their tokens with DPoP only when configured to (ยง4.5). By default they issue Bearer tokens, which they accept only beside a Session JWT whose ath covers the token.
  • The default DPoP keys live in memory. InMemoryDpopKeys is for one process. A key lost with it means refreshing, because refresh tokens aren't bound; a bound access token stops working at once. A host contributes a durable DpopKeyCustody.
  • Known-client records grow with every agent that authenticates. A company keeps one KnownClient record per client_id (the extensions the agent declared), written at its first successful client authentication and never expired. Only an agent with valid metadata and keys adds one, but the set is unbounded. Bound it with the company's client policy (pap.company.clientPolicy) or a store that ages records out.
  • The account directory throttles its own checks. The company limits Mediated Sign-In attempts (per account identifier, per agent and user, per Session, and wrong codes per account), then answers 429 rate_limited. AccountDirectory.authenticate receives a SignInContext and must still throttle its own credential checks, which other paths may reach.

What a deployment must provideโ€‹

The SDKs ship portable defaults that are correct in one process. A deployment replaces them where it runs more than one:

  • Company store. Only an in-memory store ships (MemoryCompanyStore). Replicas, restarts, and rollbacks need a durable, shared CompanyStore with atomic create, take, and replace (check_store / checkStore hold a backend to the contract). The default replay cache and the sign-in attempt budgets live in that store, so they are only as shared as the store is. A contributed pap.company.replayCache must be shared across replicas the same way.
  • Key custody. The signer, the agent's private keys, and the company's keys are the host's. Production keys belong in a KMS or HSM behind a contributed pap.signer (or an equivalent remote signing service), and durable delegated keys behind a DelegatedKeyCustody.
  • Agent-side state. The core plugin contributes no token store, pairwise user ID store, authorization-state store, browser handoff, protected input, or approval surface; the host contributes them (the pap CLI host keeps local files, under a lock, for one user). Refresh tokens must be encrypted at rest. The refresh token lock and the rate-limit budget default to in-process: an agent running several processes contributes shared ones.
  • Network policy for Node. The portable TypeScript bundle can only check URLs textually; DNS resolution and address pinning are in the ./server entry (createResolvingFetch). A Node host that builds its own company or identity client, rather than buildCompany, must pass it as fetch.

Open questions in the PAP draftโ€‹

The SDKs take a position on each; another implementation may take another, and the conformance runner reports the difference.

  • working while a request is acted on. The reference companies set working the moment they accept a request and clear it once they have replied, within the same request; a company that acts later keeps it true meanwhile (ยง8.7), and a personal agent that wants the whole reply reads until it is false.

Interoperability not yet exercisedโ€‹

  • The adonis company implementation has not been run against these SDKs: it has no runnable example.
  • Problems found in pi-poppy (operations deduplicated across users, a draft 0.2 browser assertion accepted at /oauth/token, no WWW-Authenticate on a replayed jti, no resource_metadata in the MCP 401 challenge) were reported to that project; they are its to fix.