Skip to content

Quickstart

This guide gets the issuer and verifier running on your own machine, issues a credential into a wallet, and verifies it. That is two backend containers and a PostgreSQL database, with nothing hosted elsewhere.

It comes in two parts. Part 1 builds the local setup: the configuration files, the signing certificates, the running containers, and the issuer and verifier in them. Part 2 uses that setup to issue a credential into a wallet and ask for it back. The two are independent — if you already have the services running, whether from Partisia's release repository or from an earlier pass through this guide, start at Part 2.

Part 1 needs nothing but your laptop, and neither does the first step of Part 2. The two steps after that need a phone with a wallet installed: both flows end in the holder's own wallet, so a phone is part of the setup. Allow around fifteen minutes.

Requirements

  • A phone with the Partisia ID Wallet installed. This is not optional: the wallet is the holder's side of both flows.

    The phone must be able to reach your machine — see step 1.

  • Docker with the Compose plugin — check with docker compose version.

  • OpenSSL — used once, to generate the signing certificates.
  • curl, to call the services.
  • Access to Partisia's container registry. Book a call to arrange it, then docker login registry.gitlab.com.
  • jq, if you build the setup by hand: it puts the certificates into the requests that create the issuer and the verifier. Part 2 also uses it to lift values out of the JSON responses, and gives an alternative.
  • Optional: qrencode, to render a URI as a QR code in the terminal. Part 2 gives an alternative.

Part 1. Set up the services

With access to the release repository

Partisia's release repository ships everything this part produces — docker-compose.yml, both conf trees, the database init script, and scripts for the certificates, baseUrl and the issuer and verifier. Access is arranged per customer; book a call to ask about it. If you have it, this whole part is:

./scripts/generate-certs.sh
./scripts/set-baseurl.sh          # or: HOST_IP=<your-lan-ip> ./scripts/set-baseurl.sh
docker compose pull
docker compose up -d --wait
./scripts/create-tenants.sh

create-tenants.sh does what step 5 below does: it creates the issuer and the verifier, gives each a logo, and prints an API key for each, which it also writes to issuer/conf/api-keys/example and verifier/conf/api-keys/example. Then continue at Part 2.

Without access, build the same setup by hand in the five steps below.

1. Decide the address the wallet will use

Do this first: it goes into the configuration in the next step, and changing it later means editing files and restarting containers.

The backends tell the wallet where to reach them, using a baseUrl you configure. Your phone will not resolve localhost, so pick an address it can actually reach — usually your machine's address on the network you share:

export HOST=192.168.1.42     # your machine's LAN address, or a tunnel hostname

A tunnel (ngrok, cloudflared, or similar) works too, and is easier if the phone and laptop are on different networks. Use $HOST wherever it appears below. The curl commands stay on localhost, since you run those on the laptop and they reach the containers directly.

2. Lay out the files

Create a working directory with this structure. The configuration files and the SQL are given below; the three empty directories are filled in by step 3.

quickstart/
├── docker-compose.yml
├── postgres-init/
│   └── 01-create-databases.sql
├── issuer/conf/
│   ├── server.json
│   └── signing-key/
└── verifier/conf/
    ├── server.json
    ├── signing-key/
    └── issuer-trust-anchors/

docker-compose.yml:

services:
    postgres:
        image: postgres:17
        environment:
            POSTGRES_USER: postgres
            POSTGRES_PASSWORD: postgres
        ports:
            - '5433:5432'
        volumes:
            - postgres-data:/var/lib/postgresql/data
            - ./postgres-init:/docker-entrypoint-initdb.d:ro
        healthcheck:
            test: ['CMD-SHELL', 'pg_isready -U postgres -d postgres']
            interval: 5s
            timeout: 5s
            retries: 10

    verifier-backend:
        image: registry.gitlab.com/secata/platform/did/release/verifier-backend:latest
        depends_on:
            postgres:
                condition: service_healthy
        working_dir: /app
        ports:
            - '8081:8081'
        volumes:
            - ./verifier/conf:/app/conf:ro
        healthcheck:
            test:
                [
                    'CMD-SHELL',
                    'curl -sf -o /dev/null http://localhost:8081/readyz',
                ]
            interval: 5s
            timeout: 5s
            retries: 6
            start_period: 30s

    issuer-backend:
        image: registry.gitlab.com/secata/platform/did/release/issuer-backend:latest
        depends_on:
            postgres:
                condition: service_healthy
        working_dir: /app
        ports:
            - '8079:8079'
        volumes:
            - ./issuer/conf:/app/conf:ro
        healthcheck:
            test:
                [
                    'CMD-SHELL',
                    'curl -sf -o /dev/null http://localhost:8079/readyz',
                ]
            interval: 5s
            timeout: 5s
            retries: 6
            start_period: 30s

