You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Register only verified parties, bound to subject keys with key lineage - #13
Updates the lookup to the GOBL Net changes in invopop/gobl#1036: the lookup registers only verified parties, binds registrations to the subject's key, and keeps each address's key lineage (spec §7.3). It is the public index of verified GOBL Net parties.
Verified parties only. A registration needs a countersignature from an accepted verifier with aud = subject and a cnf in the lineage. Without one the request is rejected with 403, or 503 when the verifier's key can't be fetched. The gobl.lookup verify command is removed; a subject registers again instead.
Registration is a normal delivery. The subject sends its party envelope from its address to the lookup, signed for the lookup, with no request token. The lookup drops that request signature, countersigns with cnf binding the subject's key and naming the verifier, and addresses the envelope back to the subject.
Key lineage.Registration.Lineage stores each key bound, by RFC 7638 thumbprint and kid, in order. A request is handled by which keys signed it within the last 5 minutes; older signatures don't count, so an earlier request can't be replayed (401 when none is fresh):
the current key: a renewal;
the current key, naming a new key with cnf, and that new key (goblnet.SignKeyChange): a key change, and the new key is bound without a new verification;
one key not in the lineage: a first registration, lost key or new domain owner, so a new lineage starts and needs a verification for that key;
anything else is rejected, including two keys at a first registration and an earlier key, alone or in a key change. An earlier key alone used to start a new lineage, which the original verification still covered.
No inherited verifications. A new holder of a lapsed domain can't inherit the old holder's verification. When an envelope carries verifications for both an old and a new key, the one in the lineage is used.
No forwarding. Verifiers no longer deliver results to the lookup on a subject's behalf: they return them to the subject, who registers with them. The old "unchanged digest keeps the verifier" renewal rule is replaced by the lineage check.
/parties listing. Every registered party has a public record with its address, verifier and registration dates. Its name and tax ID are added only when the registration request sets header meta lookup-listing: public (private removes them; new registrations start private). The full envelope is no longer served there.
/who. The lookup's response is addressed and signed for each requester.
Deliveries. Outgoing deliveries carry no request token, follow no redirects, and refuse every address that is not globally reachable, matching gobl/net.
gobl is pinned to the #1036 branch commit and should be bumped to a release once that PR is merged.
Existing records have no lineage, so those subjects must register once more, with a verification.
Testing
go test -race ./... and golangci-lint pass. web_test.go is rewritten for the new flow and covers:
each lineage case above, including a new key needing a new verification;
a replayed old signature plus a new key, a stale request, a key change the current key doesn't name, two keys at a first registration, and a retired key taking the address back, all rejected;
rejected registrations without a verification, and 503 when the verifier's key is unreachable;
ignored verifications: another key, no cnf, another address, forged;
renewals of the delivered envelope;
other rejected requests;
listing: public, kept on renewal, made private, other meta kept, unknown values rejected;
who signing.
identity_test.go checks the lookup refuses to countersign without a verifier.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Approval is blocked by unresolved moderate and critical findings that permit lineage rollback, mismatched party registration, and cross-request caching of caller-specific responses.
Updates registration and verification flows to align with the key-bound GOBL Net protocol, including subject key lineage, addressed signatures, requester-bound responses, and tokenless inbox deliveries.
Changes:
Reworks registration, renewal, rotation, and verification around subject-bound keys and lineage.
Makes /who responses requester-specific and removes request tokens from outbound deliveries.
Updates tests, documentation, setup wiring, and pinned dependencies.
File
Description
README.md
Documents the revised signed-registration, key-lineage, verification, and delivery flows.
internal/interfaces/web/who.go
Returns identity envelopes addressed and signed for the authenticated requester.
internal/interfaces/web/web.go
Removes bearer-token authentication from inbox deliveries.
internal/interfaces/web/web_test.go
Rewrites integration coverage for delivery authentication, lineage, verification, and requester-bound responses.
internal/interfaces/web/inbox.go
Routes signature-authenticated inbox deliveries to registration handling.
internal/domain/registrations.go
Implements signed delivery verification, lineage updates, verifier binding, countersigning, and renewal handling.
internal/domain/models/registration.go
Persists subject key lineage records and exposes the current bound key.
internal/domain/lineage.go
Adds key-lineage transition logic for registrations, renewals, rotations, and resets.
internal/domain/identity.go
Generates requester-bound identity envelopes and subject-key-bound authority signatures.
internal/domain/identity_test.go
Tests requester-bound identity responses and key-bound countersignatures.
internal/domain/delivery/delivery.go
Removes request tokens from outbound inbox deliveries.
internal/domain/delivery/delivery_test.go
Updates delivery tests for tokenless requests.
go.sum
Refreshes dependency checksums for the updated protocol dependencies.
go.mod
Updates the GOBL and Go JOSE dependency versions.
cmd/gobl.lookup/setup.go
Wires the tokenless delivery sender and updated GOBL client configuration.
CHANGELOG.md
Records the updated registration, verification, endpoint, and delivery behavior.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Two critical logic flaws remain: lineage validation can reappend an existing key and registrations can publish a party document whose declared address does not match the verified sender.
Registrations need a verifier countersignature binding the subject's key;
without one the request is rejected with 403, or 503 when the verifier key
is unavailable. The verify command is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
samlown
changed the title
Bind registrations to subject keys and keep key lineage
Register only verified parties, bound to subject keys with key lineage
Nov 15, 2026
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Approval is blocked by an unresolved critical lineage-validation flaw that can reintroduce an existing key and by contradictory Unreleased documentation that still describes the removed command.
Reject renewal keys already present in the lineage
internal/domain/lineage.go:48
This branch only checks that one of the two signatures is the current key, so it also accepts a current-plus-previous pair and appends the previous key as the new current key. For lineage [A, B], a request signed by [A, B] produces [A, B, A]; the old key can then renew alone and the Authority binds it again. Reject the second key whenever its JKT is already present in the lineage so only an unseen key can be appended.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Approval is blocked by a critical identity-validation flaw that can publish a verifier-signed party for the wrong sender, along with contradictory superseded Unreleased changelog entries.
/parties returns the address, verifier and registration dates of every
registered party, adding its name and tax ID when the registration
request sets header meta lookup-listing: public.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
CHANGELOG.md still contains obsolete Unreleased bullets that contradict the removed flow and could mislead operators about verification and bearer-token behavior, so those entries should be corrected or removed.
Entries shipped in v0.1.0, v0.2.0 and v0.4.0 move under those releases,
leaving only this branch's changes as unreleased.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human review is needed because the changes contain a critical network-safety gap and a moderate error-path inconsistency that could permit unsafe dialing and misclassify unavailable verifier keys.
Registration requests count only confirming signatures made within the
last 5 minutes, and a key change needs the current key's signature to
name the new key with cnf, so a replayed request cannot move a lineage
to another key. Deliveries follow no redirects and refuse every address
that is not globally reachable. Uses gobl from invopop/gobl#1036.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The registration freshness check accepts timestamps arbitrarily far in the future, allowing signed requests to be replayed beyond the intended five-minute window until an upper-bound check is added.
A first registration takes one key, and a key bound before can no longer
start a lineage again, which let a retired key take an address back while
the original verification still bound it. Tests sign key changes with
goblnet.SignKeyChange. Uses gobl from invopop/gobl#1036.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
A moderate security issue remains because future-dated request signatures bypass the intended five-minute replay window and must be bounded by the allowed clock skew.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because the change may accept malformed key rotations and allow registration of an unverified identity, creating significant lineage and authorization risks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the lookup to the GOBL Net changes in invopop/gobl#1036: the lookup registers only verified parties, binds registrations to the subject's key, and keeps each address's key lineage (spec §7.3). It is the public index of verified GOBL Net parties.
aud= subject and acnfin the lineage. Without one the request is rejected with403, or503when the verifier's key can't be fetched. Thegobl.lookup verifycommand is removed; a subject registers again instead.fromits addresstothe lookup, signed for the lookup, with no request token. The lookup drops that request signature, countersigns withcnfbinding the subject's key and naming the verifier, and addresses the envelope back to the subject.Registration.Lineagestores each key bound, by RFC 7638 thumbprint and kid, in order. A request is handled by which keys signed it within the last 5 minutes; older signatures don't count, so an earlier request can't be replayed (401when none is fresh):cnf, and that new key (goblnet.SignKeyChange): a key change, and the new key is bound without a new verification;/partieslisting. Every registered party has a public record with its address, verifier and registration dates. Its name and tax ID are added only when the registration request sets header metalookup-listing: public(privateremoves them; new registrations start private). The full envelope is no longer served there./who. The lookup's response is addressed and signed for each requester.gobl/net.Existing records have no lineage, so those subjects must register once more, with a verification.
Testing
go test -race ./...andgolangci-lintpass.web_test.gois rewritten for the new flow and covers:503when the verifier's key is unreachable;cnf, another address, forged;identity_test.gochecks the lookup refuses to countersign without a verifier.🤖 Generated with Claude Code