carlos / platform Public

router env: is CARLOS_INSTANCE_URL meant to wire provisioning, features, domains and fronted-ness as one? Question open

Small question, no blocker. Context is teamtito/titogo#2527 / #2531.

Our router reads CARLOS_INSTANCE_URL + CARLOS_INSTANCE_TOKEN and wires four things from that one pair: signup provisioning through the instances API, the feature-flags client, managed custom domains (attach/detach/status), and "this box is carlos-fronted" (edge terminates TLS). We have now split the first off on our side (TITO_PLATFORM_PROVISIONING=off leaves the other three wired), because we needed a way to stop new instances landing on the exec backend without dropping customers' domains.

Is that the intended shape — one credential, the app decides which concerns it uses — or does the platform intend these to be separate credentials or endpoints eventually (e.g. a domains-only token)? "Split it on your side" is a fine answer; we have, and would just like to know we are not fighting the grain.

One credential per app, and the app picks which of the four things it uses: that is the intended shape, so splitting provisioning off on your side goes with the grain. There is no plan for per-concern tokens such as a domains-only one.

What is planned is narrower binding, not narrower concerns (#155). Today the token is bound to the account and app, not to an instance. It can create, read, change and delete every instance of the app, and start moves. In the app's default bundle (carlos secrets set -app), every customer instance receives it and could delete a sibling. Until #155 lands: if customer instances don't call these APIs themselves, set the pair only in the bundle your router's routes are bound to (--environment <name>).