You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/includes/guides/account-configurations/login-security/sift-fraud-detection.md
+90-16Lines changed: 90 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,85 @@ This guide explains how you can integrate Sift fraud detection to prevent fraudu
8
8
9
9
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.
10
10
11
-
## Integrate Sift with Asgardeo
11
+
## Configure Fraud Detection with Sift in Asgardeo
12
12
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.
14
14
15
15
1. On the Asgardeo Console, go to **Login and Registration**.
16
16
2. Under **Login Security**, select **Fraud Detection**.
17
-
3. Enter the API key for the Sift platform and click **Update**.
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.
|**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
20
90
21
91
!!! note "Before you begin"
22
92
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:
25
95
26
96
1. On the Asgardeo Console, go to **Applciations**.
27
97
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).
29
99
30
100
!!! note
31
101
@@ -34,7 +104,7 @@ To enable Sift fraud detection:
34
104
35
105
4. Click **update** to save the changes.
36
106
37
-
## Conditional Authentication Functions
107
+
## Conditional Authentication Functions
38
108
39
109
{{product_name}} offers the following Sift-related functions that can be utilized in your conditional authentication scripts, enabling seamless integration with user login flows.
40
110
@@ -43,18 +113,18 @@ To enable Sift fraud detection:
43
113
- 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.
44
114
- If an error occurs due to an invalid API key, network issue or a Sift server issue, this function returns a value of -1.
45
115
- 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.
49
119
50
120
**`getSiftWorkflowDecision()`**
51
121
52
122
- 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.
53
123
- If an error occurs due to an invalid API key, network issue or a Sift server issue, this function returns a null value.
54
124
- 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.
58
128
59
129
**`publishLoginEventInfoToSift`**
60
130
@@ -89,14 +159,17 @@ var additionalParams = {
89
159
}
90
160
```
91
161
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.
93
165
94
-
### Workflow Based
166
+
####Workflow Based
95
167
96
168
Workflows can be configured in the Sift console to define the decisions to be made based on various parameters, including the risk score.
97
169
The getSiftWorkflowDecision function returns the decision ID configured in the Sift console.
98
170
99
171
The following example conditional authentication script is for a scenario where,
172
+
100
173
- The authentication fails if the decision id is "session_looks_bad_account_takeover".
101
174
- Prompts for additional authentication if the decision id is "mfa_account_takeover".
102
175
- Publishes a login fail event to Sift, if authentication fails.
@@ -132,9 +205,10 @@ var onLoginRequest = function (context) {
132
205
};
133
206
```
134
207
135
-
### Risk Score Based
208
+
####Risk Score Based
136
209
137
210
The following example conditional authentication script is for a scenario where,
211
+
138
212
- The authentication fails if the risk score exceeds 0.7.
139
213
- Prompts for additional authentication if the risk score is between 0.5 and 0.7.
140
214
- Publishes a login fail event to Sift, if authentication fails.
@@ -168,4 +242,4 @@ var onLoginRequest = function (context) {
0 commit comments