Skip to main content

Crate encore_reqauth

Crate encore_reqauth 

Source
Expand description

The wire protocol of Encore’s service-to-service request auth: the x-encore-meta-* headers a call carries (meta), Request Context among them (reqctx), and the ENCORE1-HMAC-SHA3-256 signature over them (svcauth).

The gateway links it to sign calls on its services’ behalf, which hold no keys, and to verify the calls it receives, and so does the signing service (encore_call_signing), which signs and verifies them for gateway programs, which hold none either. The signature is also produced and checked by the old Encore.go runtime (runtimes/go), so a call either can make must sign the same. x-encore-service, which only the gateway sends, is hashed only when present.

It also holds the MAC the Encore platform signs its requests with (platform), which the gateway, or the signing service for a gateway program, verifies.

What a call’s headers mean to the service receiving it — who the caller is, its trace context — is for the service’s own code to read.

Modules§

meta
platform
Requests from the Encore platform — cron jobs, the dashboard’s API calls — and the x-encore-auth MAC it signs them with.
reqctx
Request Context on the wire (parser ADR 0014): the typed fields an app declares, which travel with a request to every call made for it.
svcauth