Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
aa614b0
feat: lei verification
jhateley-godaddy Jun 11, 2026
a28030e
feat: fix after rebase
jhateley-godaddy Jun 12, 2026
e283ddc
feat(vlei): whitespace-tolerant ACDC frame scan + demo cleanup
jhateley-godaddy Jun 13, 2026
ffd265e
fix(vlei): noop lei verifier accepts the real CESR presentation
jhateley-godaddy Jun 13, 2026
f5afc64
feat: lei verification - remove output files
jhateley-godaddy Jun 14, 2026
8326827
fix(migrations): identity_subject_aid 009->008
jhateley-godaddy Jun 17, 2026
3ba47b4
fix(test): fix rebase error
jhateley-godaddy Jun 17, 2026
32cf93c
fix(doc): fix stale comments
jhateley-godaddy Jun 17, 2026
a083b03
fix: fixes from review feedback
jhateley-godaddy Jun 17, 2026
41ad74f
fix(demo): co-pilot review feedback
jhateley-godaddy Jun 17, 2026
1e32602
feat(identity): enforce verify-control oneOf proof-family contract
jhateley-godaddy Jun 19, 2026
45d9a20
feat(leiverifier): log operational verifier failures
jhateley-godaddy Jun 19, 2026
5ed3627
fix(leiverifier): fail closed on 200 authorization with no LEI
jhateley-godaddy Jun 22, 2026
8b194fd
docs(spec): document register/rotate identity verifier error codes
jhateley-godaddy Jun 23, 2026
f4fdc95
docs(identity): refresh stale lei comments and document proof-family …
jhateley-godaddy Jun 23, 2026
c42e318
Merge branch 'main' into feat/lei-verification
jhateley-godaddy Jun 30, 2026
b4a59a9
Merge branch 'main' into feat/lei-verification
jhateley-godaddy Jul 1, 2026
cb94574
refactor(ra): return facts from RegisterPresentation instead of mutat…
jhateley-godaddy Jul 13, 2026
31bda0a
fix(migrations): rename migrations file
jhateley-godaddy Jul 13, 2026
2bebcd0
feat(vlei): default vlei to off
jhateley-godaddy Jul 13, 2026
f8cfe73
feat(vlei): cap links payload
jhateley-godaddy Jul 13, 2026
25a32e8
feat(vlei): fix coverage of outbound verfier calls
jhateley-godaddy Jul 13, 2026
5fdc719
feat(vlei): use recorded fixtures for vlei verifier contract
jhateley-godaddy Jul 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ Thumbs.db
# Dependency directories
vendor/
AGENTS.md

