EQTY LabDocs

Sign with the EQTY SDK

Point the EQTY SDK at a Desktop Notary so a Python program's statements are signed with a key bound to the Python binary, and export the manifest.

View as Markdown

The EQTY SDK signs lineage statements through a notary. Against a Desktop Notary, the key it signs with is bound to the interpreter that is running: python3 on Linux and macOS, python.exe on Windows. The manifest the SDK exports carries the notary’s identity credential and the process credential for that interpreter, so a reader can walk from each statement back to the hardware.

You need a running notary with auto-registration on, which the packages set, or the Python executable registered; see the Quick Start.

1. Install the SDK

sh
python3 -m venv ~/sdk
~/sdk/bin/pip install --upgrade eqty-sdk

The notary has been tested with eqty-sdk 2.5.0; /get_dids includes the registeredBy field that release requires.

2. Run the smoke test

The repository’s tests/sdk_smoke.py checks caller DID attribution and creates a signed dataset registration through the SDK:

sh
~/sdk/bin/python tests/sdk_smoke.py --url http://127.0.0.1:8066 --export smoke-manifest.json
text
PASS eqty-sdk 2.5.0: caller DID and dataset registration

Run it on the notary’s host. Attribution maps the connection to a local process, so it does not work through SSH port forwarding or from another machine.

3. Sign from your own program

The SDK’s vcomp_notary signer takes the notary URL. This is what the smoke test does, reduced to the essentials:

python
from eqty_sdk import Dataset, Signer, init, set_active_signer

context = init().set_store_all_blobs(True).get_default_context()
signer = Signer.vcomp_notary("http://127.0.0.1:8066", name="my-program")
set_active_signer(signer)

Dataset.from_object({"result": 42})        # signed with this process's key
context.export("manifest.json")

signer.did_key is the DID the notary minted for the running interpreter; it equals the did in GET /v1/public_key when called from the same process. The SDK fetches the notary’s identity credential and the process credential through /v1/credential and includes them in the export.

Inside a container, use the well-known address http://100.100.100.200:8066 and mount the notary’s socket directory, or run on a host where the notary accepts callers from other network namespaces. See Signing from Containers.

4. Read the manifest

sh
jq '.statements[] | .type' manifest.json

The statements include a CredentialRegistration for the notary’s identity, one for the Python process, and the SDK’s DataRegistration, ComputationRegistration and MetadataRegistration statements, each registeredBy the process key. Open the file in the Lineage Explorer, or run the eqty-manifest verifier over it. See Credentials.

What identifies the program

The notary identifies the interpreter, not the script. Two Python programs on the same host share a key and a DID; the process credential tells them apart by command line, working directory and user. An agent shipped as a single executable gets a DID of its own. For a stable identity per program, package it as its own binary.