Skip to content

Commit 8d374cd

Browse files
Merge pull request #5948 from ZiyamSanthosh/sift-docs
Add sift v2 documentation
2 parents f3c40c5 + 4f8b13a commit 8d374cd

2 files changed

Lines changed: 90 additions & 16 deletions

File tree

206 KB
Loading

en/includes/guides/account-configurations/login-security/sift-fraud-detection.md

Lines changed: 90 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,85 @@ This guide explains how you can integrate Sift fraud detection to prevent fraudu
88

99
You need to have an already configured Sift environment and have access to the Sift console. Reach out to [Sift](https://sift.com/contact-us){target="_blank"} to get started.
1010

11-
## Integrate Sift with Asgardeo
11+
## Configure Fraud Detection with Sift in Asgardeo
1212

13-
Follow the steps below to register Sift in Asgardeo.
13+
Fraud detection and Sift integration related configurations can be accessed by navigating as follows.
1414

1515
1. On the Asgardeo Console, go to **Login and Registration**.
1616
2. Under **Login Security**, select **Fraud Detection**.
17-
3. Enter the API key for the Sift platform and click **Update**.
1817

19-
## Enable Sift fraud detection in applications
18+
![Configure fraud detection with Sift]({{base_path}}/assets/img/guides/account-configurations/fraud-detection.png){: width="600" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
19+
20+
### Configure Sift API key
21+
22+
After navigating to **Fraud Detection** section, provide the **Sift API key** retrived from your Sift platform and click **Update**.
23+
24+
### Configure Fraud Detection related configurations
25+
26+
Asgardeo provides options to modify the event payloads sent to the Fraud Detection integration based on the requirements.
27+
28+
#### Information to be included in the event payload
29+
30+
1. Enable the `Include user profile information in the event payload` option to include user profile information such as `email`, `mobile`, and `name` in the event payload sent to Sift.
31+
2. Enable the `Include user device metadata in the event payload` option to include user device metadata such as `IP address` and `User Agent` in the event payload sent to Sift.
32+
33+
#### Events to Publish
34+
35+
Following are the events that can be published to Sift for fraud detection.
36+
37+
1. **Registrations** - Enable this option to publish user registration events to Sift.
38+
2. **Credential Updates** - Enable this option to publish user credential update events to Sift.
39+
3. **User Profile Updates** - Enable this option to publish user profile update events to Sift.
40+
4. **Logins** - Enable this option to publish user login events to Sift.
41+
5. **Logouts** - Enable this option to publish user logout events to Sift.
42+
6. **User Verifications** - Enable this option to publish notification based user verification events to Sift.
43+
44+
!!! note
45+
User Self Registration and Password Reset related Sift events are only publishing with legacy self registration and
46+
password recovery flows.
47+
48+
#### Diagnostic Logging
49+
50+
Enable the `Log event payloads locally` option to log the event payloads sent to the Sift as diagnostic logs in Asgardeo.
51+
52+
## Fraud Detection invoking mechanisms
53+
54+
Asgardeo allows you to invoke Sift fraud detection through the following mechanisms.
55+
56+
- **Event Publishing** - Event Publishing approach allows to publish other user events such as registration, credential update, profile update, logout, and user verification events to Sift for fraud detection.
57+
- **Conditional Authentication** - You can use Sift fraud detection in your conditional authentication scripts to make authentication decisions based on the risk score or workflow decision returned by Sift.
58+
59+
### Sift Fraud Detection through Event Publishing
60+
61+
Asgardeo allows you to publish various user events to **Sift** for fraud detection using its **Event Publishing** mechanism. Once the fraud detection configurations are set up, the relevant events will be automatically published to Sift — no additional configuration steps are required.
62+
63+
#### User Data Published to Sift
64+
65+
Sift requires specific user information to perform fraud analysis. The following user attributes are included in the event payload. These fields can be selectively enabled or disabled through the Fraud Detection configuration.
66+
67+
##### User Information
68+
69+
| User Information | Description |
70+
|------------------|------------------------------------------------------------------------------------------------------|
71+
| **Email** | The user's registered email address. |
72+
| **Mobile** | The user's mobile phone number. (Mobile numbers will be published only if they are in E.164 format.) |
73+
| **Name** | The user's full name.<br/>If the full name is not available, the first or last name will be used. |
74+
75+
!!! Important
76+
The value published for the `$user_id` property is not the actual user UUID stored in the system.
77+
By default, the event payload includes a hashed value of the username as the `$user_id`.
78+
To uniquely identify users, the actual user UUID is published separately in the event payload under the
79+
`user_uuid` field. Therefore, you should use the `user_uuid` field in Sift to reliably and uniquely identify users
80+
in your system.
81+
82+
##### User Browser and Device Metadata
83+
84+
| Metadata | Description |
85+
|----------------|-----------------------------------------------------------------------------|
86+
| **IP Address** | The user's IP address at the time of the event. |
87+
| **User Agent** | The browser or device user agent string associated with the user's session. |
88+
89+
### Sift Fraud Detection through Conditional Authentication
2090

2191
!!! note "Before you begin"
2292
You need to [register an application with Asgardeo]({{base_path}}/guides/applications/). You can register your own application or use one of the [sample applications]({{base_path}}/get-started/try-samples/) provided.
@@ -25,7 +95,7 @@ To enable Sift fraud detection:
2595

2696
1. On the Asgardeo Console, go to **Applciations**.
2797
2. Go to the **Login Flow** tab of the application and enable **Conditional Authentication**.
28-
3. Add a conditional authentication script. Refer to the sample conditional authentication scripts [here](#sample-conditional-authentication-scripts).
98+
3. Add a conditional authentication script. Refer to the [sample conditional authentication scripts](#sample-conditional-authentication-scripts).
2999

30100
!!! note
31101

@@ -34,7 +104,7 @@ To enable Sift fraud detection:
34104

35105
4. Click **update** to save the changes.
36106

37-
## Conditional Authentication Functions
107+
## Conditional Authentication Functions
38108

39109
{{product_name}} offers the following Sift-related functions that can be utilized in your conditional authentication scripts, enabling seamless integration with user login flows.
40110

@@ -43,18 +113,18 @@ To enable Sift fraud detection:
43113
- This function returns the Sift risk score for a given login event, which is a value between 0 and 1. Higher the score, greater the risk.
44114
- If an error occurs due to an invalid API key, network issue or a Sift server issue, this function returns a value of -1.
45115
- The function takes the following arguments.
46-
- `AuthenticationContext` - current authentication context.
47-
- `LoginStatus` - Whether the user authentication was successful or not. Accepted values `LOGIN_SUCCESS`, `LOGIN_FAILED`.
48-
- `AdditionalParameters` - Any additional parameters in the form of key-value pairs that need to be sent to Sift.
116+
- `AuthenticationContext` - current authentication context.
117+
- `LoginStatus` - Whether the user authentication was successful or not. Accepted values `LOGIN_SUCCESS`, `LOGIN_FAILED`.
118+
- `AdditionalParameters` - Any additional parameters in the form of key-value pairs that need to be sent to Sift.
49119

50120
**`getSiftWorkflowDecision()`**
51121

52122
- This function returns the Sift decision ID for a given login event. The decision ID is a unique identifier for the decision selected for the login event during the workflow execution. Workflows and decisions can be configured through the Sift console.
53123
- If an error occurs due to an invalid API key, network issue or a Sift server issue, this function returns a null value.
54124
- The function takes the following arguments.
55-
- AuthenticationContext - current authentication context.
56-
- LoginStatus - Whether the user authentication was successful or not. Accepted values LOGIN_SUCCESS, LOGIN_FAILED.
57-
- AdditionalParameters - Any additional parameters can be sent to Sift.
125+
- AuthenticationContext - current authentication context.
126+
- LoginStatus - Whether the user authentication was successful or not. Accepted values LOGIN_SUCCESS, LOGIN_FAILED.
127+
- AdditionalParameters - Any additional parameters can be sent to Sift.
58128

59129
**`publishLoginEventInfoToSift`**
60130

@@ -89,14 +159,17 @@ var additionalParams = {
89159
}
90160
```
91161

92-
## Sample Conditional Authentication Scripts
162+
### Sample Conditional Authentication Scripts
163+
164+
The following are sample conditional authentication scripts for common Sift fraud detection scenarios.
93165

94-
### Workflow Based
166+
#### Workflow Based
95167

96168
Workflows can be configured in the Sift console to define the decisions to be made based on various parameters, including the risk score.
97169
The getSiftWorkflowDecision function returns the decision ID configured in the Sift console.
98170

99171
The following example conditional authentication script is for a scenario where,
172+
100173
- The authentication fails if the decision id is "session_looks_bad_account_takeover".
101174
- Prompts for additional authentication if the decision id is "mfa_account_takeover".
102175
- Publishes a login fail event to Sift, if authentication fails.
@@ -132,9 +205,10 @@ var onLoginRequest = function (context) {
132205
};
133206
```
134207

135-
### Risk Score Based
208+
#### Risk Score Based
136209

137210
The following example conditional authentication script is for a scenario where,
211+
138212
- The authentication fails if the risk score exceeds 0.7.
139213
- Prompts for additional authentication if the risk score is between 0.5 and 0.7.
140214
- Publishes a login fail event to Sift, if authentication fails.
@@ -168,4 +242,4 @@ var onLoginRequest = function (context) {
168242
}
169243
});
170244
};
171-
```
245+
```

0 commit comments

Comments
 (0)