Liking cljdoc? Tell your friends :D
Clojure only.

stroopwafel.pdp.spki.trust

Trust closure with delegation fixpoint for the SPKI/SDSI PDP.

A trust entry is a map: {:kid <kid URN> :for-types <:all or set of assertion-type keywords> :not-after <epoch-ms or nil for infinity> :origin <:primordial or :delegated>}

Multiple entries may exist for the same kid (one primordial, several delegated). trusted-for? iterates and returns true if ANY entry covers the requested type at the given time. This automatically implements the 'widen' semantics (pinned decision §11 #6): a primordial trust-root's effective scope is the union of its primordial grant and any delegations that also reach it.

Delegation semantics:

  • A sayer trusted for type T can issue :delegation assertions for type T to any kid (no separate :delegation grant needed).
  • The delegated entry's :for-types is the intersection of the delegator's scope and the delegation's stated type.
  • The delegated entry's :not-after is the MIN of the delegator's own :not-after and the delegation block's :not-after (attenuation — a delegate can never outlive the delegator).

Phase 3 scope: type-level delegation. Resource/action scoping (e.g., 'delegate :capability for resources under /api/service only') is deferred — delegation assertions carry only a delegate kid and a type keyword (or :all).

Trust closure with delegation fixpoint for the SPKI/SDSI PDP.

A trust entry is a map:
  {:kid <kid URN>
   :for-types <:all or set of assertion-type keywords>
   :not-after <epoch-ms or nil for infinity>
   :origin <:primordial or :delegated>}

Multiple entries may exist for the same kid (one primordial, several
delegated). trusted-for? iterates and returns true if ANY entry
covers the requested type at the given time. This automatically
implements the 'widen' semantics (pinned decision §11 #6): a
primordial trust-root's effective scope is the union of its
primordial grant and any delegations that also reach it.

Delegation semantics:
  - A sayer trusted for type T can issue :delegation assertions
    for type T to any kid (no separate :delegation grant needed).
  - The delegated entry's :for-types is the intersection of the
    delegator's scope and the delegation's stated type.
  - The delegated entry's :not-after is the MIN of the delegator's
    own :not-after and the delegation block's :not-after
    (attenuation — a delegate can never outlive the delegator).

Phase 3 scope: type-level delegation. Resource/action scoping (e.g.,
'delegate :capability for resources under /api/service only') is
deferred — delegation assertions carry only a delegate kid and a
type keyword (or :all).
raw docstring

resolveclj

(resolve primordial blocks now skew)

Compute the trust closure from primordial trust-roots and temporally-valid verified blocks.

Arguments: primordial — set/seq of kid URNs OR map {kid → {:for-types :not-after}} blocks — temporally-valid verified blocks from the pre-filter (each with :sayer :not-after :assertions [...]) now — current epoch-ms skew — clock skew tolerance in ms

Returns: vector of trust entries. Fixpoint converges in at most (count blocks) passes.

Compute the trust closure from primordial trust-roots and
temporally-valid verified blocks.

Arguments:
  primordial — set/seq of kid URNs OR map {kid → {:for-types :not-after}}
  blocks     — temporally-valid verified blocks from the pre-filter
               (each with :sayer :not-after :assertions [...])
  now        — current epoch-ms
  skew       — clock skew tolerance in ms

Returns: vector of trust entries. Fixpoint converges in at most
(count blocks) passes.
raw docstring

trusted-for?clj

(trusted-for? trust-entries sayer-kid type now skew)

Is sayer-kid trusted for assertions of type type at now (with clock-skew skew)? Returns truthy iff any entry in trust-entries matches the sayer and covers the type and is still temporally active.

Is `sayer-kid` trusted for assertions of type `type` at `now`
(with clock-skew `skew`)? Returns truthy iff any entry in
`trust-entries` matches the sayer and covers the type and is
still temporally active.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close