Skip to content
Merged
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
23 changes: 23 additions & 0 deletions docs/configuration/field-policies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Field Policies
---

# Field Policies

An extra layer of security for ensuring no unwanted values are passed through a request.

**Field Policies** allow for blocking or specifically allowing certain fields with set values from being used in the requests body or headers.

Configure them by using `access.fieldPolicies` like so:

```yaml
settings:
access:
fieldPolicies:
"@number": { value: "+123400002", action: block }
```

Set the wanted action on encounter, available options are `block` and `allow`.

> [!IMPORTANT]
> Use `@` for Body Keys and `#` for Headers ([formatting](../usage/formatting)).
9 changes: 9 additions & 0 deletions docs/features/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,12 @@ Go hand in hand for restricting unauthorized access and for ensuring least privi
[Let's start blocking then!](./configuration/endpoints)

---

## Field Policies

**Field Policies** are a great way to disallow specific fields or even disallowing fields with unwanted values.
This is really helpful when trying to block certain numbers from using certain tokens, and therefor mitigating risks of unwanted use of an token.

Find more about this feature [here](./configuration/field-policies).

---
11 changes: 11 additions & 0 deletions docs/usage/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ Which means that any valid Go template string will also work in Secured Signal A

But you will mostly be using `{{.VAR}}`.

### Keys

`{{.VAR}}` might be the most common, but there is also `{{@data.key}}` (Body Keys) and `{{#Content_Type}}` (Headers), that can be used,
when using any of these keys make sure that you understand how each key will be parsed and transformed:

| Type | Example | Note |
| :------------------------------------- | :------------------ | :--------------- |
| Body | `{{@data.key}}` | |
| Header | `{{#Content_Type}}` | `-` becomes `_` |
| [Variable](../configuration/variables) | `{{.VAR}}` | always uppercase |

## String to Type

> [!TIP]
Expand Down