A secret exists once
A key is hashed with SHA-256 before storage and shown a single time. A copy of the database carries nothing worth stealing.
Een afgebakende, geversioneerde API voor wat we later willen scripten.
Growth-OS kan API-sleutels uitgeven met scopes, limieten per minuut en geversioneerde endpoints. Er is vandaag één endpoint gepubliceerd, voor projecten, en niets in ons dagelijks werk hangt ervan af. Het staat er zodat een script of een ander intern hulpmiddel later koppelen een instelling is in plaats van een project op zich.
Productvoorbeeld
Dit is hetzelfde visuele component als in de ingelogde applicatie, met voorspelbare voorbeelddata.
The real API key, quickstart, endpoint and delivery views, side by side.
Inerte voorbeelddata · geen netwerktoegang
Voorbeeld gereed
Kernpunten
A key is hashed with SHA-256 before storage and shown a single time. A copy of the database carries nothing worth stealing.
The key, its scope and its per-minute allowance are verified before a request reaches feature code.
Each endpoint registers its version, stability and retirement dates, so changing it is a decision rather than a surprise for whatever depends on it.
Zonder een gedeelde basis bouwt elk team deze randgevallen opnieuw, en anders.
A hand-rolled key table usually stores the secret itself. One copied backup and every key is compromised at once. Storing only a hash means there is nothing there to leak.
An endpoint ships with no version, something starts depending on every field in the response, and now every change is a breaking change. Declared versions and retirement dates keep that conversation possible.
A script with a bug hammers the API and everything else slows down. Adding limits to a live API afterwards is painful, so keys carry a per-minute allowance from the first request.
Het mechanisme van begin tot eind, zoals het in de repository is geïmplementeerd.
An admin creates a key
The secret is generated on the server, hashed and shown once. If it is lost you revoke and reissue; reading it back is deliberately impossible.
Endpoints declare their contract
Each route registers its version, request and response shapes, and rate-limit key before it ships, so compatibility is written down rather than remembered.
Requests pass three gates
The server verifies the key, checks its scope and reserves rate-limit quota. Only then does the handler touch data.
Keys retire rather than vanish
Revoking stamps a timestamp instead of deleting the row. The key stops working immediately and the history of what it did survives.
Technische garanties
De sleutel in het voorbeeld is nep en geeft nergens toegang. Echte geheimen worden alleen binnen ingelogde adminopdrachten aangemaakt, en test- en live-sleutels zijn gescheiden door hun prefix, zodat de een nooit in plaats van de ander kan worden gebruikt.
De grens hierboven is geen claim maar code. Deze bestanden dragen het contract:
src/features/developer-platform/server.tssrc/server/api-key-auth.tssrc/registries/api-lifecycle.tssrc/routes/api/v1/projects.tsDeze functies delen contracten en grenzen met deze pagina.
De documentatie beschrijft dezelfde contracten die deze pagina demonstreert.