Skip to content

Commit

Permalink
feat: add highActivity and locationSpoofing signals, support `ori…
Browse files Browse the repository at this point in the history
…ginTimezone` for `vpn` signal
  • Loading branch information
ilfa committed Nov 23, 2023
1 parent 8c6e3cd commit ce69197
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 112 deletions.
162 changes: 58 additions & 104 deletions resources/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ paths:
vpn:
data:
result: false
originTimezone: Europe/Berlin
methods:
timezoneMismatch: false
publicVPN: false
Expand Down Expand Up @@ -231,106 +232,12 @@ paths:
value: 0
cookiesEnabled:
value: true
proPlusBotDetectedResponse:
summary: Bot detected on Pro Plus plan
value:
products:
identification:
data:
visitorId: BotDetected000000000
requestId: 0KSh65EnVoB85JBmloQK
incognito: true
linkedId: somelinkedId
time: '2019-05-21T16:40:13Z'
timestamp: 1582299576512
url: https://www.example.com/login
ip: 61.127.217.15
ipLocation: {}
browserDetails:
browserName: ''
browserMajorVersion: ''
browserFullVersion: ''
os: ''
osVersion: ''
device: ''
userAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) ....
confidence:
score: 0.5
comment: The real score is unknown
visitorFound: false
firstSeenAt:
global: null
subscription: null
lastSeenAt:
global: null
subscription: null
botd:
data:
bot:
result: bad
type: selenium
url: https://www.example.com/login
ip: 61.127.217.15
time: '2019-05-21T16:40:13Z'
ipInfo:
data:
v4:
address: 94.142.239.124
geolocation:
accuracyRadius: 20
latitude: 50.05
longitude: 14.4
postalCode: 150 00
timezone: Europe/Prague
city:
name: Prague
country:
code: CZ
name: Czechia
continent:
code: EU
name: Europe
subdivisions:
- isoCode: '10'
name: Hlavni mesto Praha
asn:
asn: '7922'
name: COMCAST-7922
network: 73.136.0.0/13
dataCenter:
result: true
name: DediPath
incognito:
data:
result: false
rootApps:
data:
result: false
emulator:
data:
result: false
ipBlocklist:
highActivity:
data:
result: false
details:
emailSpam: false
attackSource: false
tor:
locationSpoofing:
data:
result: false
vpn:
data:
result: false
methods:
timezoneMismatch: false
publicVPN: false
proxy:
data:
result: false
tampering:
data:
result: false
anomalyScore: 0
allErrorsResponse:
summary: All failed signals
value:
Expand Down Expand Up @@ -3810,6 +3717,7 @@ paths:
result: false
vpn:
result: false
originTimezone: Europe/Berlin
methods:
timezoneMismatch: false
publicVPN: false
Expand Down Expand Up @@ -3850,6 +3758,10 @@ paths:
value: 0
cookiesEnabled:
value: true
highActivity:
result: false
locationSpoofing:
result: true
responses:
default:
description: The server doesn't validate the answer.
Expand Down Expand Up @@ -4186,6 +4098,10 @@ components:
$ref: '#/components/schemas/TamperingResult'
rawDeviceAttributes:
$ref: '#/components/schemas/RawDeviceAttributesResult'
highActivity:
$ref: '#/components/schemas/HighActivityResult'
locationSpoofing:
$ref: '#/components/schemas/LocationSpoofingResult'
requestId:
description: Unique identifier of the user's identification request.
type: string
Expand Down Expand Up @@ -4421,6 +4337,9 @@ components:
additionalProperties: false
properties:
accuracyRadius:
description: >-
The IP address is likely to be within this radius (in km) of the
specified location.
type: integer
minimum: 0
example: 1000
Expand Down Expand Up @@ -4563,16 +4482,8 @@ components:
description: >
String of 20 characters that uniquely identifies the
visitor's browser.
**Pro Plus:**
If a bot is detected (`products.botd.bot.result !=
"notDetected"`), the `visitorId` value contains a
placeholder string `BotDetected000000000`.
example:
- Ibk1527CUFmcnjLwIs4A
- BotDetected000000000
additionalProperties: false
required:
- browserDetails
Expand Down Expand Up @@ -4816,6 +4727,22 @@ components:
$ref: '#/components/schemas/TamperingResult'
error:
$ref: '#/components/schemas/ProductError'
highActivity:
title: SignalResponseHighActivity
type: object
properties:
data:
$ref: '#/components/schemas/HighActivityResult'
error:
$ref: '#/components/schemas/ProductError'
locationSpoofing:
title: SignalResponseLocationSpoofing
type: object
properties:
data:
$ref: '#/components/schemas/LocationSpoofingResult'
error:
$ref: '#/components/schemas/ProductError'
rawDeviceAttributes:
title: SignalResponseRawDeviceAttributes
type: object
Expand Down Expand Up @@ -4975,6 +4902,10 @@ components:
VPN or other anonymizing service has been used when sending the
request.
example: false
originTimezone:
type: string
description: Local timezone which is used in timezoneMismatch method.
example: Europe/Berlin
methods:
type: object
properties:
Expand Down Expand Up @@ -5014,6 +4945,29 @@ components:
example: 0
minimum: 0
maximum: 1
HighActivityResult:
type: object
properties:
result:
type: boolean
description: >-
Flag indicating whether the request came from a high activity
visitor.
example: false
dailyRequests:
type: number
description: Number of requests from the same visitor in the previous day.
example: 10
minimum: 1
LocationSpoofingResult:
type: object
properties:
result:
type: boolean
description: >-
Flag indicating whether the request came from a device with location
spoofing enabled.
example: false
RawDeviceAttributesResult:
type: object
description: >
Expand Down
47 changes: 41 additions & 6 deletions src/generatedApiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ export interface components {
};
tampering?: components['schemas']['TamperingResult'];
rawDeviceAttributes?: components['schemas']['RawDeviceAttributesResult'];
highActivity?: components['schemas']['HighActivityResult'];
locationSpoofing?: components['schemas']['LocationSpoofingResult'];
/**
* @description Unique identifier of the user's identification request.
* @example 1654815516083.OX6kx8
Expand Down Expand Up @@ -418,7 +420,10 @@ export interface components {
};
/** IPLocation */
IPLocation: {
/** @example 1000 */
/**
* @description The IP address is likely to be within this radius (in km) of the specified location.
* @example 1000
*/
accuracyRadius?: number;
/**
* Format: double
Expand Down Expand Up @@ -513,12 +518,8 @@ export interface components {
/**
* @description String of 20 characters that uniquely identifies the visitor's browser.
*
* **Pro Plus:**
* If a bot is detected (`products.botd.bot.result != "notDetected"`), the `visitorId` value contains a placeholder string `BotDetected000000000`.
*
* @example [
* "Ibk1527CUFmcnjLwIs4A",
* "BotDetected000000000"
* "Ibk1527CUFmcnjLwIs4A"
* ]
*/
visitorId: string;
Expand Down Expand Up @@ -690,6 +691,16 @@ export interface components {
data?: components['schemas']['TamperingResult'];
error?: components['schemas']['ProductError'];
};
/** SignalResponseHighActivity */
highActivity?: {
data?: components['schemas']['HighActivityResult'];
error?: components['schemas']['ProductError'];
};
/** SignalResponseLocationSpoofing */
locationSpoofing?: {
data?: components['schemas']['LocationSpoofingResult'];
error?: components['schemas']['ProductError'];
};
/** SignalResponseRawDeviceAttributes */
rawDeviceAttributes?: {
data?: components['schemas']['RawDeviceAttributesResult'];
Expand Down Expand Up @@ -803,6 +814,11 @@ export interface components {
* @example false
*/
result?: boolean;
/**
* @description Local timezone which is used in timezoneMismatch method.
* @example Europe/Berlin
*/
originTimezone?: string;
methods?: {
/**
* @description User's browser timezone doesn't match the timezone from which the request was originally made.
Expand Down Expand Up @@ -833,6 +849,25 @@ export interface components {
*/
anomalyScore?: number;
};
HighActivityResult: {
/**
* @description Flag indicating whether the request came from a high activity visitor.
* @example false
*/
result?: boolean;
/**
* @description Number of requests from the same visitor in the previous day.
* @example 10
*/
dailyRequests?: number;
};
LocationSpoofingResult: {
/**
* @description Flag indicating whether the request came from a device with location spoofing enabled.
* @example false
*/
result?: boolean;
};
/**
* @description It includes 35+ raw browser identification attributes to provide Fingerprint users with even more information than our standard visitor ID provides. This enables Fingerprint users to not have to run our open-source product in conjunction with Fingerprint Pro Plus and Enterprise to get those additional attributes.
* Warning: The raw signals data can change at any moment as we improve the product. We cannot guarantee the internal shape of raw device attributes to be stable, so typical semantic versioning rules do not apply here. Use this data with caution without assuming a specific structure beyond the generic type provided here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Object {
"frida": Object {
"result": false,
},
"highActivity": Object {
"result": false,
},
"incognito": false,
"ip": "216.3.128.12",
"ipBlocklist": Object {
Expand Down Expand Up @@ -115,6 +118,9 @@ Object {
"subscription": null,
},
"linkedId": "any-string",
"locationSpoofing": Object {
"result": true,
},
"privacySettings": Object {
"result": false,
},
Expand Down Expand Up @@ -178,6 +184,7 @@ Object {
"publicVPN": false,
"timezoneMismatch": false,
},
"originTimezone": "Europe/Berlin",
"result": false,
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ Object {
"result": false,
},
},
"highActivity": Object {
"data": Object {
"result": false,
},
},
"identification": Object {
"data": Object {
"browserDetails": Object {
Expand Down Expand Up @@ -371,6 +376,11 @@ Object {
"result": false,
},
},
"locationSpoofing": Object {
"data": Object {
"result": false,
},
},
"privacySettings": Object {
"data": Object {
"result": false,
Expand Down Expand Up @@ -438,6 +448,7 @@ Object {
"publicVPN": false,
"timezoneMismatch": false,
},
"originTimezone": "Europe/Berlin",
"result": false,
},
},
Expand Down
Loading

0 comments on commit ce69197

Please sign in to comment.