67. pepsi-stage-secure-link¶
Hold a message that could not be encrypted, and mail out the link.
67.1. Role¶
pepsi-stage-secure-link is the far end of [stage-encrypt] ON_NO_KEY =
secure-link. When encryption is required and the recipient publishes no usable
key, pepsi-stage-encrypt routes the message here rather than sending it in
the clear or bouncing it; the same route serves ON_OVERSIZE = secure-link
and a recipient whose key lookup keeps failing in the DNS while the domain’s
mail servers answer (A key lookup that fails in the DNS).
The stage takes the message off the wire entirely. It seals the message under
a freshly generated PIN, stores only the ciphertext in pepsi.secure_message,
injects a notification mail that carries the link, and then deletes the queue
row. By default it also injects a second mail that carries the PIN to the
sender, who passes it on out of band. Advancing the row would send the
cleartext to a recipient who must not receive cleartext. Instead, the
notification carries the message on: it takes the ordinary outbound path from
[pepsi-secure-link] NOTIFY_STAGE. Reference:
pepsi-stage-secure-link(1).
A message with several keyless recipients produces one stored message per recipient, each with its own token, PIN and ciphertext.
67.2. Configuration¶
The [stage-<name>] section carries only PROGRAM; everything else is in the
global [pepsi-secure-link] section, which is deliberately out of reach of the
per-address override layer. See The secure-link fallback portal for the whole feature, and
pepsi.conf(5) for the options.
67.3. Failure¶
Everything that can fail happens before the queue row is deleted, and nothing
that fails ever sends the message on — a message that reached this stage is one
the operator said must not go out unprotected. If the [pepsi-secure-link]
section lacks BASE_URL, PEPPER or NOTIFY_STAGE, the worker refuses to
start. A fault of this host (a template, the PIN command, the database) is
retried until the stage’s MAX_LIFETIME; then the message is bounced through
the stage’s BOUNCE_STAGE, or failed if there is none. A null-sender message
is failed at once, since there is nobody to give the PIN to. Each recipient’s stored copy and its
notifications are committed together, and the link token is derived from the
queue row, so a retried pass never stores or announces a recipient twice.
67.4. Security¶
The PIN is never stored and the pepsi role this stage runs as cannot read a
stored ciphertext back. The threat model states these claims under the
stored-message asset and the database thief (Assets,
Somebody holding a copy of the database); “The secure-link portal” in Security model describes the
mechanisms. Both notifications carry a recipient-bound Pepsi-Origin stamp,
so a notification that comes back in to a gated mailbox on this deployment is not held for payment.