volumes:
    postgres-data:

The latest tags give you the current release of each backend. The issuer and verifier are released independently, so pull both at the same time to get a matched pair. The health checks are what step 4 waits on — see Health endpoints.

postgres-init/01-create-databases.sql — these scripts run only when the data volume is created:

CREATE DATABASE verifier ENCODING 'UTF8';
CREATE DATABASE issuer ENCODING 'UTF8';

Each backend has a server.json with the settings of the server. It holds no tenant — the issuer or verifier itself, with its signing key and API keys: the backends start without one, and step 5 creates it.

issuer/conf/server.json:

{
    "port": 8079,
    "baseUrl": "http://HOST:8079",
    "database": {
        "persistenceUnitName": "model",
        "driver": "org.postgresql.Driver",
        "url": "jdbc:postgresql://postgres:5432/issuer",
        "user": "postgres",
        "password": "postgres"
    },
    "admin": {
        "apiKeys": {
            "admin-api-key": "Local development"
        }
    }
}

verifier/conf/server.json:

{
    "port": 8081,
    "baseUrl": "http://HOST:8081",
    "database": {
        "persistenceUnitName": "model",
        "driver": "org.postgresql.Driver",
        "url": "jdbc:postgresql://postgres:5432/verifier",
        "user": "postgres",
        "password": "postgres"
    },
    "admin": {
        "apiKeys": {
            "admin-api-key": "Local development"
        }
    }
}

Replace HOST in both server.json files with the address from step 1. It is the one value here that must be right for the wallet steps to work.

admin turns on the admin endpoints, with the admin key admin-api-key. Step 5 uses them to create the tenants, and they change the API keys, the logo and the verifier's trust anchors while the backends run.

3. Generate the signing certificates

Each backend signs what it sends with its own key and certificate. For local use, self-signed pairs are fine.

for b in issuer verifier; do
  mkdir -p "$b/conf/signing-key"
  openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes \
    -keyout "$b/conf/signing-key/$b-localhost.key" \
    -out    "$b/conf/signing-key/$b-localhost.pem" \
    -days 365 -subj "/CN=$HOST" -sha256
done

Step 5 gives these to the backends when it creates the tenants.

Now pick the issuer the verifier will trust, by copying the issuer's certificate into its trust-anchors directory:

mkdir -p verifier/conf/issuer-trust-anchors
cp issuer/conf/signing-key/issuer-localhost.pem verifier/conf/issuer-trust-anchors/

Copy the certificate (.pem), never the key.

This is what makes the verifier check who issued a credential, rather than only that the credential is intact — so the verification in Part 2 means "this came from my issuer" instead of "this is well-formed". Without the certificate the verifier rejects the credential you issue in Part 2.

In a real deployment the anchor is a proper root rather than a leaf certificate copied across; see Trust model and Signing certificates.

4. Start everything

docker compose pull
docker compose up -d --wait

--wait returns once both backends report healthy; docker compose logs -f follows their output. Each serves its own API specification:

5. Create the issuer and the verifier

The backends start without a tenant. Create one on each, named example, through the admin endpoints. jq reads the certificates into the requests.

The issuer, with its signing certificate and a name wallets may show for it:

jq -n \
  --rawfile key issuer/conf/signing-key/issuer-localhost.key \
  --rawfile certificate issuer/conf/signing-key/issuer-localhost.pem \
  '{
    code: "example",
    display_name: "Credential Issuer",
    signing: { private_key: $key, certificate_chain: [$certificate] }
  }' |
  curl -X POST http://localhost:8079/admin/tenants \
    -H 'Authorization: Bearer admin-api-key' \
    -H 'Content-Type: application/json' \
    --data-binary @-

The verifier, with its own certificate, its name, and the trust anchor from step 3:

