|
| 1 | +--- |
| 2 | +sidebar_position: 5 |
| 3 | +sidebar_label: Verifier Docker Quick Start |
| 4 | +--- |
| 5 | + |
| 6 | +# Verifier Docker Quick Start |
| 7 | + |
| 8 | +Run the SIROS ID verifier and go-trust with Docker Compose and request a PID with given and family name. |
| 9 | + |
| 10 | +## 1. Create the files |
| 11 | + |
| 12 | +```bash |
| 13 | +mkdir -p vq/pki vq/metadata vq/presentation_requests && cd vq |
| 14 | +openssl ecparam -name prime256v1 -genkey -noout -out pki/verifier_key.pem |
| 15 | +openssl req -x509 -new -key pki/verifier_key.pem -sha256 -days 365 -subj "/CN=verifier.example.org" \ |
| 16 | + -addext "subjectAltName=DNS:verifier.example.org" -out pki/verifier_chain.pem |
| 17 | +curl -fsSL -o metadata/vctm_pid.json https://raw.githubusercontent.com/SUNET/vc/main/metadata/vctm_pid.json |
| 18 | +``` |
| 19 | + |
| 20 | +`docker-compose.yml`: |
| 21 | + |
| 22 | +```yaml |
| 23 | +services: |
| 24 | + verifier: |
| 25 | + image: ghcr.io/sirosfoundation/vc/verifier:latest |
| 26 | + user: "${VC_UID}:${VC_GID}" |
| 27 | + ports: ["8080:8080"] |
| 28 | + environment: [VC_CONFIG_YAML=/config.yaml] |
| 29 | + volumes: |
| 30 | + - ./config.yaml:/config.yaml:ro |
| 31 | + - ./pki:/pki:ro |
| 32 | + - ./metadata:/metadata:ro |
| 33 | + - ./presentation_requests:/presentation_requests:ro |
| 34 | + depends_on: [mongo, go-trust] |
| 35 | + go-trust: |
| 36 | + image: ghcr.io/sirosfoundation/go-trust:latest |
| 37 | + command: ["--config", "/config.yaml"] |
| 38 | + ports: ["127.0.0.1:6001:6001"] |
| 39 | + volumes: ["./trust-config.yaml:/config.yaml:ro"] |
| 40 | + mongo: |
| 41 | + image: mongo:7 |
| 42 | +``` |
| 43 | +
|
| 44 | +`trust-config.yaml` (the allow-all registry is for development only; a production PDP must use real trust sources such as trust lists or federation): |
| 45 | + |
| 46 | +```yaml |
| 47 | +server: {host: "0.0.0.0", port: "6001"} |
| 48 | +registries: |
| 49 | + always_trusted: {enabled: true} |
| 50 | +``` |
| 51 | + |
| 52 | +`config.yaml`: |
| 53 | + |
| 54 | +```yaml |
| 55 | +common: |
| 56 | + mongo: {uri: "mongodb://mongo:27017"} |
| 57 | + credential_metadata: |
| 58 | + pid: {vctm_file_path: "/metadata/vctm_pid.json", format: "dc+sd-jwt"} |
| 59 | +verifier: |
| 60 | + api_server: {addr: ":8080", trust_proxy_tls: true} |
| 61 | + public_url: "https://verifier.example.org" |
| 62 | + key_config: {private_key_path: "/pki/verifier_key.pem", chain_path: "/pki/verifier_chain.pem"} |
| 63 | + trust: {pdp_url: "http://go-trust:6001"} |
| 64 | + inbound: |
| 65 | + openid4vp: |
| 66 | + token_endpoint: "https://verifier.example.org/token" |
| 67 | + presentation_requests_dir: "/presentation_requests" |
| 68 | + supported_credentials: [{vct: "urn:eudi:pid:1", scopes: ["pid"]}] |
| 69 | + clients: |
| 70 | + default: {type: "public", redirect_uri: "https://verifier.example.org/", scopes: ["pid"]} |
| 71 | + outbound: |
| 72 | + oidc_provider: |
| 73 | + issuer: "https://verifier.example.org" |
| 74 | + subject_type: "pairwise" |
| 75 | + subject_salt: "dev-only-change-me" |
| 76 | +``` |
| 77 | + |
| 78 | +## 2. Define the presentation request |
| 79 | + |
| 80 | +`presentation_requests/pid.yaml` binds the scope `pid` to a DCQL query for the EUDI PID (SD-JWT VC type `urn:eudi:pid:1`; the mdoc doctype is `eu.europa.ec.eudi.pid.1`): |
| 81 | + |
| 82 | +```yaml |
| 83 | +templates: |
| 84 | + - id: pid_name |
| 85 | + name: PID name |
| 86 | + oidc_scopes: [pid] |
| 87 | + dcql: |
| 88 | + credentials: |
| 89 | + - id: pid |
| 90 | + format: dc+sd-jwt |
| 91 | + meta: {vct_values: ["urn:eudi:pid:1"]} |
| 92 | + claims: |
| 93 | + - path: [given_name] |
| 94 | + - path: [family_name] |
| 95 | + claim_mappings: {given_name: given_name, family_name: family_name} |
| 96 | +``` |
| 97 | + |
| 98 | +## 3. Start |
| 99 | + |
| 100 | +```bash |
| 101 | +export VC_UID=$(id -u) VC_GID=$(id -g) |
| 102 | +docker compose up -d |
| 103 | +curl http://localhost:8080/health |
| 104 | +``` |
| 105 | + |
| 106 | +You should see `"status":"STATUS_OK_verifier"`, and `docker compose logs verifier` shows `Loaded presentation request templates` and `Trust evaluator initialized`. |
| 107 | + |
| 108 | +## 4. See it work |
| 109 | + |
| 110 | +Open `https://verifier.example.org/` (your public HTTPS URL for port 8080), choose PID and scan the QR code with an OpenID4VP wallet. The verifier asks the wallet for `given_name` and `family_name` and logs `Issuer trust verified`. |
| 111 | + |
| 112 | +## Next steps |
| 113 | + |
| 114 | +- [Use the verifier as an OpenID Provider for your application](/sirosid/verifiers/oidc-rp) |
| 115 | +- [Verifier configuration](/sirosid/verifiers/verifier) |
0 commit comments