# Demo outputs
scripts/demo/vlei/signify/out/
31 changes: 30 additions & 1 deletion cmd/ans-ra/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/godaddy/ans/internal/adapter/docsui"
"github.com/godaddy/ans/internal/adapter/eventbus"
"github.com/godaddy/ans/internal/adapter/keymanager"
"github.com/godaddy/ans/internal/adapter/leiverifier"
"github.com/godaddy/ans/internal/adapter/store/sqlite"
"github.com/godaddy/ans/internal/adapter/tlclient"
"github.com/godaddy/ans/internal/config"
Expand Down Expand Up @@ -153,11 +154,20 @@ func run(cfgPath string) error {
// did:web resolver — noop (quickstart) or hardened web fetch,
// the identity surface's analog of the DNS verifier selection.
didResolver := selectDIDResolver(cfg, logger)
// vLEI control verifier — noop (quickstart) or HTTP client for an internal vlei-verifier,
// the lei kind's analog of
// the did:web resolver selection.
leiVerifier := selectLEIVerifier(cfg, logger)
logger.Info().
Str("resolver", cfg.Identity.Resolver.Type).
Str("vleiVerifier", cfg.VLEI.Type).
Dur("challengeTTL", cfg.Identity.ChallengeTTL).
Msg("verified-identity surface configured")

if cfg.VLEI.Type == "noop" {
logger.Warn().Msg("vlei.type=noop — signature & authorization checks waived, NOT for production")
}

logger.Info().
Str("tlPublicBaseURL", cfg.TLClient.PublicBaseURL).
Str("tlBaseURL", cfg.TLClient.BaseURL).
Expand Down Expand Up @@ -198,7 +208,7 @@ func run(cfgPath string) error {
logger.Warn().Msg("TL client disabled — identity verify/revoke/link operations will fail with TL_UNAVAILABLE (seal-before-success)")
}
identitySvc := service.NewIdentityService(
identityStore, identityLinks, agents, didResolver, identitySealer, db,
identityStore, identityLinks, agents, didResolver, identitySealer, leiVerifier, db,
).WithSigner(service.EventSigner{
KeyManager: km,
KeyID: signerKeyID,
Expand Down Expand Up @@ -515,3 +525,22 @@ func selectDIDResolver(cfg *config.RAConfig, logger zerolog.Logger) port.DIDReso
return didresolver.NewNoopResolver()
}
}

// selectLEIVerifier returns the configured vLEI control verifier — the
// lei kind's analog of selectDIDResolver. "verifier" is the hardened
// HTTP client for an internal vlei-verifier (config-validated base
// URL); the default "noop" performs structural-only qb64 checks and
// waives both the GLEIF authorization binding and the cryptographic
// signature check
func selectLEIVerifier(cfg *config.RAConfig, logger zerolog.Logger) port.LEIControlVerifier {
switch cfg.VLEI.Type {
case "verifier":
opts := []leiverifier.VerifierOption{leiverifier.WithLogger(logger)}
if cfg.VLEI.PresentTimeout > 0 {
opts = append(opts, leiverifier.WithTimeout(cfg.VLEI.PresentTimeout))
}
return leiverifier.NewVerifier(cfg.VLEI.BaseURL, opts...)
default:
return leiverifier.NewNoop()
}
}
21 changes: 21 additions & 0 deletions config/ra-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@ identity:
# minute (each can trigger an outbound did:web fetch).
register-rate-limit: 10

vlei:
# The lei (vLEI) control verifier behind the `lei` identifier kind,
# mirroring the DNS verifier's and did:web resolver's noop/real split:
# "noop" — no I/O; accepts the same CESR presentation payload but
# performs structural qb64 checks only and waives the
# vlei-verifier authorization + cryptographic signature checks
# (zero-infra quickstart only — NOT for production).
# "verifier" — a hardened HTTP client for an internal GLEIF
# vlei-verifier (present / authorize / verify). The RA
# never parses KERI key state itself; the verifier is
# the authoritative key-state oracle. REQUIRED for the
# real end-to-end flow that scripts/demo/vlei/up.sh
# brings up (keria, vlei-server, vlei-verifier,
# witnesses, signify).
type: noop
# base-url: required when type is "verifier" — the internal
# vlei-verifier service URL.
# base-url: "http://localhost:7676"
# present-timeout bounds each verifier HTTP request (default 5s).
# present-timeout: 5s

keys:
type: file
file:
Expand Down
87 changes: 73 additions & 14 deletions internal/adapter/docsui/openapi/ra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -927,9 +927,12 @@ paths:
is the idempotent re-add: the same `identityId` returns with
a fresh nonce (the prior nonce is superseded). A value
already verified — by this owner or any other — returns 409
`IDENTIFIER_DUPLICATE`. Kinds without an enabled control
verifier (`lei`, postponed) return 422
`IDENTIFIER_KIND_UNSUPPORTED`.
`IDENTIFIER_DUPLICATE`. A recognized value whose kind has no
enabled control verifier (e.g. `did:plc`, `did:ion`, until
their verifiers ship) returns 422
`IDENTIFIER_KIND_UNSUPPORTED`. The `lei` kind additionally
requires a `vleiPresentation` at register time; omitting it
returns 422 `IDENTIFIER_PRESENTATION_REQUIRED`.
operationId: registerIdentity
requestBody:
required: true
Expand Down Expand Up @@ -1093,6 +1096,12 @@ paths:
closed. The nonce is consumed exactly once, inside the
success transaction — a failed attempt does not consume it.

The `lei` kind instead submits a single `cesrSignature` over
the same `signingInput`: the RA forwards it to the
vlei-verifier, which live-rechecks the subject AID's
authorization and verifies the signature against its current
KEL key state.

JWS bearing unrecognized `crit` header parameters are
rejected (RFC 7515 §4.1.11) — this verifier implements no
critical extensions.
Expand Down Expand Up @@ -1152,14 +1161,14 @@ paths:
description: |
Proof rejected — `PRICC_SIGNATURE_INVALID`,
`DID_VERIFICATION_METHOD_INVALID`, `DID_RESOLUTION_FAILED`,
`DID_DOCUMENT_ID_MISMATCH`, `IDENTIFIER_PROOF_INVALID`.
`DID_DOCUMENT_ID_MISMATCH`, `IDENTIFIER_PROOF_INVALID`, `LEI_NOT_AUTHORIZED`, `LEI_MISMATCH`.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'

'503':
description: Transparency Log unavailable (TL_UNAVAILABLE — retryable; the nonce is NOT consumed)
description: Upstream unavailable (TL_UNAVAILABLE, or LEI_VERIFIER_UNAVAILABLE — retryable; the nonce is NOT consumed)
content:
application/json:
schema:
Expand Down Expand Up @@ -2056,16 +2065,38 @@ components:
description: |
Registers (POST) or rotates (PUT) an identifier. The kind is
inferred from the value's lexical form — `did:web:` prefix,
`did:key:` prefix, or a 20-character LEI (recognized but
postponed) — never caller-asserted.
`did:key:` prefix, or a 20-character LEI — never
caller-asserted.
properties:
value:
type: string
description: The identifier to prove control of
example: did:web:identity.acme-corp.com
vleiPresentation:
$ref: '#/components/schemas/VLEIPresentation'
required:
- value

VLEIPresentation:
type: object
description: |
The lei (vLEI) register-time credential presentation. REQUIRED
for the `lei` kind and omitted for the JWS kinds (`did:web`,
`did:key`). The RA submits the CESR to its configured
vlei-verifier, which derives and pins the subject AID; the
202's `presentationStatus` reports the verifier's advisory
authorization decision.
properties:
cesr:
type: string
description: |
The full-chain CESR export of the vLEI credential and its
supporting KELs/ACDCs (the `credentials().get(said, true)`
shape). The RA never parses KERI key state itself — the
verifier is the authoritative key-state oracle.
required:
- cesr

IdentityChallengeResponse:
type: object
description: |
Expand Down Expand Up @@ -2096,6 +2127,15 @@ components:
type: array
items:
$ref: '#/components/schemas/IdentityProofChallenge'
presentationStatus:
type: string
enum: [AUTHORIZED, PENDING]
description: |
The lei register-time advisory authorization status from
the vlei-verifier (`AUTHORIZED` | `PENDING`). Omitted for
kinds with no register-time presentation (`did:web`,
`did:key`). Advisory only — control is finally established
by a LIVE re-authorization at verify-control.
required:
- identityId
- kind
Expand Down Expand Up @@ -2128,11 +2168,20 @@ components:
VerifyControlRequest:
type: object
description: |
One compact JWS per proven key. Supported algorithms match
what the verifier implements: EdDSA (Ed25519), ES256
(ECDSA P-256), and RS256 (RSA >= 2048). Key-agreement keys
(X25519) and curves without a verifier (secp256k1,
P-384/521) are rejected with a precise error.
The control proof. Its members are additive per identifier
kind, and EXACTLY ONE family is set per request:

- JWS kinds (`did:web`, `did:key`) submit `signedProofs` —
one compact JWS per proven key.
- The `lei` kind submits `cesrSignature` — a single CESR
signature over the served signingInput by the subject
AID's current key.

Supported JWS algorithms match what the verifier implements:
EdDSA (Ed25519), ES256 (ECDSA P-256), and RS256 (RSA >=
2048). Key-agreement keys (X25519) and curves without a
verifier (secp256k1, P-384/521) are rejected with a precise
error.
properties:
signedProofs:
type: array
Expand All @@ -2146,8 +2195,18 @@ components:
and MAY carry `jwk` (the signer's public key — required
by the quickstart noop resolver, ignored by the web
resolver, which always uses the resolved document).
required:
- signedProofs
cesrSignature:
type: string
description: |
The lei proof: a single CESR signature over the served
signingInput by the subject AID's current key. Set only
for the `lei` kind. The RA forwards it to the
vlei-verifier, which resolves the AID's key state from its
KEL and checks the signature over the exact signingInput
bytes (the same payload the JWS kinds sign).
oneOf:
- required: [signedProofs]
- required: [cesrSignature]

IdentityLifecycleStatus:
type: string
Expand Down
27 changes: 19 additions & 8 deletions internal/adapter/docsui/openapi/tl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1203,25 +1203,36 @@ components:
conveniences (anyone can derive RFC 7638 from the sealed
source) and are never part of the sealed contract.

The postponed `lei` kind is the one deliberate exception:
it will seal the subject AID + a key thumbprint only — there
is no document to quote, the ACDC is PII, and KERI's KEL is
already the authoritative key history. Seal verbatim what
has no other tamper-evident home; commit minimally where one
exists.
The `lei` kind is the one deliberate exception: it seals the
subject AID + a key thumbprint only (`{id: <AID>, type:
"vLEI-KERI-AID", thumbprint: base64url(SHA-256(AID))}`) —
there is no document to quote, the ACDC is PII, and KERI's
KEL is already the authoritative key history. Seal verbatim
what has no other tamper-evident home; commit minimally where
one exists. A `lei` seal is therefore NOT offline
re-verifiable from the seal alone: the KEL-backed key state
lives at the vlei-verifier (the documented lei trust
boundary), whereas a JWS seal carries the key material and so
the sealed proof re-verifies offline.
required: [verificationMethod, signedProof]
properties:
verificationMethod:
type: object
description: The DID document's verification-method object, verbatim
description: |
For JWS kinds, the DID document's verification-method
object, verbatim. For `lei`, the synthesized subject-AID
object (`id`, `type: vLEI-KERI-AID`, `thumbprint`).
example:
id: did:web:identity.acme-corp.com#key-1
type: JsonWebKey2020
controller: did:web:identity.acme-corp.com
publicKeyJwk: { kty: OKP, crv: Ed25519, x: "0-e2i2_..." }
signedProof:
type: string
description: The compact JWS over the served IdentityProofInput
description: |
The proof over the served IdentityProofInput — a compact
JWS for the JWS kinds, or the CESR signature by the
subject AID's current key for `lei`.

LinkedIdentityView:
type: object
Expand Down
Loading