Sitekeys and secrets
Every site has two credentials, and they go to opposite places.
The sitekey
Section titled “The sitekey”Public. It sits in your markup, on the widget’s container, and it is what the loader hands Goust to ask for a challenge. Anybody can read it, and that is fine: it identifies the site and grants nothing on its own. Only your secret can redeem the tokens it leads to.
A sitekey is gk_ followed by 34 characters. It is minted when the site is
created, and it cannot be chosen: its last characters are a tag only Goust can
compute, so a made-up sitekey is refused before anything is looked up.
The secret
Section titled “The secret”Private. It goes with the token to /siteverify, from your server. Read it from
your environment; a page that held it would leak it, and a repository that held
it would leak it to more people.
GOUST_SECRET=gs_… # in your server's environment, never in a page
Goust keeps a one-way hash of the secret and nothing else. The plaintext exists in exactly one HTTP response — the one that generated it — and can never be read back, by you or by us.
Rotating the secret
Section titled “Rotating the secret”Generate a new one from the site’s page on the dashboard. The previous secret stops working the moment the new one is issued, so update your environment first where you can, and expect a short window of refusals where you cannot.
Losing a secret is the same operation: generate another, and the lost one is dead.