Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/admin-guide/configuration/hrw4u.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,9 @@ Denied Sections
---------------

The ``sections`` list accepts any of the HRW4U section names listed in the
`Sections`_ table, plus ``VARS`` to deny the variable declaration block.
A denied section causes the entire block to be rejected; the body is not
validated.
`Sections`_ table, plus ``VARS`` and ``SESSION_VARS`` to deny the variable
declaration blocks. A denied section causes the entire block to be rejected;
the body is not validated.

Functions
---------
Expand Down Expand Up @@ -775,7 +775,7 @@ The ``language`` list accepts a fixed set of constructs:
Construct What it controls
================ ===================================================
``break`` The ``break;`` statement (early section exit)
``variables`` The entire ``VARS`` section and all variable usage
``variables`` The entire ``VARS`` and ``SESSION_VARS`` section and all variable usage
``else`` The ``else { ... }`` branch of conditionals
``elif`` The ``elif ... { ... }`` branch of conditionals
``in`` The ``in [...]`` and ``!in [...]`` set membership operators
Expand Down
3 changes: 2 additions & 1 deletion tools/hrw4u/schema/sandbox.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"READ_RESPONSE",
"SEND_RESPONSE",
"TXN_CLOSE",
"VARS"
"VARS",
"SESSION_VARS"
]
},
"uniqueItems": true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(program (programItem (section (sessionVarSection SESSION_VARS { (variables (variablesItem (variableDecl session_marked : bool ;))) }))) (programItem (section REMAP { (sectionBody (statement inbound.req.X-Marked = (value "1") ;)) })) <EOF>)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'SESSION_VARS' is denied by sandbox policy (section)
Feature denied by sandbox policy. Contact platform team.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SESSION_VARS {
session_marked: bool;
}

REMAP {
inbound.req.X-Marked = "1";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sandbox:
message: "Feature denied by sandbox policy. Contact platform team."

deny:
sections:
- SESSION_VARS