# PIP-0024 · Operated members and delegated hosts

A member can have an operator hold some of its signing keys and serve some of its endpoints, and can have another host serve its links. The member stays the issuer. Its own discovery document and its own keys say who holds what.

## Why

A member may have another operator run PATH for it: hold signing keys, serve its API, serve its links. A verifier then needs two answers, and needs them from the member: which keys sign for the member, and which hosts serve for it. This PIP defines both. The member stays the issuer of its objects and the party responsible for them.

## Terms

| Term | Meaning |
|---|---|
| **Member** | The issuer. Listed in the register of its network, with its domain |
| **Operator** | An operator that holds keys or serves endpoints for a member |
| **Held key** | A key listed in the member's `path-keys` whose private part the operator holds |
| **Delegated host** | A host that serves links for an issuer and is not one of the issuer's `hosts` |

## `operated_by`

The member's discovery document carries the arrangement.

```json
"operated_by": {
  "operator": "example-operator",
  "discovery": "https://api.operator.example/.well-known/path-configuration",
  "scope": {
    "types": ["path.request", "path.checkout", "path.receipt"],
    "endpoints": ["requests", "checkout", "receipts"]
  },
  "since": "2026-12-01T00:00:00Z",
  "until": null
}
```

| Field | Rule |
|---|---|
| `operator` | The operator's slug |
| `discovery` | The operator's own discovery document. It names the operator; it is not a source of keys for the member's objects |
| `scope.types` | The object types, by `type` or `kind`, the operator signs for the member |
| `scope.endpoints` | The keys of the member's `endpoints` the operator serves. The URLs stay in the member's document |
| `since` | RFC 3339. Start of the arrangement |
| `until` | RFC 3339, or `null` while the arrangement has no end date. After `until`, the operator signs nothing for the member |

`operated_by` is `null` or absent when the member operates itself. A member has at most one operator at a time. The member's document keeps the member's slug in `operator.slug`, whoever serves it.

## Held keys

Each key the operator holds is listed in the member's own `/.well-known/path-keys`, with `held_by` and `scope`.

```json
{
  "keys": [
    {
      "kid": "example-member-2026-01",
      "kty": "OKP", "crv": "Ed25519", "alg": "EdDSA", "use": "sig",
      "public_key_hex": "…"
    },
    {
      "kid": "example-member-op-2026-01",
      "kty": "OKP", "crv": "Ed25519", "alg": "EdDSA", "use": "sig",
      "public_key_hex": "…",
      "held_by": "example-operator",
      "scope": { "types": ["path.request", "path.checkout", "path.receipt"] }
    }
  ]
}
```

| Field | Rule |
|---|---|
| `held_by` | The slug of the operator that holds the private key. While the arrangement is in force, it equals `operated_by.operator` |
| `scope.types` | The object types, by `type` or `kind`, the key may sign. A subset of `operated_by.scope.types` |

A key held by the member itself carries neither field and may sign any type. A key with `held_by` carries `scope`; a key with `held_by` and no `scope` signs nothing.

## Verification

1. **Issuer.** `issuer` is always the member. An operator never signs a member's object under its own slug.
2. **Key.** The `kid` resolves in the member's own `/.well-known/path-keys`, on the member's domain. A verifier never reads a key from the operator's document for the member's objects.
3. **Scope.** When the key carries `scope` or `held_by`, the envelope's `type` or `kind` is listed in `scope.types`. Otherwise the verifier refuses the envelope.
4. **Signature.** As for any envelope.

An unknown `kid` is refetched once, then reported apart from a bad signature ([Discovery](/docs/discovery#caching)).

## Requests sent for a member

A request an operator sends to a PATH API for a member carries the member's credential and is signed as a request of the member ([Security](/docs/security#request-signing)). The operator holds that credential under the same arrangement.

## End of the arrangement

1. The member publishes its new keys (held by itself, or by its next operator) and updates `operated_by`.
2. New objects carry the new `kid`. The previous operator signs nothing after `until`.
3. The member removes the held keys once no object in circulation cites them. Until then they stay listed with `held_by` and `scope`, and the objects they signed stay verifiable.

Publish, then switch, then retire: the rotation rule of every PATH key.

## Delegated hosts

A delegated host serves links for an issuer. It serves `/.well-known/path-configuration` with `hosted_for` and no keys:

```json
{
  "protocol_versions": ["0.2.0"],
  "hosted_for": "example-member",
  "network": { "slug": "example-network" }
}
```

| Field | Rule |
|---|---|
| `hosted_for` | The issuer's slug |
| `network.slug` | The issuer's network |
| `keys`, `endpoints.keys` | Absent. The host publishes no key |

The host serves `GET /path/{reference}` for the issuer's objects, unchanged. The issuer lists the host in `delegated_hosts`:

```json
"hosts": ["api.example.com"],
"delegated_hosts": ["pay.shop.example"]
```

A reader that lands on a delegated host runs the [chain of trust](/docs/interop#the-chain-of-trust) against the issuer:

1. **Host.** The link names the host.
2. **Discovery.** The host's document names the issuer in `hosted_for` and its network.
3. **Register.** The network's register lists the issuer with its domain. The reader fetches the issuer's discovery document from that domain and finds the host in `hosts` or `delegated_hosts`. A host in neither is not the issuer, and the reader stops.
4. **Object.** As for any link.
5. **Signature.** The `kid` resolves in the issuer's keys, on the issuer's domain.

## Interface

| Object | Change |
|---|---|
| Discovery document | `operated_by`: object or `null`. `delegated_hosts`: array of hosts, may be empty |
| Entry of `path-keys` | `held_by`: operator slug. `scope.types`: array of object types |
| Discovery document of a delegated host | `hosted_for`, `network.slug`. No keys |

No call is added. No signed object changes shape.

## Conformance

Profile `PATH-CORE.Operated`, declared by an operator that holds keys, serves endpoints or serves links for another member. It:

- holds keys for a member only when the member's document names it in `operated_by`, and each held key is listed in the member's `path-keys` with `held_by` and `scope`;
- signs only the types in scope, with the member as `issuer`, and nothing after `until`;
- serves a delegated host only for an issuer that lists it in `delegated_hosts`, with `hosted_for` and no keys.

Every verifier applies the scope check of this PIP, whatever profiles it declares.

## Compatibility

Additive. A discovery document without `operated_by` describes a member that operates itself; without `delegated_hosts`, a member with no delegated host. A key entry without `held_by` and `scope` is held by the issuer and signs any type.

A verifier that applies this PIP refuses an envelope signed by a held key outside its `scope.types`.

## Implementation

The reference implementation serves `operated_by: null` and `delegated_hosts: []`, and its keys carry neither `held_by` nor `scope`. It does not declare `PATH-CORE.Operated`.

`verifyAgainstIssuer` of `@pathprotocol/sdk` (0.4.0) resolves the `kid` in the issuer's keys, fetches them once more on an unknown `kid`, applies the scope check, and returns a `code` beside `reason`:

| `code` | Meaning |
|---|---|
| `unknown_kid` | No key under that `kid`, after one fresh fetch |
| `bad_signature` | The key exists and the signature does not verify |
| `keys_unavailable` | The issuer's keys could not be read |
| `key_out_of_scope` | The key is held by an operator and its scope does not list the envelope's `type` or `kind` |