Gaia-X Credential Wizard v0.0.0-dev
AI Agent Reference — not a marketing page
Application: compliance-wizard ("Gaia-X Wizard"), version 0.0.0-dev. This page is the authoritative, machine-readable description of this web application's purpose, features, API surface, and behavior. It is intended to be given to an AI agent as the sole source of context needed to answer questions about the application accurately.
The Gaia-X Wizard is a browser-based tool that lets an organization (a "Legal Participant") obtain a Gaia-X Compliance Credential — a Verifiable Credential (VC) issued by a Gaia-X Clearing House (also called GXDCH, Gaia-X Digital Clearing House) that attests the organization complies with the Gaia-X Trust Framework.
To do this, the application walks the user through a wizard that:
The application can act as its own did:web issuer and VC host (for testing, "non-production mode"), or the user can bring their own DID, verification method, and private key ("production mode") to produce a credential that is valid outside the test/lab environment.
| Route | Purpose |
|---|---|
| / | Home page. Runs the primary onboarding wizard (OnboardingStepperContainer) to create a Legal Participant + Terms & Conditions credential set and obtain a Compliance Credential. |
| /stepper | Alternate, simpler single/multi-shape wizard (StepperContainer) for creating one credential shape (Legal Participant, Service Offering, or Terms & Conditions) end to end. |
| /userGuide | Human-facing, click-through user guide (UI walkthrough, not intended for machine parsing). |
| /aiDocumentation | This page. Machine-readable technical reference for AI agents. Stable, shareable URL. |
A global Sidebar (present on every page) links to the wizards, the wallets and the User Guide; this page is reached by its URL only. An Advanced Mode toggle in the sidebar footer adds the Tools (the did:web document generator and vc-jwt.io) and Contribute links, and reveals the parent and sub organisation fields, the LRN Verifiable Credential identifier and, with the user's own DID, a "Clearing House" panel on the Legal Person step.
The single most important behavioral switch in the application is whether the user enables "I'll use my own DID solution" on the first wizard step. This sets isCustomIssuer (wizard state). All downstream steps and API calls branch on this flag.
| Aspect | Non-production | Production |
|---|---|---|
| Issuer DID | Auto: did:web:vc-jwt.io:api | User-supplied did:web:... |
| Private key | None (remote dummy key) | User-held (browser-generated, imported, WebAuthn, or eID) |
| Signing location | Remote (vc-jwt.io API) | Client-side (or vc-jwt.io API if no local key is present) |
| Compliance service | Fixed: compliance.lab.gaia-x.eu/v2 | The chosen v2 GXDCH compliance service, or a random one for each submission |
| Wizard steps | Start → Legal Person → T&Cs → Sign → Compliance Check → Credential | Start → Legal Person → T&Cs → Identity → Private key → Sign → Compliance Check → Credential |
| Credential validity | Test/demo only ("fake") | Intended to be a real, usable Compliance Credential |
Two orchestrators exist and share step components: OnboardingStepperContainer (route /, allRequiredVCs=true, always signs both a Legal Person VC and a Terms & Conditions VC) and StepperContainer (route /stepper, allRequiredVCs=false, signs a single chosen VC shape). Step order below is for the primary / flow.
Selected wallet documents are grouped by credentialSubject.type and checked against these rules:
Each rule produces a result object with isValid, count, min, and human-readable messages (e.g. "You must sign terms and conditions for issuer <truncated DID>"). Validation failures are surfaced inline in the UI, not thrown as exceptions.
Compliance submission and credential-offer retrieval support three formats via an Accept header: application/json, application/vc+jwt, and application/vp+ld+jwt. Responses are parsed based on their returned content-type: application/vc+jwt decodes a single VC from a JWT; application/vp+ld+jwt decodes a VP and every VC embedded within it. Parsed results are normalized into a common displayable document shape used throughout the UI.
On blur of the issuer DID field (production mode), the app resolves the DID against a DID verification service. An unresolvable DID surfaces a non-blocking warning; it does not stop the user from proceeding, but flags that the resulting VCs "may not be compliant."
The stepper's compliance services and notaries are the v2 entries of a Gaia-X meta-registry of trusted issuers, picked at random for each call; the Get compliance page offers the v3 dispatchers of the same registry.
On blur of the issuer DID field, the app calls GET /api/did-verification?did=...&isTrusted=..., which proxies to an external DID verification service. If verification methods are returned, they populate a dropdown and the first one is auto-selected. If the DID cannot be resolved or the call errors, an amber warning is shown: "This DID:web identifier could not be resolved. The generated VCs may not be compliant." This is advisory only and does not block progression.
All endpoints are Next.js Pages Router API routes under /api/. Unsupported HTTP methods return 405 with body "<METHOD> not allowed".
| Endpoint | Method | Purpose | Input | Output / notable errors |
|---|---|---|---|---|
| /api/clearing-houses | GET | List the Gaia-X Clearing Houses whose dispatcher lists its extensions, from the trusted-issuers meta-registry (or the local dispatcher in local development). | none | ClearingHouse[]: { name, dispatcherUrl, extensions }; 502 when the registry cannot be read |
| /api/compliance-service | GET | Pick the v2 compliance service of a stepper submission: the chosen Clearing House's, or a random one, of the registry for a custom issuer; the Gaia-X development one for the wizard's own issuer, whatever the environment. In local development a custom issuer without a choice also gets the lab one. | issuer=custom|managed, clearingHouse (optional) | { url }; 502 when the registry cannot be read or lists none |
| /api/v2-clearing-houses | GET | List the v2 Clearing Houses the stepper can submit to, for its "Clearing House" panel: the registry's, after the lab one ("gaia-x-lab") in local development. | none | { name, complianceUrl }[]; 502 when the registry cannot be read |
| /api/did-verification | GET | Check whether a DID resolves and list its verification methods, through basic-functions. With isTrusted=true its certificate must chain to a trust anchor of the Gaia-X registry: the credential rows show "Trusted issuer" when it does, and "Test" for a registration number or compliance credential whose issuer does not (400), as for anything signed with the wizard key. Any other failure gives no tag. | query: did, isTrusted | proxied verification-method list from the external DID verification service |
| /api/legalRegistrationNumber | GET | Request a Legal Registration Number (LRN) VC from a Gaia-X notary: the Gaia-X development one for the wizard's own issuer (issuer=managed), whatever the environment; otherwise the chosen Clearing House's, or a random one of the registry. | query: vcid, type (EORI | vatID | leiCode), value, subjectId, issuer (custom | managed), clearingHouse | JSON-LD VC document; 400 with the notary's reason (plain text) when it refuses the number (its 400 or 422); 502 with its reason when the notary fails otherwise (rate limit, error, missing route) |
| /api/credentials/[...id] | GET, POST/PUT/PATCH | Self-hosted storage/retrieval of a VC by id — this is the resolvable hosting endpoint referenced by self-hosted VC ids created in the Signing step. | GET: id path param. POST/PUT/PATCH: id + raw VC body | stored/retrieved VC text, persisted via a pluggable storage service (disk / S3 / in-memory, selected by STORAGE_BACKEND) |
| /api/registry/[vcid] | GET | Retrieve a VC in a registry/did.json-compatible shape. | URL path (did + vcid) | [VC] as a JSON array |
| /api/did.json | GET | Serve the application's own did:web DID document. | none | JSON DID document |
| /.well-known/x509CertificateChain.pem | GET | Serve the application's own hosted x509 certificate chain. | none | PEM text (download headers if Accept: application/x-pem-file) |
| /api/certchain/[id] | GET, POST | Store/retrieve a user-uploaded x509 certificate chain (used for eID/PKI signing). POST walks the AIA caIssuer chain leaf → intermediate → root. | POST body: leaf certificate. GET: id | { certChain } on POST; PEM text on GET; 404 { message: "Certificate chain not found" }; error "Certificate does not include AIA extension" if AIA is missing |
| /api/x509/[...id] | GET | Retrieve a named X.509 certificate from the keychain service. | path id (".crt"/".pem" suffix stripped) | certificate content |
| /api/webauthn/challenge | GET | Generate a random 32-byte challenge for WebAuthn/FIDO2 PRF-based key unlock. | none | number[] of raw bytes |
| /api/webeid/getEidJws | POST | Build a JWS from a Web eID card signature after OCSP-checking the signing certificate. | body: { payload, header, signature, certificate } | { jws, valid, status }; 400 if certificate lacks AIA extension; { jws: "", valid: false, status } (200) if OCSP status is not "good" |
| /api/webeid/prepareSignature | POST | Hash the JWT header+payload with the algorithm requested by the eID card before signing. | body: { payload, header, supportedSignatureAlgorithms: { hashFunction } } — SHA-224/256/384/512 | { hash, hashFunction }; 400 on unsupported hash function |