diff --git a/friendly-captcha-sdk-testserver/fixtures/captcha_siteverify_test_cases.json b/friendly-captcha-sdk-testserver/fixtures/captcha_siteverify_test_cases.json index 2de9939..23b8e54 100644 --- a/friendly-captcha-sdk-testserver/fixtures/captcha_siteverify_test_cases.json +++ b/friendly-captcha-sdk-testserver/fixtures/captcha_siteverify_test_cases.json @@ -1,5 +1,5 @@ { - "version": 2, + "version": 3, "tests": [ { "name": "success", @@ -417,16 +417,98 @@ "timestamp": "2023-08-04T13:01:25Z", "origin": "https://example.com" }, - "risk_intelligence": { - "risk_scores": { - "overall": 3, - "network": 3, - "browser": 2 + "risk_scores": { + "overall": 2, + "network": 1, + "browser": 1 + }, + "network": { + "ip": "88.64.123.45", + "as": { + "number": 3209, + "name": "VODANET", + "company": "Vodafone GmbH", + "description": "Provides mobile and fixed broadband and telecommunication services to consumers and businesses.", + "domain": "vodafone.de", + "country": "DE", + "rir": "RIPE", + "route": "88.64.0.0/12", + "type": "isp" }, - "client": { - "header_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", - "browser": { - "id": "chrome" + "geolocation": { + "country": { + "iso2": "DE", + "iso3": "DEU", + "name": "Germany", + "name_native": "Deutschland", + "region": "Europe", + "subregion": "Western Europe", + "currency": "EUR", + "currency_name": "Euro", + "phone_code": "49", + "capital": "Berlin" + }, + "city": "Eschborn", + "state": "Hessen" + }, + "abuse_contact": { + "address": "Vodafone GmbH, Campus Eschborn, Duesseldorfer Strasse 15, D-65760 Eschborn, Germany", + "name": "Vodafone Germany IP Core Backbone", + "email": "abuse.de@vodafone.com", + "phone": "+49 6196 52352105" + }, + "anonymization": { + "vpn_score": 2, + "proxy_score": 1, + "tor": false, + "icloud_private_relay": false + } + }, + "client": { + "header_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0", + "time_zone": { + "name": "Europe/Berlin", + "country_iso2": "DE" + }, + "browser": { + "id": "firefox", + "name": "Firefox", + "version": "146.0", + "release_date": "2026-01-28" + }, + "browser_engine": { + "id": "gecko", + "name": "Gecko", + "version": "146.0" + }, + "device": { + "type": "desktop", + "brand": "", + "model": "" + }, + "os": { + "id": "windows", + "name": "Windows", + "version": "10" + }, + "tls_signature": { + "ja3": "d87a30a5782a73a83c1544bb06332780", + "ja3n": "28ecc2d2875b345cecbb632b12d8c1e0", + "ja4": "t13d1516h2_8daaf6152771_02713d6af862" + }, + "automation": { + "automation_tool": { + "detected": false, + "id": "", + "name": "", + "type": "" + }, + "known_bot": { + "detected": false, + "id": "", + "name": "", + "type": "", + "url": "" } } } @@ -460,6 +542,9 @@ "client": { "header_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "browser": null + }, + "network": { + "ip": "127.0.0.1" } } } diff --git a/friendly-captcha-sdk-testserver/fixtures/risk_intelligence_retrieve_test_cases.json b/friendly-captcha-sdk-testserver/fixtures/risk_intelligence_retrieve_test_cases.json index bdab39d..2f7df77 100644 --- a/friendly-captcha-sdk-testserver/fixtures/risk_intelligence_retrieve_test_cases.json +++ b/friendly-captcha-sdk-testserver/fixtures/risk_intelligence_retrieve_test_cases.json @@ -1,5 +1,5 @@ { - "version": 1, + "version": 2, "tests": [ { "name": "success", @@ -9,14 +9,98 @@ "data": { "risk_intelligence": { "risk_scores": { - "overall": 3, - "network": 3, - "browser": 2 + "overall": 2, + "network": 1, + "browser": 1 + }, + "network": { + "ip": "88.64.123.45", + "as": { + "number": 3209, + "name": "VODANET", + "company": "Vodafone GmbH", + "description": "Provides mobile and fixed broadband and telecommunication services to consumers and businesses.", + "domain": "vodafone.de", + "country": "DE", + "rir": "RIPE", + "route": "88.64.0.0/12", + "type": "isp" + }, + "geolocation": { + "country": { + "iso2": "DE", + "iso3": "DEU", + "name": "Germany", + "name_native": "Deutschland", + "region": "Europe", + "subregion": "Western Europe", + "currency": "EUR", + "currency_name": "Euro", + "phone_code": "49", + "capital": "Berlin" + }, + "city": "Eschborn", + "state": "Hessen" + }, + "abuse_contact": { + "address": "Vodafone GmbH, Campus Eschborn, Duesseldorfer Strasse 15, D-65760 Eschborn, Germany", + "name": "Vodafone Germany IP Core Backbone", + "email": "abuse.de@vodafone.com", + "phone": "+49 6196 52352105" + }, + "anonymization": { + "vpn_score": 2, + "proxy_score": 1, + "tor": false, + "icloud_private_relay": false + } }, "client": { - "header_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "header_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0", + "time_zone": { + "name": "Europe/Berlin", + "country_iso2": "DE" + }, "browser": { - "id": "chrome" + "id": "firefox", + "name": "Firefox", + "version": "146.0", + "release_date": "2026-01-28" + }, + "browser_engine": { + "id": "gecko", + "name": "Gecko", + "version": "146.0" + }, + "device": { + "type": "desktop", + "brand": "", + "model": "" + }, + "os": { + "id": "windows", + "name": "Windows", + "version": "10" + }, + "tls_signature": { + "ja3": "d87a30a5782a73a83c1544bb06332780", + "ja3n": "28ecc2d2875b345cecbb632b12d8c1e0", + "ja4": "t13d1516h2_8daaf6152771_02713d6af862" + }, + "automation": { + "automation_tool": { + "detected": false, + "id": "", + "name": "", + "type": "" + }, + "known_bot": { + "detected": false, + "id": "", + "name": "", + "type": "", + "url": "" + } } } }, @@ -48,6 +132,9 @@ "client": { "header_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "browser": null + }, + "network": { + "ip": "127.0.0.1" } }, "details": { diff --git a/friendly-captcha-sdk-testserver/main.go b/friendly-captcha-sdk-testserver/main.go index 607fe43..fa54b08 100644 --- a/friendly-captcha-sdk-testserver/main.go +++ b/friendly-captcha-sdk-testserver/main.go @@ -24,8 +24,8 @@ const ( defaultCaptchaSiteverifyTestsJSONEndpoint = "/api/v1/captcha/siteverifyTests" defaultRiskIntelligenceRetrieveTestsJSONEndpoint = "/api/v1/riskIntelligence/retrieveTests" - expectedCaptchaSiteverifyTestsFileVersion = 2 - expectedRiskIntelligenceRetrieveTestsFileVersion = 1 + expectedCaptchaSiteverifyTestsFileVersion = 3 + expectedRiskIntelligenceRetrieveTestsFileVersion = 2 ) var CLI struct {