sgit newsroom v0.1.29 · snapshot 2026-09-24

Reading room · sgit.ai · llms-full

On this page

Reading room / sgit.ai / llms-full.txt · section 218 of 358

Authentication

Six headers exist. Which apply depends on the endpoint and on how the server is deployed. None of them is a password, and none of them is stored: the server keeps SHA-256 hashes and compares.

The headers

HeaderWhat it gates
x-sgraph-access-tokenThe SGraph account or deployment. In a single-key self-hosted deployment this gates every route, including reads
x-sgraph-vault-write-keyVault write capability: writes, deletes, destroy, and append configure / purge
x-sgraph-vault-enum-keyAppend lane enumeration: list, fetch, mark-processed
x-vault-read-keyRead key, for public-vault routing
x-vault-publicPublic-vault routing flag
x-sgraph-transfer-delete-authTransfer deletion ↗, SG/Send transfers, not vaults. Carries the secret, never the hash, and only works if a delete_auth_hash was set at create time

One capability is not a header: append_token travels in the request body of /append/write. That is deliberate, see append lanes ↗.

The hash-comparison model

The server never stores a capability key. It stores SHA-256(key) and, on each request, hashes what you presented and compares. Two consequences worth designing around:

Why reads are open by default

GET /api/vault/read/{vault_id}/{file_id} requires no authentication on the shared host, which surprises people. It follows from the encryption model rather than being a gap in it: the bytes are AES-256-GCM ciphertext under a key the server has never seen, and the file IDs are HMAC-derived opaque identifiers that reveal no filename. Serving them to an anonymous caller discloses nothing a reader could use.

It is also the property that makes a published read key↗ work at all, and what lets vault content sit behind an ordinary CDN. If that trade is wrong for your deployment, run in single-key mode, where the access token gates reads too.

What an unauthenticated reader can learn is covered honestly on the security page↗: object sizes, timing, and approximate activity volume.

See also