jq -n \
  --rawfile key verifier/conf/signing-key/verifier-localhost.key \
  --rawfile certificate verifier/conf/signing-key/verifier-localhost.pem \
  --rawfile issuer verifier/conf/issuer-trust-anchors/issuer-localhost.pem \
  '{
    code: "example",
    client_name: "Verifier",
    signing: { private_key: $key, certificate_chain: [$certificate] },
    issuer_trust_anchors: { "issuer-localhost": $issuer }
  }' |
  curl -X POST http://localhost:8081/admin/tenants \
    -H 'Authorization: Bearer admin-api-key' \
    -H 'Content-Type: application/json' \
    --data-binary @-

Each prints nothing when it succeeds, and the reason when it does not.

Then give each an API key. The answer is the only time a key is shown, so this keeps them in issuer/conf/api-keys/example and verifier/conf/api-keys/example, where Part 2 reads them from:

mkdir -p issuer/conf/api-keys verifier/conf/api-keys

curl -s -X POST http://localhost:8079/admin/tenants/example/api-keys \
  -H 'Authorization: Bearer admin-api-key' \
  -H 'Content-Type: application/json' \
  -d '{ "client": "Quickstart" }' | jq -r .api_key > issuer/conf/api-keys/example

curl -s -X POST http://localhost:8081/admin/tenants/example/api-keys \
  -H 'Authorization: Bearer admin-api-key' \
  -H 'Content-Type: application/json' \
  -d '{ "client": "Quickstart" }' | jq -r .api_key > verifier/conf/api-keys/example

A logo, which wallets show beside the name, is optional; see Admin endpoints.

The backends keep the tenants in their databases. Change their API keys, logos and the verifier's trust anchors through the admin endpoints. See Settings.

Part 2. Issue and verify a credential

Everything below talks to the services on localhost, so it works the same whether you built the setup by hand or got it from the release repository. Run it in the directory that holds issuer/ and verifier/, starting with the API keys from Part 1, one for each backend:

export ISSUER_API_KEY=$(cat issuer/conf/api-keys/example)
export VERIFIER_API_KEY=$(cat verifier/conf/api-keys/example)

1. Create a credential configuration

A credential configuration declares what the issuer is able to issue: the format, the claims, and how a wallet should display it. Every issuance names one.

The response body is the new configuration id as plain text, so capture it — the next step needs it:

export CONFIG_ID=$(curl -s -X POST http://localhost:8079/credential-configuration/create \
  -H "Authorization: Bearer $ISSUER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "format": "dc+sd-jwt",
    "vct": "urn:example:id-card:1",
    "cryptographic_binding_methods_supported": ["jwk"],
    "credential_signing_alg_values_supported": ["ES256"],
    "proof_types_supported": { "jwt": { "proof_signing_alg_values_supported": ["ES256"] } },
    "credential_metadata": {
      "display": [{ "name": "ID Card", "locale": "en-US" }],
      "claims": [
        { "path": ["first_name"], "display": [{ "name": "First Name", "locale": "en-US" }] },
        { "path": ["last_name"],  "display": [{ "name": "Last Name",  "locale": "en-US" }] },
        { "path": ["id_number"],  "display": [{ "name": "ID Number",  "locale": "en-US" }] }
      ]
    }
  }')

echo "$CONFIG_ID"

You can read a configuration back later with GET /credential-configuration/{id}, and remove one with POST /credential-configuration/remove/{id}.

For the full set of fields, including display metadata and revocation, see Credential configurations.

2. Issue a credential

Start an issuance session, supplying the data that goes into the credential:

ISSUANCE=$(curl -s -X POST http://localhost:8079/issuance/oid4vci/new-session \
  -H "Authorization: Bearer $ISSUER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "credential_dataset": {
      "first_name": "Jens",
      "last_name": "Jensen",
      "id_number": 12345678
    },
    "credential_configurations": ["'"$CONFIG_ID"'"]
  }')

echo "$ISSUANCE"

The response contains a session_id and a credential_offer_uri:

{
    "session_id": "4d794d52...",
    "credential_offer_uri": "haip-vci://?credential_offer_uri=http%3A%2F%2F192.168.1.42%3A8079%2Fissuance%2Foid4vci%2Fcredential-offer%2F4d794d52..."
}

credential_offer_uri is a deep link, not a web address — the haip-vci:// scheme is what makes a wallet open it. The URL nested inside it, under a query parameter of the same name, is where the wallet then fetches the offer from, which is why your baseUrl has to be reachable from the phone.

Copy both values out of that response:

