When the product is down
The product describes the offer and projects it; Otoroshi enforces it. The product is never asked,
call by call, whether a consumer may pass. What that means during an incident, and what is left
once the product is uninstalled, is checked on a real stack by test/product-down.test.js
(mise run test:e2e).
The product is down
With its servers and its databases stopped, Otoroshi keeps serving everything deployed:
- the keys of the subscriptions, the tokens checked by the derived JWT verifiers and auth modules, the certificates trusted through the derived CA certificates;
- the quotas and the rate limits of the plans: the gateway counts them on the keys;
- the data exporter keeps trying to reach the ingester; the traffic does not wait for it.
What stops with the product is the product itself: the console, the developer portal, the CLI, new subscriptions, the analytics, the drift detection.
The gateway is unreachable
The product keeps working on its side:
- the developer portal serves its catalogue and its documentation, and the console reads;
- a subscription accepted meanwhile is recorded; its projection waits in the queue, retried with a backoff, and reaches the gateway once it is back — its credentials appear then;
- the Gateway page shows the gateway unreachable and the tasks that wait.
Taking the configuration over by hand
With the product down, or gone, an Otoroshi administrator manages the configuration with Otoroshi alone, through its admin API or its backoffice:
- revoke a consumer: disable its key;
- subscribe a consumer: an
ApiSubscriptionon an apikey or oauth2-local plan, and Otoroshi mints its key from the plan; - change the offer: edit a plan of the
Api, and Otoroshi carries its quotas to the keys of its subscriptions.
While an Api carries the marker of the product (created_by: external=otoroshi-api-management),
Otoroshi takes it for an api managed as code: each write that changes what is live is a deploy,
recorded in the deployment history of the API. Remove created_by from its metadata to manage it
through Otoroshi's own draft and deploy.
Back, the product reports what was changed by hand as drift, and puts its description back on demand, by redeploying the snapshot. What was created by hand — a subscription, its key — is not the product's: it is left alone.
Uninstalling
Uninstalling the product is stopping it and dropping its two databases. The traffic needs nothing else. What stays on the gateway:
| Left on the gateway | Marked with | After uninstalling |
|---|---|---|
the Api entities | created_by, apim_api_id, deployment_ref | served; remove created_by to manage them as any Otoroshi API |
the ApiSubscriptions and their keys | id_ref (the application), apim_subscription_id | served, managed by hand |
| the derived JWT verifiers, CA certificates, auth modules, application certificates | created_by, apim_derived | referenced by the plans: keep them |
| the keys the gateway minted for the consumers of jwt, mtls, oauth2-remote and keyless plans | created_by: apikey-extractor | Otoroshi's own |
the data exporter apim_ingester_exporter | created_by: otoroshi-apim-setup | its ingester is gone: delete it |
the routes of the console and the portals, apim_setup_console, apim_setup_portals | created_by: otoroshi-apim-setup | their backend is gone: delete them |
the key of the product, apim_product_admin | created_by: otoroshi-apim-setup | an admin key with every right: delete it |
The markers left on the entities are inert: Otoroshi only reads created_by on an Api. To keep
what only the product holds — documentation, snapshots, the catalogue, the applications — export
each workspace before dropping the databases (otoroshi-apim export <ws>, see the CLI,
or Workspace settings → Export / import): the export is importable into another installation.