Cookbook: Accept Only Trusted Issuers
In chapter 3, membership-check accepts the membership credential only from issuers on the trust list membership-issuers. You now test it with a credential from an issuer that is not on the list, and then switch to a trust list published by someone else.
What you will build
A second signing key acts as an untrusted issuer of the same credential type. membership-check rejects its credentials, either in the wallet or during verification.
Before you start
- Starts from: Issue and verify: tenant
membership-demowith the key chainMembership credential signing, the credential configurationmembership, the trust listmembership-issuers, the presentation configurationmembership-checkthat references it, and the wallet with the membership credential. curl,jqand the secret ofmembership-demo-adminfor the checks. Get a token:
export EUDIPLO=http://localhost:3000
read -rs ADMIN_SECRET
ADMIN_TOKEN=$(curl -s -X POST "$EUDIPLO/api/oauth2/token" \
-d grant_type=client_credentials -d client_id=membership-demo-admin \
--data-urlencode client_secret="$ADMIN_SECRET" | jq -r .access_token)
Step 1: Issue a credential from an untrusted issuer
Create a second issuer key in the same tenant and a credential type of the same VCT that uses it:
- Under Keys, create Credential Signing (Attestation) → Key Chain with Root CA with description
Untrusted signing. - Under Credential Configs, create
membership-untrustedexactly likemembershipin chapter 2, step 4, with two differences: Display NameUntrusted membership, and the signing key chainUntrusted signing. - Send a pre-authorized offer for
membership-untrustedwith the default values, and accept it in the wallet.
Checkpoint: the wallet holds two credentials of type urn:example:membership:1: Membership and Untrusted membership.
Step 2: Test the untrusted issuer
Generate a new request for membership-check and scan it. There are two correct outcomes:
- The wallet offers only
Membership. It filtered by theakivalues. Present it; the session iscompleted. - The wallet offers both. Choose
Untrusted membership. EUDIPLO rejects it.
To see the server-side rejection with a wallet that filters, add VP_REMOVE_TA=true to .eudiplo.env and run eudiplo up --instance cookbook. EUDIPLO then leaves trusted_authorities out of the wallet request but still enforces the list. Remove the setting afterwards.
Checkpoint: the session of the untrusted credential is failed:
curl -s "$EUDIPLO/api/session/<presentation session ID>" -H "Authorization: Bearer $ADMIN_TOKEN" \
| jq '{status, failureCode, errorReason}'
failureCode is trust_chain_not_trusted ("The credential issuer is not in the trusted list.") or no_trust_chain_to_root.
Variant: use a trust list published by someone else
To accept the issuers of an external List of Trusted Entities (LoTE), edit membership-check and replace the managed trust list under Issuer trust with Add external trust list. Enter the External trust-list URL and, under Trust-list verification material, the Verification certificate (base64 DER) of the list's signer. In the query this becomes:
{ "type": "etsi_tl", "values": [{ "url": "https://trust.example.org/lists/members", "verifierX509Der": "MIIB..." }] }
Without verification material, EUDIPLO cannot check the list's signature, and verification fails with trust_list_unavailable. EUDIPLO caches fetched lists for 5 minutes; DELETE /api/cache/trust-list clears your tenant's cached lists after the publisher changes a list. To try the variant without a second organization, enter the Trust List URL of membership-issuers from chapter 3. For the certificate, open Membership trust list signing under Keys, choose Copy PEM under Active Certificate, and paste it without the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines.
Checkpoint: presenting Membership completes the session as in chapter 3, and Untrusted membership is rejected as in step 2.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The trusted credential is rejected too | The entity lists a different issuer key chain | Edit the list and select Membership credential signing as Issuer Key Chain. |
| The wallet offers no credential at all | The wallet cannot match the aki values | Test with VP_REMOVE_TA=true; report the wallet's behavior to its vendor. |
trust_list_unavailable | The list URL is unreachable, the list has no valid NextUpdate or one that has passed, it is numbered lower than a list accepted before (Older versions of a list), or the verification material is missing or wrong | Open the URL; for external lists, check verifierX509Der (the signer's certificate without the PEM header and footer lines) or verifierKey. |
General problems are covered in Troubleshooting.
Next steps
- Trust lists: entity types, wallet provider lists and renewal.
- DCQL:
trusted_authoritiestogether with other query options. - Keys and certificates: import issuer certificates from your PKI.