Repository navigation
Commit 90f7188
committed
fix(providers): validate L7 endpoint constraints in profile lint
Profile lint (openshell provider profile lint) only validated host and
port on endpoints, ignoring L7 fields like protocol, access, rules, and
deny_rules. This meant profiles could pass lint but fail at sandbox
startup with errors such as "protocol requires rules or access to define
allowed traffic."
Add L7 semantic checks to validate_profile_set() in the providers crate,
matching the runtime validation logic in validate_l7_policies(). The new
checks cover:
- Unknown protocol values
- Protocol requiring rules or access
- Mutual exclusion of rules and access
- JSON-RPC family restrictions (no access presets, requires explicit rules)
- MCP protocol requiring rules when allow_all_known_mcp_methods is false
- Empty rules lists (would deny all traffic)
- Deny rules requiring protocol and base allow set
- Warnings for protocol-specific fields on wrong protocol
Fixes NVIDIA#1714
Signed-off-by: Grace Smith <[email protected]>1 parent e3d26dd commit 90f7188
1 file changed
Lines changed: 472 additions & 25 deletions
0 commit comments