Last Updated: November 2026
The Risk Connectors plugin (risk-connectors) connects an identity verification service of your choice to the engine over HTTP. There is no built-in service and no service name anywhere in the product: you enter the endpoint, the keys and a field mapping, and the connector registers an identity provider with the risk extension point (see Risk Providers). The same plugin holds the device intelligence connector; each connector is switched on separately.
One plugin with two connectors, not two plugins: both share the same HTTP client, address checks, authentication shapes, mapping language and admin tools, and a plugin may register one provider of each kind, so one signed package carries both.
What the connector does
- At registration, when the risk settings ask for a KYC level there (Risk providers › KYC level per action › Registration), the engine calls the connector through the extension point: 2 seconds per attempt, at most two attempts, then the action’s fail rule. A verified answer at or above the level asked for is stored on the account with its method and date (
kyc_method,kyc_verified_at), and the real-money gate then sees that level for deposits, real-money seats and casino launch. - An answer that is not verified, or a level below the one asked for, refuses registration with
KYC_REQUIRED. - An answer that does not fit your mapping (a status the mapping does not turn into
verified,referorrejected, a verified answer without a level, a date that is not a date, a body that is not JSON, an HTTP error, a redirect, a timeout, an answer over 64 KB) is a provider error: it is retried once, then the fail rule decides. It never becomes "verified". - Every decision is a row of the risk decision log (
GET /api/v1/admin/risk/decisions): the outcome, the status, method, date and level. Never the request, a document, the raw answer or a secret.
Enabling it
Upload risk-connectors-<version>.tgz under Extensions › Plugins (see Installing the First-Party Plugins) and activate it. It is on the signed first-party list, so it loads in certified mode; it changes no compliance preset and no lock.
| Capability | Why |
|---|---|
risk:provider | Registers the identity and device providers |
storage | Callback replay records (hashed signatures, removed after ten minutes) |
Settings
Extensions › Plugins, Settings on the Risk Connectors row. Secrets are stored encrypted with the other plugin secrets and are never shown again after saving.
| Setting | Meaning |
|---|---|
| Identity connector on | Registers the connector. A connector that is on but misconfigured stays unregistered; the plugin’s health check names the problem, and when the risk settings require an identity provider (or ask for a KYC level at registration) the action is refused with RISK_CONFIGURATION_FAULT and the admin banner names the missing kind. |
| Identity endpoint URL | https:// only, no credentials in the URL. Refused when the host is, or resolves to, a private, loopback, link-local, CGNAT, multicast or reserved address. The address is checked again when each request connects (a changed DNS answer cannot reach an internal address), and redirects are never followed. |
| Identity HTTP method | POST sends the mapped fields as a JSON body; GET sends them as query parameters (flat names only). |
| Identity authentication | None; Bearer key (Authorization: Bearer <key>); Key in a named header (<header>: <key>); Basic credentials (username and password); HMAC signature over the body: <header, default X-Signature>: hex(HMAC-SHA256(secret, "<timestamp>.<body>")) with X-Signature-Timestamp: <unix seconds>; a GET has no body and signs "<timestamp>.<path and query>" instead (for example 1700000000./v1/check?given=Sam). The key header may not be one the connector sets itself (Host, Content-Length, Content-Type, X-Signature-Timestamp and the like). |
| Identity key or signature header | The header name for a named key or for the signature. |
| Identity username | Basic credentials only. |
| Identity key or secret | The key, password or signing secret. |
| Identity timeout (ms) | 250 to 1900 (the extension point allows 2000 per attempt). Default 1500. |
| Identity request mapping | Which player fields are sent, and where (below). |
| Identity response mapping | How the answer becomes a result (below). |
| Identity callback secret | Turns on the signed callback route for later results. Empty: no callback is accepted. |
The mapping language
A mapping is a JSON object. Each key is where a value goes (a path in the request body, or a result field); each value is either { "from": "<path>", "transforms": [ ... ] } or { "value": <literal> }.
- Paths are dot and bracket paths into JSON:
person.name,checks[0].state,data["full name"]. Own properties only;__proto__,prototypeandconstructorare refused; at most 200 characters and 32 segments. - Literals are strings (up to 1000 characters), numbers,
true,falseornull. - Transforms, applied in order, at most 8 per field:
| Transform | Effect |
|---|---|
{ "op": "lower" }, { "op": "upper" } | Text to lower or upper case |
{ "op": "number" }, { "op": "string" } | Type conversion |
{ "op": "date", "format": "iso" | "date" | "dmy" | "mdy" | "unix" } | Any date in; ISO 8601, YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY or Unix seconds out |
{ "op": "map", "table": { "in": "out" }, "default": "..." } | A value through your table (up to 200 entries), else the default |
{ "op": "band", "bands": [ { "min": 0, "value": "low" }, { "min": 70, "value": "high" } ] } | A number to the band of the highest min it reaches |
There is no code, no template that evaluates and no pattern you supply. A value that is missing stays missing: a request field whose source is empty is left out, and a result field that is missing is treated as described above.
Fields you can send (request mapping sources)
| Path | Value |
|---|---|
subject.userId | The account id (absent at registration, before the account exists) |
subject.email | The e-mail address |
subject.firstName, subject.lastName | The names, when the registration form asks for them |
subject.dateOfBirth | The date of birth, when asked for |
subject.country | The declared country |
request.ip, request.userAgent, request.deviceId | The request, as the server saw it |
Nothing is sent that your mapping does not name. The admin tools under the settings form list exactly which fields your saved mapping sends.
Result fields (response mapping targets)
| Field | Required | Meaning |
|---|---|---|
status | Yes | Must become verified, refer or rejected (use a map transform) |
level | For verified | TIER_1, TIER_2 or TIER_3 |
method | No | How the check was made, for example document or database (default provider) |
checkedAt | No | When the check finished (default: now) |
reference | For later results | The service’s reference for the check. With refer, the engine keeps a pending request under this reference (stored only as a hash) that the callback settles |
account | No | In a callback, the account id the service echoes back (from subject.userId); a result that names another account than the request’s is refused |
reason | No | A short reason, shown in the test result only |
Worked example (a made-up service)
The made-up service at https://provider.example/v2/checks takes a POST with the person’s names and date of birth as DD/MM/YYYY, authenticated with an X-Api-Key header, and answers:
{ "id": "chk_123", "result": { "state": "APPROVED", "tier": "basic", "finished": "2026-11-20T10:00:00Z" } }
Settings: endpoint https://provider.example/v2/checks, method POST, authentication Key in a named header, header X-Api-Key, the key in Identity key or secret. Request mapping:
{
"person.given_name": { "from": "subject.firstName" },
"person.family_name": { "from": "subject.lastName" },
"person.birth_date": { "from": "subject.dateOfBirth", "transforms": [{ "op": "date", "format": "dmy" }] },
"person.country": { "from": "subject.country", "transforms": [{ "op": "upper" }] }
}
Response mapping:
{
"status": { "from": "result.state", "transforms": [{ "op": "lower" }, { "op": "map", "table": { "approved": "verified", "review": "refer", "declined": "rejected" } }] },
"level": { "from": "result.tier", "transforms": [{ "op": "map", "table": { "basic": "TIER_1", "enhanced": "TIER_2" } }] },
"method": { "value": "document" },
"checkedAt": { "from": "result.finished", "transforms": [{ "op": "date", "format": "iso" }] },
"reference": { "from": "id" }
}
Data sent: the given name, family name, date of birth and country, nothing else (no e-mail, no address, no account id).
Admin tools (under the settings form)
- Fields this connector sends: the saved request mapping, field by field.
- Preview the mapping: paste a sample answer and see the mapped result. Nothing is called.
- Send a test request: sends a request for a sample player (
Sam Sample, born 1990-01-31) to the saved endpoint and shows what was sent, the HTTP status, the mapped result and the raw answer with the connector’s secrets replaced by********. Each test is an admin audit row (risk_connector_test, with the outcome, the status and the endpoint’s host). At most 10 per minute per admin.
The preview and the test need settings:edit; the field list needs settings:view.
Later results: the signed callback
Many services answer a check later. With an Identity callback secret set, the service can post the result to:
POST /api/v1/plugins/risk-connectors/callback/identity
X-Signature-Timestamp: <unix seconds>
X-Signature: hex(HMAC-SHA256(<callback secret>, "<timestamp>.<raw body>"))
The signature is compared in constant time over exactly <timestamp>.<raw body> (the bytes received, before any parsing); a timestamp more than 300 seconds away is refused; the same signature twice is refused as a replay; a body over 16 KB is refused (413); at most 60 calls a minute per address. The body is mapped with the response mapping and must map a reference (and may map account).
The answer tells the caller nothing. A wrong signature, a stale timestamp, a replay, a body that does not map, an unknown reference and an accepted result all get the same answer: 202 {"success":true,"data":{"received":true}}. Only the server log says why a callback was refused. The body is never echoed or logged. A 500 means the engine could not save the result; the service should send it again (that retry is not treated as a replay).
How a later result changes the account. The engine, not the plugin, decides:
- A player starts a check from their account (
POST /api/v1/cashier/identity-check). When the service answersreferwith areference, the engine keeps a pending request for that account for 30 days. - The callback’s result counts only for an open request, only for the connector that opened it, and only once. An unknown, expired or already settled reference is refused and recorded in the risk decision log.
- A
verifiedresult raises the account’s level to the mapped level, but never above the highest level your risk settings require for any action (at least TIER_1). It is recorded in the decision log and in the audit log (actorsystem:identity-provider), and the real-money gate sees it at once. - A later result never lowers a level. A
rejectedresult closes the request and is recorded, but the account keeps its level, whether staff set it by hand on the KYC Verification page or an earlier check reached it. Lowering a level is a staff action. - A
referresult leaves the request open.
Content security policy and firewall
- The connectors call out from the server; the browser never calls the service, so no content security policy entry is needed.
- Allow outbound HTTPS from the engine’s servers to the service’s host. The connector refuses internal addresses itself; a firewall rule that allows only the service’s addresses is still recommended.
- If the service calls back, allow inbound HTTPS from the service’s documented addresses to the callback path on your proxy.