LogTapAdmission

sealed interface LogTapAdmission

How the tap admits a peer.

The default Open reproduces the shipped behaviour — no gate — which is safe on a loopback fabric where only local processes can reach the session. To expose the tap on a real network, use a short-lived join code: the offering side holds Verify (it challenges each joiner and checks their proof) and the pulling side holds Present (it answers the challenge with the code the device showed).

The live Clock/Random a Verify needs are carried here, deliberately outside LogTapConfig — that is a value data class, and embedding live dependencies in it would break its equality/hashing.

Inheritors

Types

Link copied to clipboard
data object Open : LogTapAdmission

No admission gate. The default; intended for loopback.

Link copied to clipboard
class Present(val code: String) : LogTapAdmission

Pulling side: answer the offering side's challenge with the shown code.

Link copied to clipboard
class Verify(val token: LogTapJoinToken, val clock: Clock, val random: Random) : LogTapAdmission

Offering side: challenge joiners and admit only those whose proof matches HMAC-SHA256(token.code, nonce) while token is valid.