Description
Config-time security checks (failure_mode: open, request
conditions, SkipTo bypass) still match filter names against a
hardcoded SECURITY_FILTERS list in
filter/src/pipeline/checks.rs.
SecurityClass already exists on the registry. Builtins are
registered with register_http_security. Out-of-tree filters can
opt in with register_with_class(..., SecurityClass::Security).
The checks ignore that class, so a custom security filter is not
covered even when it is marked Security.
Make the registry class the source of truth and remove
SECURITY_FILTERS. Core must not list downstream filter names.
Tests
Keep existing builtin cases. Add:
- Custom filter,
SecurityClass::Security, failure_mode: open
→ validation error.
- Same filter with
allow_open_security_filters → no error.
- Custom filter,
SecurityClass::Standard, failure_mode: open
→ no error.
- Custom Security-class filter with request conditions → error.
- SkipTo that jumps over a custom Security-class filter → error.
Motivation
A security filter with failure_mode: open skips the check on
timeout or other FilterError and forwards the request. Core
already refuses that for builtins. Out-of-tree filters (praxis-ai
credential_inject, later ai_guardrails) can register as
Security and still get no config-time warning.
Direction agreed in
discussion #1044:
honor SecurityClass in the checks; do not privilege core names
over external ones.
Acceptance criteria
Description
Config-time security checks (
failure_mode: open, requestconditions, SkipTo bypass) still match filter names against a
hardcoded
SECURITY_FILTERSlist infilter/src/pipeline/checks.rs.SecurityClassalready exists on the registry. Builtins areregistered with
register_http_security. Out-of-tree filters canopt in with
register_with_class(..., SecurityClass::Security).The checks ignore that class, so a custom security filter is not
covered even when it is marked Security.
Make the registry class the source of truth and remove
SECURITY_FILTERS. Core must not list downstream filter names.Tests
Keep existing builtin cases. Add:
SecurityClass::Security,failure_mode: open→ validation error.
allow_open_security_filters→ no error.SecurityClass::Standard,failure_mode: open→ no error.
Motivation
A security filter with
failure_mode: openskips the check ontimeout or other
FilterErrorand forwards the request. Corealready refuses that for builtins. Out-of-tree filters (praxis-ai
credential_inject, laterai_guardrails) can register asSecurity and still get no config-time warning.
Direction agreed in
discussion #1044:
honor
SecurityClassin the checks; do not privilege core namesover external ones.
Acceptance criteria
SecurityClass/is_security,not a name list.
SECURITY_FILTERSis gone.conditions, SkipTo).
builtin name list.