CarolineDocs

Run an installation / When something is down

When something is down

Caroline fails closed. When a part cannot be sure, it refuses rather than guesses, and it never lets a change land without its record. Here is what each part does when another is down, slow or restarting.

At a glance

DownDecisionsChanges
The engine or the PDPrefused gateways get 503 or no answer, and forward nothing, unless their connection lets calls through (below)can be saved; reach the engine when it is back
The backendgo on from the rules, directory and keys the engine and PDP hold; stop after 15 minutes without a fresh directorynone: the console and API are down
Distribution (OPAL)go on from what the engine holds; the same 15-minute limitsaved, but reach the engine only when it is back
The rules' history (git)go onrefused; nothing half-saved
The ledger's diskgo on recorded once it is back, within limits (below)refused (503 ledger_unavailable), except suspending an agent and revoking a key
The key storego on with the key list the PDP holdsno key can be issued or revoked until it is back

Why decisions stop after 15 minutes

Suspensions, removals and computed dates (an access that expired today, an embargo that lifted) reach the engine with the directory. An engine that has not had a whole directory for 15 minutes cannot know them, so it reports itself not ready and the PDP refuses. That is a choice: a stale yes is worse than a no.

What the ledger can lose

Watch the ledger's metrics (The decision ledger).

Restarts

RestartedWhat you notice
Backendeveryone is signed out; the rogue-agent flags are rebuilt from the ledger; a change waiting for a countersign keeps waiting, and one a restart cut off is settled against the ledger and git; a connector that holds the credential takes the person from the agent's key, if an older version left it otherwise (recorded)
PDPthe Decisions page's recent list empties (the ledger keeps everything); approvals issued before the restart are refused, so a used one can never be replayed
Engineit reloads the rules, the directory and its modules, and answers once it holds them

Rolled back

Rolled backWhat you notice
The PDP, below 0.10.1gateways that take the person from the agent's key are cut off, and every key issued for a person is refused
The backend, below 0.50.2keys issued for a person can be neither listed nor revoked; connections' tools are no longer Caroline's, and connectors keep the tools they hold; a connector that holds the credential may be left not taking the person from the key until this version starts again

Roll out the PDP first, then the web app, then the backend.

Two writers at once

What your gateway should do

Treat anything but "decision": true in a 200 as no. Set a deadline on the whole evaluation (2 seconds is a good start), retry a 503 or a lost connection at most once, and never cache an answer. Run the PDP's route close to your gateway. See Fail closed.

A connection declares what its connector does when Caroline gives no answer: follows the last mode (refuses after an enforce answer, lets the call through after an observe answer), refuses, or lets the call through. The card on Keys says Lets calls through when Caroline is down when that is so.

Caroline DocsAuthZEN 1.0 · OPA