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: README.md
+47-15Lines changed: 47 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,32 +17,32 @@ The project contains one flow: `org.gluu.agama.typekey`. When this is launched,
17
17
18
18
1. A running instance of Jans Auth Server
19
19
1. A new column in `jansdb.jansPerson` to store the phrase metadata in
20
-
1. A SCAN subscription. Please visit [https://gluu.org/agama-lab] and sign up for a free SCAN subscription, which gives you 500 credits. Each successful Typekey API call costs 25 credits.
20
+
1. A SCAN subscription. Please visit [Agama Lab](https://gluu.org/agama-lab) and sign up for a free SCAN subscription, which gives you 500 credits. Each successful Typekey API call costs 4 credits.
21
21
22
22
### Add column to database
23
23
24
-
These instructions are for MySQL. Please follow the [documentation](https://docs.jans.io/v1.0.22/admin/reference/database/) for your persistence type.
24
+
These instructions are for PostgreSQL. Please follow the [documentation](https://docs.jans.io/v1.0.22/admin/reference/database/) for your persistence type.
25
25
26
26
1. Log into the server running Jans
27
-
2. Log into MySQL with a user that has permission to operate on `jansdb`
28
-
3. Add the column:
27
+
2. Log into PostgreSQL with a user that has permission to operate on `jansdb`
4. Restart MySQL and Auth Server to load the changes:
35
+
4. Restart PostgreSQL and Auth Server to load the changes:
35
36
36
37
```
37
-
systemctl restart mysql jans-auth
38
+
systemctl restart postgresql jans-auth
38
39
````
39
40
40
41
### Dynamic Client Registration
41
42
42
-
In order to call the Typekey API, you will need an OAuth client. Once you have a SCAN subscription on Agama Lab, navigate to `Market` > `SCAN` and create an SSA with the software claim `typekey` and an appropriate lifetime. Your client will expire after that time. Once this is done, note down the base64 encoded string, and send a dynamic client registration request to `https://account.gluu.org/jans-auth/restv1/register` to obtain a client ID and secret. You will need this to configure the Typekey flow. Jans Tarp has functionality to automate the registration process.
43
+
In order to call the Typekey API, you will need an OAuth client. Once you have a SCAN subscription on Agama Lab, navigate to `Market` > `SCAN` and create an SSA with the software claim `typekey`. The Typekey flow will register its own client via DCR with the SSA you provide in the configuration.
- `keystoreName` and `keystorePassword` are optional, in case you want to include a signature when sending the Typekey data. Leave them as blank otherwise.
84
87
- `orgId` is the organization ID that can be obtained by decoding the software statement JWT and looking at the `org_id` claim (You may use `https://jwt.io` to decode the SSA).
85
-
- `clientId` and `clientSecret` are the client credentials obtained from Dynamic Client Registration
88
+
- `scan_ssa` is the JWT string you obtain from Agama Lab
86
89
- `authHost` and `scanHost` can be left as is
90
+
- `phrases` is explained in the [Details](#details) section
87
91
88
92
- We go back to the TUI and click on `Import Configuration` and select the modified configuration file with our parameters.
89
93
- With this, our `agama project` is now configured and we can start testing.
@@ -96,7 +100,35 @@ or [jans-tent](https://github.com/JanssenProject/jans/tree/main/demos/jans-tent)
96
100
97
101
Launch an authorization flow with parameters `acr_values=agama&agama_flow=org.gluu.agama.typekey` with your chosen RP.
98
102
99
-
Check out this video to see an example of **agama-typekey** in action:
103
+
## Details
104
+
The first time a user starts the Typekey flow, Typekey will choose a random phrase from the `phrases` dict in the configuration and store it in persistence. Then, the Typekey API is called to provide the keystroke data recorded during the flow. The first 5 times, Typekey API will train on the data provided. This phase is called "Enrollment". On the 6th attempt onward, Typekey API will validate the provided keystroke data using the training data stored during enrollment. If the behavioral data is sufficiently different from the trained data, Typekey API will deny the request.
105
+
In case Typekey API denies the request, Agama Typekey falls back to password authentication, and retrains the API on the provided data.
0 commit comments