# TrueID TrueID is a hostname-bound entity attestation protocol. DNS plus HTTPS is the proof that a principal controls a name. There is no central account directory to query. ## Verify any participant 1. Take the hostname the participant claims, such as tank.trueid.dev. 2. GET https:///.well-known/trueid.json 3. Require HTTP 200. 4. Require the JSON trueid field to equal the hostname you requested. 5. Read principal, type, verifiedBy, publicKey, and capabilities as the attested attributes. 6. Optionally GET https:///.well-known/did.json - id is did:web: - verificationMethod exposes publicKey and a separate algorithm field - algorithm is the prefix of publicKey (":") - unknown algorithms use verificationMethod type Multikey and still return algorithm plus publicKey - service contains one entry with type TrueIDAttestation - serviceEndpoint is https:///.well-known/trueid.json Fetch the document from the hostname under test. A principal JSON served by a different host is not an attestation of that name. ## Host selection The service chooses the principal in this order: 1. The host query parameter, when present. This is how localhost rehearses a production name. 2. The x-forwarded-host request header. 3. The host request header. A comma-separated header uses the first value. A trailing :port is removed before lookup. Comparison is case-insensitive. The published trueid value keeps the canonical lowercase name. Examples: - GET /.well-known/trueid.json?host=tank.trueid.dev - GET /.well-known/did.json?host=0001.tank.trueid.dev - GET https://tank.trueid.dev/.well-known/trueid.json ## Not registered HTTP 404 and this JSON object: {"error":"Principal not registered","host":""} ## CORS and cache Discovery responses, including OPTIONS and 404, send: Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, OPTIONS Cache-Control: public, max-age=60 OPTIONS returns 204 with no body. ## Registered principals Host: tank.trueid.dev Type: merchant Principal: tank.monipay.nz Attestation: https://tank.trueid.dev/.well-known/trueid.json DID: https://tank.trueid.dev/.well-known/did.json Public key: ed25519:DemoTankJuiceMerchantKey2026 Capabilities: ztag_order, mqtt_sync, jiaga_preferences Host: 0001.tank.trueid.dev Type: screen Principal: tank.monipay.nz/screen/0001 Attestation: https://0001.tank.trueid.dev/.well-known/trueid.json DID: https://0001.tank.trueid.dev/.well-known/did.json Public key: ed25519:DemoTankScreen0001Key2026 Capabilities: display, mqtt_sync, ztag_presence ## Key material publicKey values in this deployment are demo placeholders, not live Ed25519 keys. The field format is ":" so a later curve keeps the same document shape. ## Agent rule To verify a relying party, concatenate the claimed hostname with /.well-known/trueid.json and fetch it over HTTPS. Trust the record only when the TLS hostname, the requested host, and the trueid field are the same name.