Skip to content

Commit 49e7318

Browse files
authored
chore: add Field Policies to docs (#96)
1 parent 7cee659 commit 49e7318

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Field Policies
3+
---
4+
5+
# Field Policies
6+
7+
An extra layer of security for ensuring no unwanted values are passed through a request.
8+
9+
**Field Policies** allow for blocking or specifically allowing certain fields with set values from being used in the requests body or headers.
10+
11+
Configure them by using `access.fieldPolicies` like so:
12+
13+
```yaml
14+
settings:
15+
access:
16+
fieldPolicies:
17+
"@number": { value: "+123400002", action: block }
18+
```
19+
20+
Set the wanted action on encounter, available options are `block` and `allow`.
21+
22+
> [!IMPORTANT]
23+
> Use `@` for Body Keys and `#` for Headers ([formatting](../usage/formatting)).

docs/features/features.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ Go hand in hand for restricting unauthorized access and for ensuring least privi
6262
[Let's start blocking then!](./configuration/endpoints)
6363

6464
---
65+
66+
## Field Policies
67+
68+
**Field Policies** are a great way to disallow specific fields or even disallowing fields with unwanted values.
69+
This is really helpful when trying to block certain numbers from using certain tokens, and therefor mitigating risks of unwanted use of an token.
70+
71+
Find more about this feature [here](./configuration/field-policies).
72+
73+
---

docs/usage/formatting.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ Which means that any valid Go template string will also work in Secured Signal A
1818
1919
But you will mostly be using `{{.VAR}}`.
2020

21+
### Keys
22+
23+
`{{.VAR}}` might be the most common, but there is also `{{@data.key}}` (Body Keys) and `{{#Content_Type}}` (Headers), that can be used,
24+
when using any of these keys make sure that you understand how each key will be parsed and transformed:
25+
26+
| Type | Example | Note |
27+
| :------------------------------------- | :------------------ | :--------------- |
28+
| Body | `{{@data.key}}` | |
29+
| Header | `{{#Content_Type}}` | `-` becomes `_` |
30+
| [Variable](../configuration/variables) | `{{.VAR}}` | always uppercase |
31+
2132
## String to Type
2233

2334
> [!TIP]

0 commit comments

Comments
 (0)