Wiring up the security gate

The runnable companion to the security chapter's "wiring up the gate": the page's own governance XML, parsed into a SharedSecurityGate and handed to a real runtime.

What it shows

  • governance.xml is copied verbatim from the chapter — encrypt everything on domain 0.
  • The gate is built from that XML plus an AesGcmCryptoPlugin, and RuntimeConfig.security is set before the runtime starts.
  • RuntimeConfig.security only exists when zerodds-dcps is built with the security feature; the example's manifest enables it directly, so no extra flags are needed.

Build and run

cargo run

Output

security-governance-gate: DcpsRuntime started on domain 0 with the SharedSecurityGate wired

Taken verbatim from the example's own README.

See also

Das Security-Gate verdrahten

Der lauffähige Begleiter zu „das Gate verdrahten“ aus dem Security-Kapitel: das Governance-XML der Seite selbst, in ein SharedSecurityGate geparst und einer echten Runtime übergeben.

Was es zeigt

  • governance.xml ist wörtlich aus dem Kapitel übernommen — auf Domain 0 wird alles verschlüsselt.
  • Das Gate entsteht aus diesem XML plus einem AesGcmCryptoPlugin, und RuntimeConfig.security wird vor dem Start der Runtime gesetzt.
  • RuntimeConfig.security existiert nur, wenn zerodds-dcps mit dem Feature security gebaut ist; das Manifest des Beispiels schaltet es direkt ein, also sind keine zusätzlichen Flags nötig.

Bauen und ausführen

cargo run

Ausgabe

security-governance-gate: DcpsRuntime started on domain 0 with the SharedSecurityGate wired

Wörtlich aus dem README des Beispiels übernommen.

Verwandt