-
Notifications
You must be signed in to change notification settings - Fork 0
fix: add EM-DELEGATE to enforcement mode docs #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,9 @@ export CAPISCIO_ENFORCEMENT_MODE=EM-OBSERVE | |
| # Deny unauthorized — PDP DENY blocks requests (fail-closed on PDP failure) | ||
| export CAPISCIO_ENFORCEMENT_MODE=EM-GUARD | ||
|
|
||
| # Best-effort obligations — DENY blocks; ALLOW obligations attempted but failures don't block | ||
| export CAPISCIO_ENFORCEMENT_MODE=EM-DELEGATE | ||
|
|
||
| # Full enforcement — unknown obligation types also cause denial | ||
| export CAPISCIO_ENFORCEMENT_MODE=EM-STRICT | ||
| ``` | ||
|
|
@@ -90,6 +93,7 @@ When the embedded PDP's policy bundle hasn't been rebuilt within the staleness t | |
| |------|-----------| | ||
| | `EM-OBSERVE` | Request proceeds; `staleness.bundle_stale` annotation in telemetry | | ||
| | `EM-GUARD` | Request proceeds; `staleness.bundle_stale` annotation in telemetry | | ||
| | `EM-DELEGATE` | Request proceeds; `staleness.bundle_stale` annotation in telemetry | | ||
| | `EM-STRICT` | Request denied with `BUNDLE_STALE` error code | | ||
|
|
||
| Configure staleness via: | ||
|
|
@@ -160,6 +164,14 @@ export CAPISCIO_ENFORCEMENT_MODE=EM-GUARD | |
|
|
||
| Now PDP DENY decisions block requests with `403 Forbidden`. If the PDP is unavailable, requests are denied with `503 Service Unavailable` (fail-closed). | ||
|
|
||
| For stricter obligation handling, use `EM-DELEGATE`: | ||
|
|
||
| ```bash | ||
| export CAPISCIO_ENFORCEMENT_MODE=EM-DELEGATE | ||
| ``` | ||
|
|
||
| In EM-DELEGATE, DENY decisions always block requests. For ALLOW decisions, all attached obligations are executed on a best-effort basis: failures are logged but do not change the ALLOW decision or block the request. | ||
|
|
||
| For full obligation enforcement, use `EM-STRICT`: | ||
|
|
||
| ```bash | ||
|
|
@@ -202,7 +214,7 @@ All PDP-related environment variables: | |
| | `CAPISCIO_EMBEDDED_PDP` | `false` | Enable embedded OPA evaluator (in-process PDP) | | ||
| | `CAPISCIO_PDP_ENDPOINT` | _(empty)_ | External PDP URL. Empty + no embedded PDP = badge-only mode | | ||
| | `CAPISCIO_PDP_TIMEOUT_MS` | `500` | External PDP query timeout in milliseconds | | ||
| | `CAPISCIO_ENFORCEMENT_MODE` | `EM-OBSERVE` | One of: `EM-OBSERVE`, `EM-GUARD`, `EM-STRICT` | | ||
| | `CAPISCIO_ENFORCEMENT_MODE` | `EM-OBSERVE` | One of: `EM-OBSERVE`, `EM-GUARD`, `EM-DELEGATE`, `EM-STRICT` | | ||
| | `CAPISCIO_WORKSPACE` | _(empty)_ | Workspace/tenant UUID (required for embedded PDP) | | ||
| | `CAPISCIO_BUNDLE_POLL_INTERVAL` | `30s` | Embedded PDP bundle rebuild interval | | ||
|
Comment on lines
+217
to
219
|
||
| | `CAPISCIO_BUNDLE_STALENESS_THRESHOLD` | `5m` | Embedded PDP bundle age before staleness warnings | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Embedded PDP “Step 3: Tighten Enforcement” code block earlier in this document still lists only
EM-OBSERVE,EM-GUARD, andEM-STRICT(noEM-DELEGATE). Since this PR addsEM-DELEGATEto the mode progression, please update that earlier Embedded PDP snippet as well to avoid conflicting guidance within the same doc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 0c2d1f4. Added
EM-DELEGATEto the Embedded PDP Step 3 code block, positioned between EM-GUARD and EM-STRICT in the enforcement mode progression.