Running your application
Private origin
Let Scaleway refuse every request to your web container that did not come through the edge, before the container wakes for it.
Your web container has an address of its own at Scaleway (….functions.fnc.<region>.scw.cloud), and your test address points straight at it. Crawlers find both and ask them now and then. Nothing keeps a page there, so every such request wakes the container, and a container that is woken every few minutes never scales to zero. The edge secret does not help with that: your application can only refuse a request once its container is awake.
Scaleway can refuse it sooner. A container whose privacy is private is only called with a token in the X-Auth-Token header; Scaleway answers any other request with a 403 itself, and the container does not start for it.
environments:
production:
edge:
private_origin: true
It is off unless the file says so.
What a deploy does
With edge.private_origin: true, a deploy does this after the release is live, in an order that never leaves your site without a way in:
- It makes an identity in your Scaleway organisation,
brewless-<application>-<environment>-origin, that may call the private containers of the environment's own namespace and nothing else (ContainersPrivateAccess, with the conditionresource.id == "<namespace id>"), and a key for it. An identity made before 1 December 2026, which may call every private container of the project, is narrowed to its namespace by the next deploy. The secret key of that key is the token. It is kept in your own Secret Manager as<application>-<environment>-origin-token, and made once: the next deploy uses the same one. - It gives the pull zone the edge rule
brewless: origin token, which adds the token to every request the edge sends your container, and waits two minutes for the rule to reach every edge server. While the container is still public the token is simply ignored, so this changes nothing yet. - Only then it makes the web container private, and asks its health route the way the edge does, with the token. When the container keeps refusing for two minutes, it is made public again and the deploy says so: the site keeps answering, and the next deploy tries again.
A deploy whose file no longer says private_origin: true goes the other way: the web container is made public first, and only then is the rule taken off the pull zone. A deploy without a brewless.yml keeps what the last one asked. The identity and its kept key stay, so turning it on again needs no new one. Each change is written to the audit trail; the token never is. The privacy a deploy gives the container is also what Brewless expects there from then on, so the Resources page does not report it as changed at the provider.
Brewless only undoes what it did. A web container you made private yourself, without the rule at the edge, is left as it is.
What it needs
- An edge. Without a pull zone nothing would send the token; the container stays public and the deploy says why.
- A Scaleway key that may manage identities (IAMManager), as for the other identities Brewless makes. Without it the container stays public and the deploy says so.
- No mail through Scaleway. Scaleway reports what became of a mail to your web container's own address and cannot send a token along. The file is refused with
mail: scaleway, and an environment whose mail events go to the web container is not made private. Lettermint is not affected.
What changes
- Your test address stops answering. It points straight at the container, so a browser gets Scaleway's
403. Open the site on your own domain or on the address of the edge (<pull zone>.b-cdn.net) instead. The container's own address answers403too, which is the point. - Only the web container. The release and worker containers keep their own addresses and stay public: the release commands, the queue (a trigger calls the worker with
POST /) and the scheduler reach them as before. - Brewless still reaches it. Every call Brewless makes straight to a container, such as the health check of a release, adds the token when that container is private. A private web container whose token is gone is not given a new release, because it would refuse every visitor too.
- The edge's own requests, including the warm-up after a release, carry the token through the rule, as visitors' do.
How strong it is
The token lets anyone who has it call the private containers of this environment's namespace, and nothing else at Scaleway: not the private containers of another environment in the same project. Like the edge secret it sits in a rule of your pull zone, where anyone with the bunny.net key of your account can read it. The pull zone also puts the token over any X-Auth-Token a visitor sends, so a visitor cannot send one of their own through the edge.
Shield does not show the token in its event logs; see what the logs leave out.
Replacing the token
Replace it when it may have been seen by someone who should not have it: a bunny.net key that leaked, someone who left.
brewless edge:rotate-origin-token production
Scaleway lets in every key of the identity, so the token is replaced without a moment in which the edge sends one Scaleway refuses:
- mint: a new key for the identity, and its secret key as a new version of
<application>-<environment>-origin-tokenin your Secret Manager. The old key still works, and the edge still sends it. - check: the web container answers its health route with the new token. Scaleway can take a moment to know a new key; until it does, nothing moves. When it keeps refusing, the replacement stops here and the old token keeps working.
- edge: the rule at the pull zone sends the new token, and two minutes for it to reach every edge server.
- retire: the other keys of the identity are deleted, and with them the old token. The old version in your Secret Manager goes too.
No release is needed: the edge adds the token, the container does not hold it. The replacement is written to the audit trail as origin_token.rotated, with the version number and how many keys went; never a token.
To take it away at once instead, delete the keys of the identity in the Scaleway console: Scaleway then refuses the edge as well, so make the container public first.