Skip to content

Commit e4e4967

Browse files
committed
update authentik integration (advanced option)
1 parent c0c25ee commit e4e4967

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

docs/integrations/authentik/authentik.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This guide will show you how to use **Secured Signal API** as an Authenticator i
1212

1313
First you need to create the SMS Authenticator Setup Stage.
1414

15+
Go to `Flows and Stages > Stage > Create`.
16+
1517
![Stage 1](/integrations/authentik/stage_1.png)
1618

1719
Then you need to fill in your **API TOKEN** and your **sender number** (make sure to use the `Generic` Provider).
@@ -21,6 +23,8 @@ Point the **API URL** to your Secured Signal API `/v2/send` endpoint.
2123

2224
### 2. Flow
2325

26+
Go to `Flows and Stages > Flows > Create`.
27+
2428
After you have created the stage you need to use it in a setup flow.
2529
Create one like in the screenshot below.
2630

@@ -34,14 +38,59 @@ Once you've done that you will have to bind the previously created stage to the
3438

3539
### 3. Webhook Mapping
3640

37-
Now we have to create a custom **Webhook Mapping**:
41+
Now we have to create a custom **Webhook Mapping**.
42+
43+
Go to `Customization > Property Mappings > Create`.
44+
And select `Webhook Mapping`.
45+
46+
#### Simple
3847

3948
![Webhook Mapping](/integrations/authentik/mapping.png)
4049

50+
#### Advanced
51+
52+
For advanced setups or if you want to manage message content with Secured Signal API you may use this Webhook Mapping instead.
53+
54+
<details>
55+
<summary>Click to see screenshot</summary>
56+
57+
![Advanced Webhook Mapping](/integrations/authentik/advanced-mapping.png)
58+
59+
</details>
60+
61+
```python
62+
return {
63+
"recipients": [device.phone_number],
64+
"token": f"{token}",
65+
"number": f"stage.from_number}"
66+
}
67+
```
68+
69+
> [!TIP]
70+
> Take a look at authentiks [expression documentation](https://next.goauthentik.io/add-secure-apps/providers/property-mappings/expression) for all of the available variables.
71+
72+
Since you have decided to go the advanced way, you will have to use [**Message Templates**](../configuration/message-templates), here is an example:
73+
74+
```yaml
75+
settings:
76+
message:
77+
template: |
78+
**Your Verification Code**
79+
80+
Use the verification code below to complete your sign-in:
81+
82+
{{ @token }}
83+
84+
This code expires in 5 minutes⏱️.
85+
If you didn’t request it, you can ignore this message.
86+
```
87+
4188
### 4. Enable SMS-Verification
4289
4390
To be able to use the newly created authenticator you need to enable **SMS-based Authenticators** in `default-authentication-mfa-validation`.
4491

92+
Go to `Flows and Stages > Stages` and edit the `default-authentication-mfa-validation` stage.
93+
4594
![MFA Settings](/integrations/authentik/mfa_stage.png)
4695

4796
Check `SMS-based Authenticators` and add your `signal-authentication-setup` stage.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
settings:
2+
message:
3+
template: |
4+
**Your Verification Code**
5+
6+
Use the verification code below to complete your sign-in:
7+
8+
{{ @token }}
9+
10+
This code expires in 5 minutes⏱️.
11+
If you didn’t request it, you can ignore this message.
46.7 KB
Loading

0 commit comments

Comments
 (0)