export ISSUANCE_SESSION='4d794d52...'                       # session_id
export OFFER='haip-vci://?credential_offer_uri=http%3A...'  # credential_offer_uri

Keep the single quotes around the URI: it contains &, which the shell would otherwise read as an instruction to run the command in the background.

With jq, instead of copying
export ISSUANCE_SESSION=$(echo "$ISSUANCE" | jq -r .session_id)
export OFFER=$(echo "$ISSUANCE" | jq -r .credential_offer_uri)

Now get $OFFER in front of the wallet. Either route ends with the wallet opening the link:

  • Tap it. Send the URI to yourself — a message, a note that syncs, an email — and tap it on the phone. The haip-vci:// scheme hands it to the wallet.
  • Scan it, if you have qrencode:

    printf '%s' "$OFFER" | qrencode -t ANSI
    

The wallet fetches the offer, collects the credential, and stores it. Watch the session move from ISSUANCE_STARTED to ISSUANCE_SUCCEEDED:

curl -s "http://localhost:8079/issuance/oid4vci/status/$ISSUANCE_SESSION" \
  -H "Authorization: Bearer $ISSUER_API_KEY"

3. Ask for it back

Now switch to the verifier. First declare what you want to see, as a verification query:

export QUERY_ID=$(curl -s -X POST http://localhost:8081/verification-query/create \
  -H "Authorization: Bearer $VERIFIER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "dcql_query": {
      "credentials": [{
        "id": "id-card",
        "format": "dc+sd-jwt",
        "meta": { "vct_values": ["urn:example:id-card:1"] },
        "claims": [
          { "path": ["first_name"] },
          { "path": ["last_name"] }
        ]
      }]
    },
    "uri_prefix": "haip-vp://"
  }')

echo "$QUERY_ID"

The response body is the verification query's id as plain text. A verification query is reusable: create it once, then start as many verification sessions from it as you like.

Start a session:

PRESENTATION=$(curl -s -X POST http://localhost:8081/presentation/oid4vp/new-session \
  -H "Authorization: Bearer $VERIFIER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "verification_query_id": "'"$QUERY_ID"'" }')

echo "$PRESENTATION"
{
    "session_id": "14eb99d3...",
    "request_uri": "haip-vp://?request_uri=http%3A%2F%2F192.168.1.42%3A8081%2Fpresentation%2Foid4vp%2Fauthorization-request%2F14eb99d3...&client_id=x509_hash%3AVA7rWJULU4O_gDap9PCzgpjMyo8-R3dz7zaU-MRkaBs"
}

As on the issuer side, request_uri is a deep link rather than a web address. The haip-vp:// scheme opens the wallet, the nested URL is where it fetches the signed request from, and client_id identifies this verifier by a hash of its signing certificate — see Trust model.

Copy the two values out again:

export PRESENTATION_SESSION='14eb99d3...'          # session_id
export REQUEST='haip-vp://?request_uri=http%3A...'  # request_uri
With jq, instead of copying
export PRESENTATION_SESSION=$(echo "$PRESENTATION" | jq -r .session_id)
export REQUEST=$(echo "$PRESENTATION" | jq -r .request_uri)

Get $REQUEST to the wallet the same way as the offer — tap a link you send yourself, or scan it:

printf '%s' "$REQUEST" | qrencode -t ANSI

The wallet shows the holder which claims are being requested. On approval it sends back a presentation containing only those claims, and the verifier checks them against the issuer trust anchor from Part 1. Watch for VERIFICATION_SUCCEEDED:

curl -s "http://localhost:8081/presentation/oid4vp/status/$PRESENTATION_SESSION" \
  -H "Authorization: Bearer $VERIFIER_API_KEY"

That is the full round trip: a credential you issued, held in a wallet you do not control, presented back with only the claims you asked for and validated against your own issuer certificate.

4. Get the results into your own application

Polling is fine for a first look, but in a real integration you configure a callback and the services push results to you as they complete. That is session_callback in the settings each tenant is created with. With the release repository, create-tenants.sh takes the callback as ISSUER_CALLBACK_URL and VERIFIER_CALLBACK_URL, with their bearer tokens as ISSUER_CALLBACK_TOKEN and VERIFIER_CALLBACK_TOKEN:

Troubleshooting

Common failures — pull authentication, port conflicts, creating the tenants, database state — are collected in Troubleshooting.

What's Next