EQTY LabDocs

Quick Start

Register a binary, run it, sign a payload from inside it, and read the credential the notary issues for it.

View as Markdown

This page signs a payload with a notary and reads the credential behind the signature. You need a running notary; to deploy one, follow Linux, macOS or Windows.

The packages turn auto-registration on, so the first two steps below are optional there. They are shown because they are what happens under the hood, and what you do when auto-registration is off.

1. Check the notary

sh
curl -s http://127.0.0.1:8066/v1/isReady
json
{"status":"ready","state":"READY"}

503 pending means the daemon has not produced its own identity credential yet; the platform’s install page says what to check.

2. Register a binary

Registering tells the notary to mint, or load, the key for a binary’s content hash and to start watching for processes that exec it. Register bash, the shell the rest of this page signs from:

sh
sudo eqty-notaryctl register --path /usr/bin/bash
text
Registered new binary 3f0c…
  path:  /usr/bin/bash
  inode: 1234567
  did:   did:key:zDnae…
  key:   02…

A second run prints Loaded existing key for binary … instead.

sh
curl -s --unix-socket /var/run/eqty-notary/eqty-notary.sock -X POST http://x/v1/registrations \
  -H 'content-type: application/json' \
  -d '{"binary_path":"/usr/bin/bash"}' | jq
json
{
  "binary_hash": "3f0c…",
  "binary_path": "/usr/bin/bash",
  "inode": 1234567,
  "did": "did:key:zDnae…",
  "public_key": "02…",
  "key_reused": false
}

The hostname in the URL is ignored over the Unix socket; it only has to parse.

Registration is idempotent. Registering the same binary again returns the same key with key_reused: true.

3. Run it and sign

Only a process that exec’d the binary after the registration is tracked. A shell that was already open when you registered bash is invisible to the observer, so start a fresh one:

sh
bash -c '
  DATA=$(printf hello | xxd -p)
  curl -s -X POST http://127.0.0.1:8066/v1/sign \
       -H "content-type: application/json" \
       -d "{\"data\":\"$DATA\"}"
'
json
{
  "status": "ok",
  "signature": "<hex r||s, 64 bytes>",
  "public_key": "02…",
  "did": "did:key:zDnae…",
  "binary_hash": "3f0c…"
}

data is the hex-encoded payload. The notary hashes it with SHA-256 and signs the digest with P-256 ECDSA. The signature is raw r||s, 64 bytes, not DER.

The same curl from your original shell returns 403 caller pid not tracked. That is the property the notary exists for: the signature came from a process the kernel saw exec bash, and nothing else can obtain one under that DID.

4. See who is tracked

sh
curl -s http://127.0.0.1:8066/v1/processes | jq
json
{
  "processes": [
    { "pid": 12345, "unique_tag": 987654, "binary_hash": "3f0c…",
      "did": "did:key:zDnae…", "log_path": "/var/log/eqty-notary/pid-12345-987654.jsonl" }
  ]
}

The log_path is that process’s audit log: one JSON line per exec, open, close, fork and exit the kernel reported for it.

5. Read the credential

From inside a tracked process, /v1/credential returns a manifest holding the notary’s own identity credential and the credential issued for the caller’s key:

sh
bash -c 'curl -s http://127.0.0.1:8066/v1/credential' > manifest.json
jq ".statements[].type" manifest.json

The process credential records the binary’s digests, the command line it was invoked with, its working directory and its user. The identity credential carries the TPM quote and its evidence inline, so the document stands on its own. Open it in the Lineage Explorer, or verify it offline; see Credentials.

Next