Gomry Cloud authenticates machines with API keys, sent as a bearer token. There is no session, no OAuth flow and no browser-facing credential — a Cloud key is a server-side secret.
Sending a key
Never put a Cloud key in browser JavaScript, a mobile app, or anything else you ship to a user. The data plane sends no CORS headers, deliberately — a key that a browser can read is a key anyone can spend.
A key is the gck_live_ prefix plus 32 random bytes. There is one kind of key: it does the work and bills for it. Spend is bounded by the project’s monthly budget cap, not by the credential.
gck_test_ keys are retired. They ran the real request against the real upstream and were simply not invoiced, which made “test” a promise of a sandbox that never existed. Existing ones no longer authenticate — mint a replacement in the console.
We store only a SHA-256 hash of the key. The plaintext is returned once, at mint time, and cannot be recovered — if it is lost, revoke it and mint another. The console shows a key by its prefix and last four characters, which is enough to tell two keys apart and useless to anyone who steals the display.
Scopes
A scope names exactly one operation a key may perform, in the form service:action. A key carries the scopes you grant it and nothing else.
Scopes are flat: there are no wildcards, and scrape:run does not imply scrape:fetch. They are separately priced operations, so they are separately granted — a key minted for a cheap fetch loop must not be able to spend four times the rate on extractions.
Two independent checks
A request is authorized by two separate facts, and both must hold. They fail with different codes so you can tell them apart without guessing.
Keeping them separate is what stops each from silently widening the other: enabling an API must not grant new power to keys that already exist, and a broadly scoped key must not reach an API the project never turned on.
Rotation and revocation
Revocation takes effect on the next request — there is no cache of authorization decisions to wait out. To rotate without downtime, mint the new key, deploy it, then revoke the old one. A key can also be given an expiry at mint time, which is the better default for anything handed to a third party.