Repository navigation
v0.4.0
[0.4.0] - 2026-11-09
This release fixes twelve security advisories and bounds what a node takes in
before it checks a signature. It has breaking changes: read Breaking
changes before upgrading.
Security
-
eddsa-rdfc-2022proofs cover every value of a document
(GHSA-f2pv-v7jx-372m;
affects 0.2.0 to 0.3.0).
JSON-LD processing drops some values without an error, so a document could
carry values its proof did not cover.canon/urdna2015now counts a
document's values in the document, in its expanded form and in the dataset,
and refuses a document whose counts disagree. So that each value stays one
value at every stage, the RDFC path also refuses forms JSON-LD drops or
merges, among them blank node labels,@setand the framing keywords,
@languageoutside a value object, a language tag outside ASCII, the RDF
collection vocabulary written out, the same RDF term twice on one node's
property, a node object that adds no statement, a value object or an empty
object or array where JSON-LD keeps none, an array inside an array, a
member named""outside a context, and a context that sets@baseor
defines a map container. Where
a program reads documents' own contexts (WithLocalContexts, under
Breaking changes), more context forms are refused, aliases of@context
and@jsonamong them.canon/urdna2015's package doc lists what is
refused, and by which stage. What is signed is the document's meaning:
spellings JSON-LD gives one RDF term are signed as that term, and a
property's values outside a list as a set. A document 0.3.0 accepted that
meets these keeps its canonical bytes; one that writes a value twice is now
refused, such as a self-issued credential whose issuer and subject, one id,
both carry the samename.
eddsa-jcs-2022is not affected. -
The
cedarPDP backend authenticates the caller
(GHSA-f7pq-gwf9-m29h;
affects 0.1.0 to 0.3.0).
0.3.0 gave the Cedar agent the raw bearer token as the principal, without
verifying it. The node now verifies the bearer as a JWT (a signature by the
configured key set or HS256 secret,expandnbfwith 30 s of leeway,
iss, anaudcontaining the configured audience, a non-emptysub), in
its one compact-JWS spelling, with its claims read under
canon.StrictDecoder's rules, and gives the agent itssub. The
configuration it needs is under Breaking changes. -
A credential reaches only the parties its operator names
(GHSA-7gqg-xf9h-699j;
affects 0.1.0 to 0.3.0).
The batch resolver presented the node's L1 bearer (vc-store-bearer) to
every peer it fetched from, including endpoints others choose; it now
presents it only to the origins of the configured destinations and of the
newpipeline.credential-origins.provin bundle exportshowed--token
to every endpoint the exported chain's issuers advertise; it now shows it
only to--registry's origin and to the new--credential-originorigins.
No call of the node, the pipeline or the CLI that carries a credential
follows a redirect. What to configure is under Breaking changes. -
A request that stops arriving no longer holds the node's HTTP server
(GHSA-94vw-4854-vgp3;
affects 0.1.0 to 0.3.0).
Before any handler decides on a request, the server of both node binaries
(internal/httpserve):- takes at most 64 KiB of headers (net/http's default is 1 MiB);
- drops a request whose body delivers nothing for 30 seconds (or, chunked on
HTTP/1, fewer than 16 KiB), or is not read to its end within 60 seconds of
the request's start.RetainPayload, the one client-streaming RPC, lifts
the 60-second bound once its caller has proven its DID in the first frame,
and keeps the stall bound; - on HTTP/1, holds what net/http reads of a body itself, to discard what a
handler leaves of it, to the same 30 seconds, and after a failed read
reads the body no further and closes the connection after the answer; - applies the outer request-size bound to HTTP/2 streams on the cleartext
(h2c) listener too; - returns the error of a failed read or close of a body within 512 bytes of
UTF-8, wrapping the original (net/http quotes what it read in some).
The bound is on progress, not rate: a body sent at a steady pace and a
response streamed after the body are not cut. The deployment guide gives the
limits. -
A deeply nested document no longer crashes the process
(GHSA-rrqg-h838-mfjv;
affects 0.1.0 to 0.3.0).
canon.StrictDecoderrefuses a document nested deeper than 10,000 arrays
and objects before walking it. Built with Go 1.26 or earlier, about a
megabyte of[overflowed the goroutine stack, a fatal error, before any
signature was checked.encoding/jsonrefuses the same depth, so no
document that decoded is refused now. The refusal is a plain error naming
the limit, not a*json.SyntaxError. -
Checks made before a signature is checked take time linear in their
input
(GHSA-r57m-fpfp-vpr7;
affects 0.1.0 to 0.3.0).canon.AdmitSafeNumbersreads each number in time linear in its length,
withoutmath/big(a 9-byte literal such as1e-999999cost about
10 ms). Every RFC 8259 number keeps its verdict, but for the range under
Breaking changes; ajson.Numberthat is not an RFC 8259 number, which
only a caller building one can pass, is refused.canon.StrictDecoderwalks a document in time linear in its length (it
copied a value's path for each of its siblings: 823 KB nested 8,704 deep
took 8.5 s).multibase.DecodeBase58Btcrefuses a value of more than 8,192 characters
after its prefix before decoding it (decoding costs the square of the
length: 700 KB took 7.8 s). 8,192 characters hold every byte string of up
to 5,998 bytes: every Ed25519, ECDSA and BLS key and signature, and
ML-DSA's, but not SLH-DSA's.canon/urdna2015canonicalizes within a work bound in each stage:
building the dataset, writing the canonical form, and labelling its blank
nodes, as RDFC-1.0 §4.4.3 requires (json-gold's labelling had no bound: 7
blank nodes no quad tells apart took 240 ms, each one more about 9 times
as long). A document past a bound is refused with the new
urdna2015.ErrTooComplex, whicherrors.Isfinds throughvc's create
and verify functions. One property of one node holds at most about 1,460
distinct values. Ordinary credentials use at most 2% of the dataset's
bound, 3% of the canonical form's and less than half of the labelling's,
and every dataset within them keeps its canonical bytes. The package doc
states the bounds.
-
Schema admission and payload validation are bounded
(GHSA-893p-p56r-f82x;
affects 0.1.0 to 0.3.0).
The JSON Schema library read every number as an exact rational (a megabyte
of large exponents could cost minutes, and a number it could not read made
validation panic or a schema bound disappear), compiled some shapes in time
far above linear, and ran any regular expression Go compiles. Now:- a number longer than 256 bytes, or whose exponent part lies beyond ±400,
is refused before the library reads it; - a schema is refused past bounds on its depth, its objects and its pointers
and URLs, or when its check against its metaschema needs more than a work
budget. It compiles in time about linear in its size; one of 1 MiB keeps
at most about 170 MB once compiled; - a payload is validated within a work budget of 2^20 steps and 16 per byte
of the payload, nested at most 512 deep; - a regular expression is accepted only in the forms ECMA-262 and Go's
regexp read alike (Unicode classes by general category only, groups
nested at most 32 deep), within 8,192 instructions, and a schema's
regular expressions together within 2^14 plus one per 4 bytes of the
schema; matching one is charged to the budget; - an error states its first failure, within 1 KiB.
schemaandschema/localdo not bound a schema's or a payload's size:
their callers do, as the network's schema registration does at 1 MiB.
schema/README.mdgives the bounds and what a schema and a validation cost
at worst. What is newly refused is under Breaking changes. - a number longer than 256 bytes, or whose exponent part lies beyond ±400,
-
A document no longer ends the program that canonicalizes it for
eddsa-rdfc-2022
(GHSA-5g26-3jj5-v85f;
affects 0.2.0 to 0.3.0).
json-gold, whichcanon/urdna2015uses for JSON-LD expansion and the
dataset, panics on some documents, before a proof's signature is checked.
canon/urdna2015, and with itvc, return such a panic as an error, its
text within 128 bytes; json-gold keeps no state between calls.
eddsa-rdfc-2022is also off until a program turns it on, and reads only
the contextsvcembeds (Breaking changes). -
RDFC's canonical N-Quads are one-to-one
(GHSA-445x-fhpg-78wj;
affects 0.2.0 to 0.3.0).
canon/urdna2015refuses a document whose dataset holds an IRI that is not
valid UTF-8 or holds a character N-Quads' IRIREF excludes unescaped (a
space,<,>,",{,},|,^,`or\); a literal that is
not valid UTF-8 or holds a character RDFC-1.0 (Appendix A) writes escaped
and URDNA2015 writes as it is (BS, FF, U+0000–U+0007, VT, U+000E–U+001F,
DEL, U+FFFE, U+FFFF); or anrdf:langStringliteral without a language
tag. Two documents of different meaning could have the same canonical
bytes. The bytes signed are now RDFC-1.0's canonical form, and no byte the
frozen v0 wire signs changes.eddsa-jcs-2022is not affected. -
A JSON number is canonicalized as its value
(GHSA-w66m-v92r-p775;
affects 0.2.0 to 0.3.0).
Built with Go 1.26 or earlier,canon/jcsand the jsonata filter and
converter read some long number literals as another value. Every reader of
ajson.Numberas a double in this module now reads it through the new
canon.Float64: the double nearest its value, whatever its spelling, from
RFC 8259 numbers only. -
Rejection records and audit notations do not grow with what others
sent
(GHSA-6whw-pc5x-jv9v;
affects 0.1.0 to 0.3.0).
A sink's reject record (Detail,IssuerDID), a delivery decision's
Reason, the erroredResult.Errorof a sink, a chained step and an ingest
step, apipush's 400 answer, and each audit notation the auditor records or
serves (GetAuditStatus,ListAuditStatuses) are within 1,024 bytes of
UTF-8: whole when they fit, or else their head and their length,
… (N bytes). A value they name is quoted within 128 bytes. A record
stored before is not rewritten; it is served bounded. A reject record never
carries the refused payload; itsDetailmay quote an excerpt of it within
that bound. -
Small-order Ed25519 keys are refused
(GHSA-h2g5-9vcc-8j6f;
affects 0.1.0 to 0.3.0).
The newcrypto/ed25519.ValidatePublicKey(errorsErrPublicKeySize,
ErrSmallOrder,ErrInvalidPointof the new typeed25519.Error)
refuses a key that is not 32 bytes, is of small order in any encoding, or
is not the canonical encoding of a point.crypto/ed25519.Verifier.Verify
applies it, and returnsErrSmallOrderfor a signature whose R is of small
order (crypto.Verifierdocuments that a verifier may return an error).
did.ExtractPublicKeyanddid.ExtractPublicKeyAndEncodingrefuse such a
key in either encoding, wrapping the newdid.ErrInvalidPublicKey, so every
reader of keys from DID documents here refuses it, and so do
did.EncodeEd25519Multikeyanddid.NewMultikeyVerificationMethod. The
DID registry refuses one inIssuePipelineandIssueProcess(replacing
the all-zero check) and in an owner document'sauthenticationor
assertionMethodmethods (ErrInvalidArgument). -
A pipeline loop bounds what it takes in over the transport, whatever the
messaging backend delivers: an envelope's credential by
pipeline.max-credential-size, its inline payload by the new
pipeline.max-inline-payload-size(1 MiB), the whole message by the two
and the envelope's framing before it is decoded, and a source loop's raw
input bypipeline.max-push-body-size, as the push route bounds it. With
the three keys and NATS'smax_payloadat their defaults (1 MiB each)
nothing changes. A node that loweredmax-credential-sizeor
max-push-body-sizebelow 1 MiB now refuses transport messages past them
too. A refused message is dropped and logged (an archival sink records a
decode failure), its error naming two sizes only. -
The node's clients for other organizations' servers bound what they take:
chainmanager/peerclientreads at most 256 KiB a response and ends every
call within 30 seconds;payloadresolver/clientrefuses a streamed frame
larger than itsMaxByteswithout holding it; the batch resolver's fetch
and a sink's fetch from its upstream registry end within 30 seconds;
provin bundle export --aggregate-completereads at most 1 MiB a response
within 30 seconds; and the SSRF-guarded HTTP client takes at most 64 KiB of
response headers. None of them accepts compression. -
Error texts do not grow with the input:
canon.UnsafeNumberErrorandcanon.DuplicateKeyErrorwrite each
literal, key and path within 128 bytes (their fields still hold the
values verbatim), andcanon.StrictDecoderreturns every error within
1,024 bytes;canon/urdna2015's refusals quote a key or value within 64 bytes, and a
path and json-gold's error within 256, and name the byte where a literal
or an IRI stops being UTF-8;- every service of the network node answers an error within 1,024 bytes of
UTF-8, keeping its code and details; the log lines of the batch resolver,
the auditor, the resolver's pool and the audit stores name an error
within 1,024 bytes, and the batch resolver's a DID or an endpoint within
128; - every log line of the pipeline names an error within 1,024 bytes.
A text is cut as its head and its length,
… (N bytes), where a character
starts, and a cut error wraps the original, soerrors.Isanderrors.As
find it. An error whoseErrormethod panics, as a nil pointer's may, no
longer makescanon.StrictDecoder, a network answer, a pipeline step or a
log call panic: its text is whatfmtwrites for it, or a fixed text naming
its type. -
Walks of a value built in Go refuse one nested past 10,000 objects and
arrays before their recursion could exhaust the goroutine stack:
canon.AdmitSafeNumbers,canon/jcs,canon/urdna2015(wrapping
urdna2015.ErrTooComplex),wireauth.SignandVerify,appraisal's
ManifestandSpineEntry, anddid'sHash(did.NewandBodycopy
apublicKeyJwkwithout recursing). A value decoded by encoding/json or
canon.StrictDecoderis never deeper. -
A Data Integrity proof verifies in one wire form.
vc.VerifyProofUnderContractverifies a proof only under the contract of
the suite it names, and pins the proof's@contextunder every contract,
asvc.VerifyProofWithContractdid: under the W3C contracts it mirrors the
document's, under the legacy one there is none.vc.VerifyProofrequires
the mirror whenever the document has a@context. A proof whose@context
was swapped, removed or added after signing verified on these paths;
nothing the issuer signed could change. The proofs now refused are under
Breaking changes. -
Each value has one spelling:
canon.StrictDecoderrefuses two keys of one object that differ only in
case, and a key that matches a struct field only by case (encoding/json
read both into one field);- a Data Integrity proof, a delegation credential and a bundle manifest
decoded with encoding/json go through the strict checks their verifiers
run; - an
appraisal.Manifest's identity covers every member it was read from; - a JWK verification method's
xmust be the canonical unpadded base64url
spelling of the key; - a tlog checkpoint signs a lower-case head and a UTC timestamp to the
second, so two checkpoints within a second cannot share a signature and
one root gets one verdict; pagination.DecodeTokenaccepts a page token only asEncodeToken
writes it.
-
Keys in DID documents are read one way.
did.ExtractPublicKey, and every
reader of keys here, reads a key reference and every method id only as
#fragmentor<the document's DID>#fragment, a fragment of
[A-Za-z0-9._-](the newdid.AbsoluteKeyID); anything else, and a
document holding it, is the newdid.ErrInvalidKeyReference. A method
carries only its type's key member.RegisterOwnerchecks an owner
document's keys before its proof, and stores it only when every key in it
is onedid.ExtractPublicKeyextracts throughauthenticationor
assertionMethod(ErrInvalidArgumentotherwise); a member that carries
keys must be a list. Refusals that wereErrUnauthorized(permission
denied on the wire), such as a duplicated#signing, one controlled by
another DID, or an unusable key of the proof, are nowErrInvalidArgument.
Documents stored before are not checked again. -
What
canon.AdmitSafeNumbersadmits, RFC 8785 writes within ±(2^53−1), so
a check of a credential's canonical bytes agrees with the check of its
value (a credential could be stored on one node and refused on the next,
andresolver/cachecould answer a hit with another spelling of a number).
It also spells the path to a refused number once: refusing one 10,000
levels deep allocated 160 MB. The range is under Breaking changes. -
The YAML stores hold only records that read back as written, so a stored
value, also one another organization sent, cannot change when it is read
or make reading the store fail. A byte field is written as base64: reading
a 1 MiB schema body allocated about 1.4 GB, and now 17 times less. A record
0.3.0 wrote reads as it did. Times are stored in UTC. -
(*local.Validator).Addchecks a schema against its metaschema whatever id
it is added under; one added under an id belowjson-schema.orgskipped
the check. -
tlog/filelogandtlog/merklelogopen their file in time and memory
linear in its size (a 10 MB log took about 10 s, now 0.2 s), and
canon/urdna2015builds the path to a refused value only for its error (a
document nested 8,000 deep allocated 546 MB, now 53 MB).
Breaking changes
-
eddsa-rdfc-2022is off by default and reads only the contextsvc
embeds (Go API, wire).vc's init registerseddsa-jcs-2022alone. Until a process calls the
newvc.RegisterEdDSARDFC2022,vc.CreateProof, thevc.Builderand
every verify function refuse the suite with an error wrapping the new
vc.ErrCryptosuiteNotRegistered, and avc.Verifierfinds signer
authenticity failed.vc.CreateProof, thevc.Builderand
vc.VerifyProofwrap it for any suite nothing registers too, where their
error wrapped nothing.vc.RegisterCryptosuiterefuses the suite's
name, andmake lintkeeps this module's packages from calling the
function. This amends the v0.2.0 credential wire freeze, for security.- With the suite on,
vcaccepts as@contextonly the IRIs of the three
contexts it embeds (the W3C VC v2 context, dplaax's and provin's), and
refuses a document or a proof holding a context written in it, at any
depth,nullor another IRI, before canonicalizing it. 0.3.0 accepted a
context written in the document. - provin's binaries do not call the function, so they refuse an
eddsa-rdfc-2022credential they verified before; this release has no
setting that turns the suite on in them. canon/urdna2015'sCanonicalizerefuses by default a document holding
a@contextother than the IRIs of contexts itsCanonicalizerserves.
A program that canonicalizes documents with their own contexts passes the
newurdna2015.WithLocalContexts()toNewCanonicalizer, only for
documents it trusts, and bounds their size: with its own context a
document can make the work grow as the square of its size. Observed on
darwin/arm64 with the option, not bounds: about 2.7 GB allocated for
250 KB and about 37 GB for 1 MiB (a longurn:@vocab), and about 18 s
for 250 KB and more than 150 s for 1 MiB (a long default language).
NewCanonicalizertakes options (...urdna2015.Option): every call
compiles as before, but it no longer assigns to a variable of type
func(map[string][]byte) *urdna2015.Canonicalizer.
Migration: a process that issues or verifies
eddsa-rdfc-2022calls
vc.RegisterEdDSARDFC2022once, from itsmainor aninitof its main
package, its documents use only the embedded contexts, and it bounds the
size of what it verifies:vcdoes not, and within its bounds the
costliest 1 MiB shape measured takes about 1 s and 0.9 GB (the function's
doc).
eddsa-jcs-2022, the issuance default, is unchanged. -
vcrefuses proofs it cannot verify earlier (Go API).vc.VerifyProofrefuses a proof without a proof-local@contextover a
document with one. Aneddsa-rdfc-2022proof without one, the shape
vc-di-eddsa §3.2.1 produces, is refused by every verify function.vc.Verifierrefuses a proof under a cryptosuite no claim contract
names, or whoseproofValuedoes not decode, before looking up the
suite's lifecycle or the issuer's key: it fails such a proof where a
transient issuer-key error made it indeterminate, whatever a lifecycle
registry says.delegation.Verifyreturns the decode error without
resolving the issuer.vc.VerifyProofUnderContractrefuses a proof whose suite is not the
contract's, a proof@contextthat does not mirror the document's under
a W3C contract or is present under the legacy one, and, under a W3C
contract, a document without@context.
Migration: verify a legacy
eddsa-jcs-2022proof, which has no
@context, withvc.VerifyProofWithContractor
vc.VerifyProofUnderContract. -
canonreads more strictly (Go API, wire).canon.AdmitSafeNumbersrefuses a number of magnitude 2^53 − 0.5 or
more, integer or not (9007199254740991.5was admitted), with one new
UnsafeNumberError.Reasontext for every number refused for its
magnitude.canon/testdata/number-literals.jsongives the verdicts.
vc.CreateProof, the DID registry, the VC resolver'sStoreVCand
resolver/cacherefuse the same numbers.canon.StrictDecoderrefuses, as a*canon.DuplicateKeyErrornaming
both, two keys of one object that differ only in case as encoding/json
folds names, and a key that matches a struct field only that way. So do
the paths that decode others' JSON with it: the push ingress (HTTP 400),
the ingest loop, the jsonata filter and converter, the DID registry, the
VC resolver, and JSON Schema documents and payloads.bundle.Verify
reports colliding keys asErrBundleIntegrity.canon.StrictDecoderrefuses a decode target it reaches through more
than 64 pointers and interfaces, as one that holds itself, which
encoding/json follows without end.vc.DataIntegrityProofanddelegation.DelegationCredentialare read
undercanon.StrictDecoder's rules on every path, encoding/json
included; a number inside a proof's@contextis ajson.Number.
Migration: code that matched the old
Reasontext, or builds
canon.DuplicateKeyErroras an unkeyed literal (it gainedOther),
changes; a struct embeddingdelegation.DelegationCredentialneeds its own
UnmarshalJSON. -
Schemas and payloads past the new bounds are refused (Go API, wire).
schema.ValidateJSONSchema,(*local.Validator).AddandValidaterefuse
a schema or payload holding a number longer than 256 bytes or whose
exponent part lies beyond ±400; a regular expression not in the forms
ECMA-262 and Go read alike (among the forms Go compiled: inline flags such
as(?i),\pL,\z,\Q…\E, POSIX classes, and a-Go reads as a
literal after a class escape, as in[\w-.]); a schema past its shape
bounds or its metaschema budget, or referring by a JSON pointer whose array
index is not written as RFC 6901 writes one; and a payload nested deeper
than 512 levels, past its work budget, or applying schemas within one
another more than 10,000 deep.schema/README.mdstates the bounds. The
schema registry'sRegisterSchemarefuses such a schema with
InvalidArgument, and admits a schema name or prerelease only of 1 to 128
characters of[A-Za-z0-9._-], the first a letter or digit (0.3.0 refused
only an empty name,.,.., and one with/,\or NUL). A schema
stored before is not checked again, but(*local.Validator).Addrefuses
it when a validator loads it.Migration: write such patterns in the shared forms. SchemaStore's schemas
are within the shape bounds and need at most 11.5% of the metaschema
budget. -
Manifests are read and written in one shape (Go API, wire).
- Decoding a
bundle.Manifestwith encoding/json reads it as
bundle.Verifydoes, afresh and in the exact shape of its version;
encoding writes that shape (a v2 manifest always hasreceipts), and is
an error for a v1 manifest with receipts or a version no shape names. - An evaluation view manifest (
appraisal.Manifest) is read member by
member, exactly as named: a known field in another case, andnullfor
the manifest, a spine entry or a field, are refused, and every other
member is kept as an extension in its identity. So a manifest whose spine
entries carry other members has a differentEvidenceViewIDthan in
0.3.0, and one stored for it no longer passesValidateID. appraisal.SpineEntryholds a map (Extensions), so it is no longer
comparable, and an unkeyed literal with its two values no longer
compiles. A decoded entry'sExtensionsis an empty map, not nil. A
number in an extension thatcanon.AdmitSafeNumbersrefuses gets no
identity.
Migration: a struct embedding
bundle.Manifestneeds its own
UnmarshalJSON; anEvidenceViewIDstored for such a manifest is computed
again. - Decoding a
-
A tlog checkpoint has one spelling of what it signs (Go API).
(*tlog.Checkpoint).SignedView,tlog.SignCheckpointand every checkpoint
verification refuse a head with an upper-case letter and a timestamp not
in UTC, with a fraction of a second, or outside 0000–9999;
tlog.VerifyConsistencyandtlog.VerifyInclusionrefuse a head not in
lower case. The logs here write nothing refused. Migration: sign with a UTC
time in whole seconds. -
Pipeline parts and the runtime take explicit bounds and a decision
recorder (Go API).envelopecodec.Newtakesenvelopecodec.Limits(MaxCredentialSize,
MaxInlinePayloadSize) and returns an error (ErrInvalidLimits); a codec
without bounds can no longer be made, and the zeroCodecrefuses every
message.UnmarshalEnveloperefuses what passes them
(ErrMessageTooLarge,ErrCredentialTooLarge,
ErrInlinePayloadTooLarge).ingest.Newrequiresingest.Config.MaxPayloadSize
(ErrInvalidMaxPayloadSize);Processrefuses a longer input.runtime.ConfiggainsMaxCredentialSizeandMaxInlinePayloadSize,
whichruntime.Buildrequires, before it dials, when a loop is
configured, andMaxIngestPayloadSize, which it requires when a source
loop is: it bounds the loop's raw input and, through the new
PushBinding.MaxBodySize, its push route.sink.Newwith anAppraiserand noDecisionRecorderfails with
sink.ErrMissingDecisionRecorder, andruntime.Buildwith a sink loop
that hasagent-accessfails unlessruntime.Config.DecisionRecordis
set.
Migration: a program that calls
runtime.Buildsets the new fields;
cmd/pipelinesets them from its configuration. -
Authorization configuration and answers (config, wire).
backend = "cedar"needsprovin.network.auth.cedar.jwt.{issuer,audience}
and exactly one ofjwks-url(https) orsecret(with an optional
secret-encoding:utf8,hexorbase64), or the node does not boot.
Withjwks-urlthe key set is cached 10 minutes, refetched at most every
30 seconds, and kept for known key ids for 30 minutes during a JWKS
outage, so a withdrawn key can be trusted for up to 40 minutes.- A PDP at a non-loopback
http://URL is refused unless itshost:port
is listed in the newprovin.network.auth.plain-internal. - A PDP outage (HTTP 429, 502, 503, 504, or a timeout) fails an L1-guarded
RPC withUnavailableinstead ofInternal, and the pipeline's push
endpoint answers 503 withRetry-Afterinstead of 403, so the
pipeline's wire retry retries through it. HTTP 500 and a
malformed answer stayInternaland 403; withcedar, a failed token
check staysUnauthenticated. - With the
o3cobackend an allow requires HTTP 200 with a complete
decision envelope; an empty 200 or a 204 no longer allows, and the PDP
must not redirect.
Migration: a cedar deployment adds the JWT settings, and a plaintext PDP on
a private network is listed inplain-internal. -
Credentials are presented only to named origins (config, CLI). The
batch resolver fetches from a peer outside its configured destinations and
pipeline.credential-originswithoutvc-store-bearer, and
provin bundle exportcalls an endpoint outside--registry's origin and
its--credential-originorigins without--token. Neither follows a
redirect with a credential. Migration: list other L1-protected peers in
credential-origins(with the CLI,--credential-origin) before
upgrading, and configure each destination at its final URL. The quickstart
needs no change. -
Input newly refused by the security fixes (Go API, wire). Besides the
entries above, the Security section lists input this release refuses that
0.3.0 accepted: RDFC documents in the forms listed there, a base58btc value
of more than 8,192 characters, a small-order Ed25519 key, a DID key
reference or owner document read in more than one way (the DID registry
answersInvalidArgumentwhere it answered permission denied), a JWKx
or a page token in another spelling, and a schema added below
json-schema.orgthat its metaschema refuses. -
The module needs Go 1.26 (build).
go.modsetsgo 1.26.0, which
protobuf.interceptorsv0.6.0 requires, andtoolchain go1.26.10; the
images build ongolang:1.26.10-alpine. Go 1.25 no longer receives
security fixes.
Added
-
keybinding: the key binding, aKeyBindingCredentialin which an issuer
binds a key (keyIdand a public JWK: Ed25519, P-256 or RSA) to a subject,
of a kind, with roles, of a key class, for one relying party, from
validFromuntilvalidUntil, with an entry in the issuer's revocation
list, and that list (a W3CBitstringStatusListCredential).Issueand
IssueStatusListsign witheddsa-jcs-2022.Verifier.VerifyBinding
checks a binding against the trustAnchorand the held list;
Verifier.VerifyStatusListrefuses a list older than the one held, one
that clears a mark (a revocation is not reversible), one not yet valid, and
one whose id is not a DID URL of its issuer;Verifier.RestoreStatusList
rebuilds the held list after a restart. Each refusal is a constant
keybinding.Error. The package doc states the rules. -
decisionrecord: the record a deciding party writes for each decision
(Record: id, deciding party, time, outcomeAccepted,Refusedor
Unenforced, the refusing check and reason, the parties, and what was
decided on as content addresses, never a payload), andFilter, which
writes it at a level chosen explicitly:all,refusals,summary
(counts per window, throughSummaryRecorder) ornone. Atalla record
the sink does not accept is an error, so the decision is refused; at the
other levels it is a warning. Sinks: JSON lines (NewJSONLines) and
structured log (NewLog). The purpose-first sink writes its delivery
decisions through it (Changed). -
contentaddress: the content address of dPLaaX (sha256:and 64
lowercase hex digits) as a type,Address, made only byOfandParse,
comparable, written and read as JSON text in its one spelling. -
vc.IssuerVerifier,vc.WithIssuerVerifier,vc.NewDIDDocumentIssuers,
vc.IssuerKeyandvc.ErrIssuerNotFound(of the new typevc.Error): how
avc.Verifierestablishes an issuer, the key its proof verifies under and
the Owner responsible, can be replaced, so a deployment that registers its
stages elsewhere needs no DID document per stage. The default reads both
from DID documents. An error wrappingErrIssuerNotFoundreads as failed,
any other as indeterminate;AttributeOwnerandClassifyChainwrap it for
an Owner established not to exist. -
vc.ValidateChainLinks(chain)andvc.ValidateChainFrom(chain, originInput): the links of a chain without its signatures, through the
same implementation asVerifyChain; a broken link is a
*vc.ChainLinkErrorwith the credential's index. -
vc.Credentialand(*vc.Verifier).VerifySignerAuthenticity: the
signer-authenticity axis alone, for a Data Integrity credential of any
type, asvc.SignerAuthenticityResult. -
(*vc.DataIntegrityProof).ProofValueBytes: the bytes a proof's
proofValueencodes, decoded by its cryptosuite's encoding and bounded as
multibase.DecodeBase58Btcbounds it. It verifies nothing. -
crypto/es256andcrypto/rs256:crypto.Verifierimplementations for
ES256 (ECDSA P-256, SHA-256; SEC1 uncompressed key,r || ssignature)
and RS256 (RSASSA-PKCS1-v1_5, SHA-256; PKCS #1 key, 2048 to 4096 bits).
ES256 signature bytes are not unique, so nothing may count or deduplicate
signatures by them. -
canon.Float64(n json.Number) (float64, error): the IEEE 754 double
nearest a JSON number's value (ties to even), from the RFC 8259 grammar
only, in time linear in its length. Its errors wrapcanon.ErrNotJSONNumber
orcanon.ErrBeyondDoubleRange, of the new typecanon.Error. -
canon.DuplicateKeyError.Other: for a key refused because it differs from
another key or a struct field only in case, that other name. -
(*delegation.DelegationCredential).UnmarshalJSON,
(*bundle.Manifest).UnmarshalJSONandbundle.Manifest.MarshalJSON, and
appraisal.SpineEntry.Extensionswith its ownMarshalJSONand
UnmarshalJSON: these are read and written in one shape (Breaking changes). -
Types and errors the entries above name:
urdna2015.Error,did.Error,
ed25519.Error(withErrSignatureSize),sink.RejectDecisionRecord, and
DecisionRecordinpipelineconfig.Configandruntime.Config. -
Configuration keys:
provin.network.auth.plain-internal(list ofhost:port, default empty):
the PDP endpoints that may be called over plaintexthttp://, reached
only at a private address. The quickstart sets it for
policy-verifier:3001.provin.network.pipeline.credential-origins(default[]): origins the
pipeline may showvc-store-bearerto besides its configured
destinations (pipelineconfig.Config.CredentialOrigins,
PresentsCredentialTo).provin.network.pipeline.max-inline-payload-size(default 1 MiB): the
most bytes of an inline payload in an envelope a loop receives
(pipelineconfig.Config.MaxInlinePayloadSize).provin.decision-record.level(all, the default,refusals,
summaryornone),.sink(log, the default, orjsonl),.path
(the JSON-lines file, required withjsonl) and.summary-window
(default1m).
A malformed value fails startup.
-
provin bundle export --credential-origin <origin>(repeatable): an origin
the--tokenmay be shown to, besides--registry's.
Changed
- Delivery decisions are recorded by default. Every delivery decision of
the purpose-first sink (a sink loop with anagent-accessblock) writes a
decisionrecord.Recordthrough the newsink.Config.DecisionRecorder: an
envelope that does not decode is refused (checkdecode); the appraisal's
decision is accepted onACCEPTand refused (checkappraisal) otherwise;
a decision accepted that a later stage refuses is recorded again under the
same id as refused, the check being that stage's reject reason. A writer's
error is never recorded as a refusal (the writer may have delivered).
Records hold content addresses, never payload bytes. At levelall, if the
accepted record cannot be written the delivery is refused (new reject
reasondecision-record), and the defaultlogoutput writes oneinfo
entry per record; turn it off withprovin.decision-record.level = "none".
Records after the accepted one are best effort. Existing configs keep
booting. The legacy verifier path is unchanged. vc.VerifyProofandvc.VerifyProofUnderContract, and through them
vc.VerifyProofWithContract, decodeproofValuebefore they canonicalize
anything: aproofValuethat does not decode is refused in about 1 µs,
where aneddsa-rdfc-2022proof over an ordinary credential took about
560 µs. A proof whoseproofValuedoes not decode, over a document that
does not canonicalize, is refused with the decode error.canon/jcsand the jsonata filter and converter read a JSON number as a
double throughcanon.Float64:jcsrefuses ajson.Numberthat is not
an RFC 8259 number (+1,.5,01), and the jsonata filter and converter
refuse a document holding a number beyond the double range; their errors
matchcanon.ErrNotJSONNumberorcanon.ErrBeyondDoubleRange.
scripts/check-number-hygiene.sh(inmake lint) flags any other reading
of a double.vcjudgescredential.claim.charsetwith tables generated from Unicode
15.0.0, the version the specification pins, instead of Go'sunicode
tables, so a toolchain of another Unicode version judges a claim the same.
go generate ./vcrebuilds them from pinned files.chainmanager'sSubscriberefuses a publisher's connection info with a
key other thansubject,account,urlandpublishType, or a value
other than empty or a letter or digit followed by up to 999 characters
that a URL, a NATS subject or account key, or a DID uses
(ErrRemotePeer): the remote registration is undone and nothing is
imported or stored.- The pipeline's interfaces, configs and constructors through which a part is
plugged in state, by pointing to one rule inpipeline/contract's doc,
that the methods of a part's errors thatfmtanderrors.Isand
errors.Ascall return without a panic, also for a nil pointer. A part
that already does so is unaffected. - The JSON Schema library is a copy inside this module,
internal/jsonschema:santhosh-tekuri/jsonschema/v6v6.0.3 (Apache-2.0,
its LICENSE copied unchanged) with a work budget and with a number
big.Ratcannot read reported as an error.go.modno longer requires
santhosh-tekuri/jsonschema/v6(0.3.0 required v6.0.2). The schema package
goes back to the upstream module when upstream bounds its own work
(internal/jsonschema/README.md). - Quickstart: the auth layer moves to provin.auth v0.3 (the
:v0.3images,
AUTH_REF=v0.3.0). Its policy-verifier accepts only RFC 9068 access
tokens, so every token the quickstart uses carriesissandaud, and the
ones it mints are typedat+jwt; the audience is
https://quickstart.provin.invalid(OAUTH_JWT_AUDIENCE). The shared HS256
secret is now long enough to carry 32 bytes of key material, and the issuer
ishttp://localhost:3000; an existing.envthat setsOAUTH_JWT_SECRET
orOAUTH_JWT_ISSUERmust meet the same rules. The service token
provisionmints for the nodes lives 24 hours (-service-ttl, was 30
days): the verifier refuses a token older than that from itsiat
whatever itsexpsays, so a longer lifetime was not honoured;docker compose up --force-recreatere-mints it and restarts the nodes, which
read it once at boot. - Dependencies, from 0.3.0:
connectrpc.com/connect1.20.0 → 1.21.1,
github.com/o3co/protobuf.interceptors(and itsconnectrpcmodule)
0.2.0 / 0.2.1 → 0.6.0 (it authorizes a stream before its handler runs and
re-checks it per message),nats-server2.12.6 → 2.15.1,nats.go
1.50.0 → 1.55.0,nats-io/jwt2.8.1 → 2.8.2,nkeys0.4.15 → 0.4.16,
piprate/json-gold0.8.0 → 0.9.1,o3co/go.hocon1.8.0 → 1.14.2,
prometheus/client_golang1.23.2 → 1.25.0, OpenTelemetry 1.44.0 → 1.47.0
(exporters/prometheus0.66.0 → 0.69.0),golang.org/x/net0.55.0 →
0.61.0,golang.org/x/sys0.45.0 → 0.49.0,golang.org/x/crypto0.52.0 →
0.58.0,golang.org/x/text0.39.0 → 0.43.0,golang.org/x/time0.15.0 →
0.16.0,google.golang.org/protobuf1.36.11 → 1.36.12, and
github.com/go-jose/go-jose/v44.1.6 (new, for the cedar JWT check). The
quickstart's broker image moves fromnats:2.12.6tonats:2.15.1.
govulncheckreported 18 standard-library vulnerabilities on the old
toolchain; ongo1.26.10it reports none that this module's code reaches.
Fixed
- The signer-authenticity axis fails a credential whose issuer is empty
before resolving anything; with a bare-fragmentverificationMethodit was
indeterminate during a resolver outage.Verify's overall verdict does not
change. - CLI:
owner init,pipeline create,process create,bundle exportand
bundle verifyreject unexpected positional arguments after flags as a
usage error; they were ignored.