Expand description
Human-centric identity & data-rights SHACL extensions.
Four structural enforcements the Webizen Sentinel needs, each grounded in the
project’s identity principles (identifiers-not-identity,
out-of-band-remainder-is-freedom, governance-topology-relational):
- Identity as an enumerated state — an identity is validated as a bounded
set of cryptographically-attested identifiers with a confidence relation,
never collapsed to one definitive identifier. A binding asserting certainty
(
confidence >= 1.0) is aDefinitiveCollapseand is rejected: the out-of-band remainder (the un-resolvable link to the natural person) is what keeps the person free, so it is a hard invariant here, not an afterthought. - Decentralized shape-target routing — shapes are bound to storage loci (personal data stores / peers); validation is dispatched to where the data lives (local-first) instead of pulling everything into a central index.
- Real-time severity degradation — off-grid, non-critical violations degrade
to non-blocking so a partial subgraph stays usable;
Criticalviolations (identity / consent / safety) never degrade — they fail closed. This mirrors the deontic non-derogable rule. - Verifiable-Credential-gated targets — a SHACL target applies to a focus node only when a verified W3C VC is presented about it (origin-authenticated data-rights property validation; the VC layer checks the signature/expiry first).
All four runtime predicates are zero-heap: bounded slices in, scalars / enums
/ caller out buffers out. The TTL/opcode emitters write constants or into a
caller slice.
Structs§
- Credential
Gate - A credential gate on a SHACL target: the shape applies to a focus node only when a verified VC about that node carries the required claim from an accepted issuer.
- Degradation
Outcome - The result of
degrade_violations. - Identifier
Binding - One identifier in an enumerated identity: a handle, the crypto scheme attesting
it, whether an attestation is actually present, and the confidence (strictly in
(0,1)) that this identifier picks out the natural person. - Shape
Route - A binding of a SHACL
shapeto a storagelocus(a personal data store / peer) where its target nodes live. Validation is dispatched to the locus; data is never aggregated centrally. - Shape
Violation - A SHACL shape violation against a focus node, with its severity.
Enums§
- Crypto
Scheme - The cryptographic scheme that attests an identifier binding.
- Identity
Validation - The verdict of
validate_enumerated_identity. - Operation
Mode - Whether the engine is online (strict) or off-grid (partial-utilization tolerant).
- Shacl
Severity - SHACL result severity, ordered so
Criticalis the maximum (never degrades).
Constants§
- MAX_
IDENTITY_ BINDINGS - Bounded number of identifier bindings an enumerated identity may carry.
- MAX_
SHAPE_ ROUTES - Bounded number of shape→locus routes the router holds.
Functions§
- credential_
gates_ target - Decide whether a credential-gated SHACL target applies to
focus_node, given an already cryptographically-verified credential (callcrate::verifiable_credential::verify/verify_groundedfirst — this gates on a verified VC, it does not re-check the signature). - degrade_
violations - Apply real-time severity degradation.
Onlineblocks on everyViolation/Critical(nothing degrades).OffGriddegrades non-Criticalviolations to non-blocking so a partial subgraph stays usable;Criticalnever degrades. - enumerated_
identity_ opcodes - Emit the SHACL opcodes for the enumerated-identity shape into
out(zero-heap); returns the count written. The richer semantic enforcement (collapse rejection, noisy-OR confidence) lives invalidate_enumerated_identity. - get_
identity_ shacl_ ttl - SHACL shapes for human-centric identity & data rights.
- loci_
for_ shape - Enumerate the distinct loci a
shapemust be routed to (fan-out without pulling the data together). Writes locus ids intoout; returns the count. Zero-heap. - route_
is_ local - Whether
shapeis validated locally atself_locus(local-first dispatch). - shapes_
for_ locus - Enumerate the distinct shapes that apply at
locus(what a local store validates). Writes shape ids intoout; returns the count. Zero-heap. - validate_
enumerated_ identity - Validate an identity as an enumerated state over crypto-attested identifiers.