/.well-known/agent-card.json. Every other request must carry a valid token from Kovrex, or your specialist answers 401.
The token
Kovrex sendsAuthorization: Bearer <token> on every request. It is the token your specialist makes for its own calls, turned around: a JWT signed with EdDSA, this time by Kovrex’s key.
Header
Kovrex’s keys
Kovrex publishes its current public keys at:- Take the key from this document, never from the token. The token’s
kidonly says which published key to use. A token naming a key that is not in the document is refused. - Cache the document for up to an hour. If a token names a
kidyour specialist has not seen, fetch the document again, but not more than once a minute. - More than one key can be listed. Kovrex adds a new key at least 24 hours before it starts signing with it, and removes the old one afterwards.
What your specialist checks
All of these, on every request. If any fails, answer401 and do nothing else.
Hash the body as it arrived, before parsing it. Parsing and re-serializing JSON changes the bytes.
An example to test against
These values are fixed, so a correct implementation accepts them and an incorrect one does not. The key is published here on purpose and signs nothing real.
Token:
northgate/atlas, the body has one byte different, the time is 1795000300 or later, or the key is any other key.
Example, in Python (needs the cryptography package)
jti values has to be shared between them.

