@prosopo/provider-mock 2.8.143 → 2.8.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$cjs.log +8 -6
- package/.turbo/turbo-build$colon$tsc.log +26 -26
- package/.turbo/turbo-build.log +9 -7
- package/CHANGELOG.md +52 -0
- package/Dockerfile +11 -0
- package/dist/api.d.ts +35 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +97 -67
- package/dist/api.js.map +1 -1
- package/dist/cjs/api.cjs +105 -66
- package/dist/cjs/db.cjs +16 -7
- package/dist/cjs/isMain.cjs +16 -0
- package/dist/cjs/start.cjs +59 -16
- package/dist/cjs/verify.cjs +39 -0
- package/dist/db.d.ts +8 -4
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +16 -7
- package/dist/db.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/isMain.d.ts +2 -0
- package/dist/isMain.d.ts.map +1 -0
- package/dist/isMain.js +16 -0
- package/dist/isMain.js.map +1 -0
- package/dist/start.d.ts +17 -0
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +54 -17
- package/dist/start.js.map +1 -1
- package/dist/tests/db.unit.test.d.ts +2 -0
- package/dist/tests/db.unit.test.d.ts.map +1 -0
- package/dist/tests/db.unit.test.js +184 -0
- package/dist/tests/db.unit.test.js.map +1 -0
- package/dist/tests/fixtures.d.ts +33 -0
- package/dist/tests/fixtures.d.ts.map +1 -0
- package/dist/tests/fixtures.js +55 -0
- package/dist/tests/fixtures.js.map +1 -0
- package/dist/tests/handlers.unit.test.d.ts +2 -0
- package/dist/tests/handlers.unit.test.d.ts.map +1 -0
- package/dist/tests/handlers.unit.test.js +204 -0
- package/dist/tests/handlers.unit.test.js.map +1 -0
- package/dist/tests/providerMock.test-d.d.ts +2 -0
- package/dist/tests/providerMock.test-d.d.ts.map +1 -0
- package/dist/tests/providerMock.test-d.js +88 -0
- package/dist/tests/providerMock.test-d.js.map +1 -0
- package/dist/tests/start.unit.test.d.ts +2 -0
- package/dist/tests/start.unit.test.d.ts.map +1 -0
- package/dist/tests/start.unit.test.js +205 -0
- package/dist/tests/start.unit.test.js.map +1 -0
- package/dist/tests/verify.unit.test.d.ts +2 -0
- package/dist/tests/verify.unit.test.d.ts.map +1 -0
- package/dist/tests/verify.unit.test.js +63 -0
- package/dist/tests/verify.unit.test.js.map +1 -0
- package/dist/tests/wiring.unit.test.d.ts +2 -0
- package/dist/tests/wiring.unit.test.d.ts.map +1 -0
- package/dist/tests/wiring.unit.test.js +181 -0
- package/dist/tests/wiring.unit.test.js.map +1 -0
- package/dist/verify.d.ts +13 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +34 -0
- package/dist/verify.js.map +1 -0
- package/package.json +20 -12
- package/src/api.ts +170 -79
- package/src/db.ts +39 -12
- package/src/index.ts +18 -0
- package/src/isMain.ts +37 -0
- package/src/start.ts +92 -18
- package/src/tests/db.unit.test.ts +287 -0
- package/src/tests/fixtures.ts +117 -0
- package/src/tests/handlers.unit.test.ts +325 -0
- package/src/tests/providerMock.test-d.ts +165 -0
- package/src/tests/start.unit.test.ts +291 -0
- package/src/tests/verify.unit.test.ts +143 -0
- package/src/tests/wiring.unit.test.ts +293 -0
- package/src/verify.ts +63 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.test.config.ts +32 -0
package/dist/cjs/api.cjs
CHANGED
|
@@ -1,87 +1,126 @@
|
|
|
1
1
|
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
const require_db = require("./db.cjs");
|
|
3
|
+
const require_verify = require("./verify.cjs");
|
|
3
4
|
let _prosopo_logger = require("@prosopo/logger");
|
|
4
5
|
let express = require("express");
|
|
5
6
|
express = require_runtime.__toESM(express, 1);
|
|
6
7
|
let _prosopo_common = require("@prosopo/common");
|
|
7
8
|
let _prosopo_provider = require("@prosopo/provider");
|
|
8
9
|
let _prosopo_types = require("@prosopo/types");
|
|
10
|
+
let express_rate_limit = require("express-rate-limit");
|
|
9
11
|
//#region src/api.ts
|
|
12
|
+
var DEFAULT_MONGO_URL = "mongodb://localhost:27017";
|
|
13
|
+
var DEFAULT_MONGO_DBNAME = "client";
|
|
14
|
+
var DEFAULT_MONGO_AUTH_SOURCE = "admin";
|
|
15
|
+
var createDatabase = (env = process.env) => new require_db.JA4Database(env.MONGO_URL || "mongodb://localhost:27017", env.MONGO_DBNAME || "client", env.MONGO_AUTH_SOURCE || "admin");
|
|
16
|
+
var defaultRouterDeps = () => ({
|
|
17
|
+
db: createDatabase(),
|
|
18
|
+
getJA4: _prosopo_provider.getJA4,
|
|
19
|
+
decodeToken: _prosopo_types.decodeProcaptchaOutput,
|
|
20
|
+
logger: (0, _prosopo_logger.getLogger)("info", "provider-mock:api")
|
|
21
|
+
});
|
|
10
22
|
/**
|
|
11
|
-
*
|
|
23
|
+
* Verify a solution, as the real provider would.
|
|
12
24
|
*
|
|
13
|
-
*
|
|
25
|
+
* A body that does not parse is the caller's fault and is reported as a 400; a
|
|
26
|
+
* token that parses but cannot be decoded is reported as a 500, because at that
|
|
27
|
+
* point the request looked well formed and the mock cannot tell the difference
|
|
28
|
+
* between a corrupt token and a bug of its own.
|
|
14
29
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* @param {string} commitmentId - The captcha solution to look up
|
|
23
|
-
*/
|
|
24
|
-
router.post(_prosopo_types.ClientApiPaths.VerifyImageCaptchaSolutionDapp, async (req, res, next) => {
|
|
25
|
-
let body;
|
|
26
|
-
try {
|
|
27
|
-
body = _prosopo_types.VerifySolutionBody.parse(req.body);
|
|
28
|
-
} catch (err) {
|
|
29
|
-
return next(new _prosopo_common.ProsopoApiError("CAPTCHA.PARSE_ERROR", {
|
|
30
|
-
context: {
|
|
31
|
-
error: err,
|
|
32
|
-
code: 400
|
|
33
|
-
},
|
|
34
|
-
logLevel: "info"
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
try {
|
|
38
|
-
const { token } = body;
|
|
39
|
-
const { user, dapp, commitmentId } = (0, _prosopo_types.decodeProcaptchaOutput)(token);
|
|
40
|
-
const testCommitmentId = "0x123456789test";
|
|
41
|
-
const testAccount = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
|
|
42
|
-
const testDapp = "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM";
|
|
43
|
-
let statusMessage = "API.USER_NOT_VERIFIED";
|
|
44
|
-
let approved = false;
|
|
45
|
-
if (user && user === testAccount || commitmentId && commitmentId === testCommitmentId || dapp && dapp === testDapp) {
|
|
46
|
-
approved = true;
|
|
47
|
-
statusMessage = "API.USER_VERIFIED";
|
|
48
|
-
return res.json({
|
|
49
|
-
status: req.t(statusMessage),
|
|
50
|
-
verified: approved,
|
|
51
|
-
commitmentId: testCommitmentId
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return res.json({
|
|
55
|
-
status: req.t(statusMessage),
|
|
56
|
-
verified: false
|
|
57
|
-
});
|
|
58
|
-
} catch (err) {
|
|
59
|
-
return next(new _prosopo_common.ProsopoApiError("API.UNKNOWN", { context: {
|
|
30
|
+
var createVerifyHandler = (deps) => async (req, res, next) => {
|
|
31
|
+
let body;
|
|
32
|
+
try {
|
|
33
|
+
body = _prosopo_types.VerifySolutionBody.parse(req.body);
|
|
34
|
+
} catch (err) {
|
|
35
|
+
return next(new _prosopo_common.ProsopoApiError("CAPTCHA.PARSE_ERROR", {
|
|
36
|
+
context: {
|
|
60
37
|
error: err,
|
|
61
|
-
code:
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
38
|
+
code: 400
|
|
39
|
+
},
|
|
40
|
+
logLevel: "info"
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const outcome = require_verify.verifyProcaptchaOutput(deps.decodeToken(body.token));
|
|
45
|
+
res.json({
|
|
46
|
+
status: req.t(outcome.statusMessage),
|
|
47
|
+
verified: outcome.verified,
|
|
48
|
+
...outcome.commitmentId === void 0 ? {} : { commitmentId: outcome.commitmentId }
|
|
49
|
+
});
|
|
50
|
+
} catch (err) {
|
|
51
|
+
return next(new _prosopo_common.ProsopoApiError("API.UNKNOWN", { context: {
|
|
52
|
+
error: err,
|
|
53
|
+
code: 500
|
|
54
|
+
} }));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
/** Record the caller's JA4 fingerprint and hand it back to them. */
|
|
58
|
+
var createTestHandler = (deps) => async (req, res) => {
|
|
59
|
+
try {
|
|
60
|
+
const { ja4PlusFingerprint } = await deps.getJA4(req.headers, deps.logger);
|
|
66
61
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
await db.addOrUpdateJA4Record({
|
|
71
|
-
ja4_fingerprint: ja4PlusFingerprint.ja4PlusFingerprint,
|
|
62
|
+
await deps.db.connect();
|
|
63
|
+
await deps.db.addOrUpdateJA4Record({
|
|
64
|
+
ja4_fingerprint: ja4PlusFingerprint,
|
|
72
65
|
user_agent_string: req.headers["user-agent"] || ""
|
|
73
66
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
ja4: ja4PlusFingerprint.ja4PlusFingerprint,
|
|
77
|
-
ua: req.headers["user-agent"]
|
|
78
|
-
});
|
|
79
|
-
} catch (e) {
|
|
80
|
-
console.error("Error parsing ClientHello:", e);
|
|
81
|
-
return res.status(500).send("Error parsing ClientHello.");
|
|
67
|
+
} finally {
|
|
68
|
+
await deps.db.close();
|
|
82
69
|
}
|
|
83
|
-
|
|
70
|
+
res.json({
|
|
71
|
+
ja4: ja4PlusFingerprint,
|
|
72
|
+
ua: req.headers["user-agent"]
|
|
73
|
+
});
|
|
74
|
+
} catch (e) {
|
|
75
|
+
deps.logger.error(() => ({
|
|
76
|
+
err: e instanceof Error ? e : new Error(String(e)),
|
|
77
|
+
msg: "Failed to record the caller's JA4 fingerprint"
|
|
78
|
+
}));
|
|
79
|
+
res.status(500).send("Failed to record the caller's JA4 fingerprint.");
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Both routes do unauthenticated work on the caller's behalf — one verifies a
|
|
84
|
+
* token, the other writes a fingerprint to mongo — so an unthrottled client can
|
|
85
|
+
* drive the database as fast as it can send. The window is generous enough that
|
|
86
|
+
* the demos and cypress runs never see it.
|
|
87
|
+
*/
|
|
88
|
+
var verifyRateLimit = () => (0, express_rate_limit.rateLimit)({
|
|
89
|
+
windowMs: 6e4,
|
|
90
|
+
limit: 600,
|
|
91
|
+
standardHeaders: true,
|
|
92
|
+
legacyHeaders: false
|
|
93
|
+
});
|
|
94
|
+
/**
|
|
95
|
+
* Adapt a handler written against the narrow request/response types above to
|
|
96
|
+
* the express signature. Express hands the same objects through untouched; the
|
|
97
|
+
* narrow types exist only so tests can pass plain objects.
|
|
98
|
+
*/
|
|
99
|
+
var toRequestHandler = (handler) => {
|
|
100
|
+
const adapted = (req, res, next) => {
|
|
101
|
+
handler(req, res, next).catch(next);
|
|
102
|
+
};
|
|
103
|
+
return adapted;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Returns a router connected to the database which can interact with the Proposo protocol
|
|
107
|
+
*
|
|
108
|
+
* @return {Router} - A middleware router that can interact with the Prosopo protocol
|
|
109
|
+
*/
|
|
110
|
+
function prosopoRouter(deps = defaultRouterDeps()) {
|
|
111
|
+
const router = express.default.Router();
|
|
112
|
+
router.post(_prosopo_types.ClientApiPaths.VerifyImageCaptchaSolutionDapp, verifyRateLimit(), toRequestHandler(createVerifyHandler(deps)));
|
|
113
|
+
router.get("/test", verifyRateLimit(), toRequestHandler(createTestHandler(deps)));
|
|
84
114
|
return router;
|
|
85
115
|
}
|
|
86
116
|
//#endregion
|
|
117
|
+
exports.DEFAULT_MONGO_AUTH_SOURCE = DEFAULT_MONGO_AUTH_SOURCE;
|
|
118
|
+
exports.DEFAULT_MONGO_DBNAME = DEFAULT_MONGO_DBNAME;
|
|
119
|
+
exports.DEFAULT_MONGO_URL = DEFAULT_MONGO_URL;
|
|
120
|
+
exports.createDatabase = createDatabase;
|
|
121
|
+
exports.createTestHandler = createTestHandler;
|
|
122
|
+
exports.createVerifyHandler = createVerifyHandler;
|
|
123
|
+
exports.defaultRouterDeps = defaultRouterDeps;
|
|
87
124
|
exports.prosopoRouter = prosopoRouter;
|
|
125
|
+
exports.toRequestHandler = toRequestHandler;
|
|
126
|
+
exports.verifyRateLimit = verifyRateLimit;
|
package/dist/cjs/db.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
let _prosopo_common = require("@prosopo/common");
|
|
2
2
|
let _prosopo_database = require("@prosopo/database");
|
|
3
|
-
//#region src/db.ts
|
|
4
3
|
var JA4Schema = new (require("mongoose")).Schema({
|
|
5
4
|
application: String,
|
|
6
5
|
library: String,
|
|
@@ -48,22 +47,32 @@ var JA4Database = class extends _prosopo_database.MongoDatabase {
|
|
|
48
47
|
}
|
|
49
48
|
async connect() {
|
|
50
49
|
await super.connect();
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const connection = this.connection;
|
|
51
|
+
if (connection === void 0) throw new _prosopo_common.ProsopoDBError("DATABASE.CONNECTION_UNDEFINED", {
|
|
52
|
+
context: { failedFuncName: this.connect.name },
|
|
53
|
+
logger: this.logger
|
|
53
54
|
});
|
|
55
|
+
for (const { collectionName, modelName, schema } of DATA_TABLES) this.tables[collectionName] = connection.model(modelName, schema);
|
|
54
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* The registered models.
|
|
59
|
+
*
|
|
60
|
+
* The check used to be `!this.tables`, which the constructor makes
|
|
61
|
+
* impossible, so querying before connect() failed with a TypeError on
|
|
62
|
+
* undefined rather than the database error it is.
|
|
63
|
+
*/
|
|
55
64
|
getTables() {
|
|
56
|
-
if (
|
|
65
|
+
if (this.tables["ja4"] === void 0) throw new _prosopo_common.ProsopoDBError("DATABASE.TABLES_UNDEFINED", {
|
|
57
66
|
context: { failedFuncName: this.getTables.name },
|
|
58
67
|
logger: this.logger
|
|
59
68
|
});
|
|
60
69
|
return this.tables;
|
|
61
70
|
}
|
|
62
71
|
async getJA4Records() {
|
|
63
|
-
return this.
|
|
72
|
+
return this.getTables().ja4.find({});
|
|
64
73
|
}
|
|
65
74
|
async getJA4RecordByFingerprintAndUserAgent(ja4Fingerprint, userAgentString) {
|
|
66
|
-
return this.
|
|
75
|
+
return this.getTables().ja4.findOne({
|
|
67
76
|
ja4_fingerprint: ja4Fingerprint,
|
|
68
77
|
user_agent_string: userAgentString
|
|
69
78
|
});
|
|
@@ -75,7 +84,7 @@ var JA4Database = class extends _prosopo_database.MongoDatabase {
|
|
|
75
84
|
await existingRecord.save();
|
|
76
85
|
return existingRecord;
|
|
77
86
|
}
|
|
78
|
-
const newRecord = new this.
|
|
87
|
+
const newRecord = new (this.getTables()).ja4(ja4Record);
|
|
79
88
|
await newRecord.save();
|
|
80
89
|
return newRecord;
|
|
81
90
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
let node_path = require("node:path");
|
|
2
|
+
let node_process = require("node:process");
|
|
3
|
+
let node_url = require("node:url");
|
|
4
|
+
//#region src/isMain.ts
|
|
5
|
+
/**
|
|
6
|
+
* Whether the module at moduleUrl is the one node was asked to run.
|
|
7
|
+
*
|
|
8
|
+
* Guards the module's side effects so importing it — for its exports, or from a
|
|
9
|
+
* test — does not start a server.
|
|
10
|
+
*/
|
|
11
|
+
var isMain = (moduleUrl, entrypoint = node_process.argv[1]) => {
|
|
12
|
+
if (entrypoint === void 0) return false;
|
|
13
|
+
return (0, node_url.fileURLToPath)(moduleUrl) === (0, node_path.resolve)(entrypoint);
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
exports.isMain = isMain;
|
package/dist/cjs/start.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
1
2
|
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
3
|
const require_api = require("./api.cjs");
|
|
4
|
+
const require_isMain = require("./isMain.cjs");
|
|
3
5
|
let _prosopo_api_express_router = require("@prosopo/api-express-router");
|
|
4
6
|
let _prosopo_locale = require("@prosopo/locale");
|
|
5
7
|
let _prosopo_logger = require("@prosopo/logger");
|
|
@@ -8,24 +10,65 @@ cors = require_runtime.__toESM(cors, 1);
|
|
|
8
10
|
let express = require("express");
|
|
9
11
|
express = require_runtime.__toESM(express, 1);
|
|
10
12
|
//#region src/start.ts
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var DEFAULT_API_PORT = 9229;
|
|
14
|
+
var defaultStartDeps = (env = process.env) => ({
|
|
15
|
+
createApp: express.default,
|
|
16
|
+
i18n: () => (0, _prosopo_locale.i18nMiddleware)({}),
|
|
17
|
+
router: require_api.prosopoRouter,
|
|
18
|
+
logger: (0, _prosopo_logger.getLogger)(_prosopo_logger.LogLevel.enum.info, "prosopo:provider-mock:start.ts"),
|
|
19
|
+
port: readPort(env),
|
|
20
|
+
exit: (code) => {
|
|
21
|
+
process.exit(code);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* The port to listen on.
|
|
26
|
+
*
|
|
27
|
+
* The port used to be the string "9229" with no way to change it, so the mock
|
|
28
|
+
* could not be run twice on one machine. A value that is not a usable port is
|
|
29
|
+
* ignored rather than passed to listen, where it would either throw or — for a
|
|
30
|
+
* number out of range — bind somewhere unexpected.
|
|
31
|
+
*/
|
|
32
|
+
var readPort = (env) => {
|
|
33
|
+
const raw = env.PROVIDER_MOCK_PORT;
|
|
34
|
+
if (raw === void 0 || raw.trim() === "") return DEFAULT_API_PORT;
|
|
35
|
+
const port = Number(raw);
|
|
36
|
+
if (!Number.isInteger(port) || port < 0 || port > 65535) return DEFAULT_API_PORT;
|
|
37
|
+
return port;
|
|
38
|
+
};
|
|
39
|
+
var startApi = async (deps = defaultStartDeps()) => {
|
|
40
|
+
const apiApp = deps.createApp();
|
|
15
41
|
apiApp.use((0, cors.default)());
|
|
16
42
|
apiApp.use(express.default.json());
|
|
17
|
-
apiApp.use(await
|
|
18
|
-
apiApp.use(
|
|
43
|
+
apiApp.use(await deps.i18n());
|
|
44
|
+
apiApp.use(deps.router());
|
|
19
45
|
apiApp.use(_prosopo_api_express_router.handleErrors);
|
|
20
|
-
apiApp.listen(
|
|
21
|
-
|
|
46
|
+
const server = apiApp.listen(deps.port);
|
|
47
|
+
await new Promise((resolvePromise, rejectPromise) => {
|
|
48
|
+
server.once("listening", () => {
|
|
49
|
+
server.removeListener("error", rejectPromise);
|
|
50
|
+
deps.logger.info(() => ({ msg: `Prosopo app listening at http://localhost:${deps.port}` }));
|
|
51
|
+
resolvePromise();
|
|
52
|
+
});
|
|
53
|
+
server.once("error", rejectPromise);
|
|
22
54
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
55
|
+
return apiApp;
|
|
56
|
+
};
|
|
57
|
+
var main = async (deps = defaultStartDeps()) => {
|
|
58
|
+
try {
|
|
59
|
+
await startApi(deps);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
deps.logger.error(() => ({
|
|
62
|
+
err: error instanceof Error ? error : new Error(String(error)),
|
|
63
|
+
msg: "Failed to start API"
|
|
64
|
+
}));
|
|
65
|
+
deps.exit(1);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
if (require_isMain.isMain(require("url").pathToFileURL(__filename).href)) main();
|
|
31
69
|
//#endregion
|
|
70
|
+
exports.DEFAULT_API_PORT = DEFAULT_API_PORT;
|
|
71
|
+
exports.defaultStartDeps = defaultStartDeps;
|
|
72
|
+
exports.main = main;
|
|
73
|
+
exports.readPort = readPort;
|
|
74
|
+
exports.startApi = startApi;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region src/verify.ts
|
|
2
|
+
/**
|
|
3
|
+
* The fixtures this mock provider treats as already verified.
|
|
4
|
+
*
|
|
5
|
+
* They are the accounts and commitment the integration suites sign with; any
|
|
6
|
+
* token carrying one of them is approved without a captcha ever being solved,
|
|
7
|
+
* which is the whole point of the mock.
|
|
8
|
+
*/
|
|
9
|
+
var TEST_COMMITMENT_ID = "0x123456789test";
|
|
10
|
+
var TEST_ACCOUNT = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
|
|
11
|
+
var TEST_DAPP = "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM";
|
|
12
|
+
var VERIFIED_MESSAGE = "API.USER_VERIFIED";
|
|
13
|
+
var NOT_VERIFIED_MESSAGE = "API.USER_NOT_VERIFIED";
|
|
14
|
+
/**
|
|
15
|
+
* Decide whether a decoded token counts as verified.
|
|
16
|
+
*
|
|
17
|
+
* Any one of the three fixtures matching is enough — a token only carries the
|
|
18
|
+
* fields the client filled in, so requiring all three would never approve.
|
|
19
|
+
* Empty strings are not matches: an absent field decodes to "" and must not be
|
|
20
|
+
* able to satisfy a comparison against a fixture.
|
|
21
|
+
*/
|
|
22
|
+
var verifyProcaptchaOutput = (output) => {
|
|
23
|
+
if (!(output.user === "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" || output.commitmentId === "0x123456789test" || output.dapp === "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM")) return {
|
|
24
|
+
statusMessage: NOT_VERIFIED_MESSAGE,
|
|
25
|
+
verified: false
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
statusMessage: VERIFIED_MESSAGE,
|
|
29
|
+
verified: true,
|
|
30
|
+
commitmentId: TEST_COMMITMENT_ID
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.NOT_VERIFIED_MESSAGE = NOT_VERIFIED_MESSAGE;
|
|
35
|
+
exports.TEST_ACCOUNT = TEST_ACCOUNT;
|
|
36
|
+
exports.TEST_COMMITMENT_ID = TEST_COMMITMENT_ID;
|
|
37
|
+
exports.TEST_DAPP = TEST_DAPP;
|
|
38
|
+
exports.VERIFIED_MESSAGE = VERIFIED_MESSAGE;
|
|
39
|
+
exports.verifyProcaptchaOutput = verifyProcaptchaOutput;
|
package/dist/db.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { MongoDatabase } from "@prosopo/database";
|
|
|
2
2
|
import type { Logger } from "@prosopo/logger";
|
|
3
3
|
import type { Tables } from "@prosopo/types-database";
|
|
4
4
|
import type mongoose from "mongoose";
|
|
5
|
-
declare enum TableNames {
|
|
5
|
+
export declare enum TableNames {
|
|
6
6
|
ja4 = "ja4"
|
|
7
7
|
}
|
|
8
|
-
type JA4Data = {
|
|
8
|
+
export type JA4Data = {
|
|
9
9
|
application?: string;
|
|
10
10
|
library?: string;
|
|
11
11
|
device?: string;
|
|
@@ -24,7 +24,12 @@ type JA4Data = {
|
|
|
24
24
|
ja4ts_fingerprint?: string;
|
|
25
25
|
ja4tscan_fingerprint?: string;
|
|
26
26
|
};
|
|
27
|
-
type JA4Record = JA4Data & mongoose.Document;
|
|
27
|
+
export type JA4Record = JA4Data & mongoose.Document;
|
|
28
|
+
export interface JA4Store {
|
|
29
|
+
connect: () => Promise<void>;
|
|
30
|
+
close: () => Promise<void>;
|
|
31
|
+
addOrUpdateJA4Record: (record: JA4Data) => Promise<JA4Record | null>;
|
|
32
|
+
}
|
|
28
33
|
export declare class JA4Database extends MongoDatabase {
|
|
29
34
|
tables: Tables<TableNames>;
|
|
30
35
|
constructor(url: string, dbname?: string, authSource?: string, logger?: Logger);
|
|
@@ -34,5 +39,4 @@ export declare class JA4Database extends MongoDatabase {
|
|
|
34
39
|
getJA4RecordByFingerprintAndUserAgent(ja4Fingerprint: string, userAgentString: string): Promise<JA4Record | null>;
|
|
35
40
|
addOrUpdateJA4Record(ja4Record: JA4Data): Promise<JA4Record | null>;
|
|
36
41
|
}
|
|
37
|
-
export {};
|
|
38
42
|
//# sourceMappingURL=db.d.ts.map
|
package/dist/db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,oBAAY,UAAU;IACrB,GAAG,QAAQ;CACX;AAED,MAAM,MAAM,OAAO,GAAG;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CA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o/common";
|
|
2
2
|
import { MongoDatabase } from "@prosopo/database";
|
|
3
3
|
import { Schema } from "mongoose";
|
|
4
|
-
//#region src/db.ts
|
|
5
4
|
var JA4Schema = new Schema({
|
|
6
5
|
application: String,
|
|
7
6
|
library: String,
|
|
@@ -49,22 +48,32 @@ var JA4Database = class extends MongoDatabase {
|
|
|
49
48
|
}
|
|
50
49
|
async connect() {
|
|
51
50
|
await super.connect();
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const connection = this.connection;
|
|
52
|
+
if (connection === void 0) throw new ProsopoDBError("DATABASE.CONNECTION_UNDEFINED", {
|
|
53
|
+
context: { failedFuncName: this.connect.name },
|
|
54
|
+
logger: this.logger
|
|
54
55
|
});
|
|
56
|
+
for (const { collectionName, modelName, schema } of DATA_TABLES) this.tables[collectionName] = connection.model(modelName, schema);
|
|
55
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* The registered models.
|
|
60
|
+
*
|
|
61
|
+
* The check used to be `!this.tables`, which the constructor makes
|
|
62
|
+
* impossible, so querying before connect() failed with a TypeError on
|
|
63
|
+
* undefined rather than the database error it is.
|
|
64
|
+
*/
|
|
56
65
|
getTables() {
|
|
57
|
-
if (
|
|
66
|
+
if (this.tables["ja4"] === void 0) throw new ProsopoDBError("DATABASE.TABLES_UNDEFINED", {
|
|
58
67
|
context: { failedFuncName: this.getTables.name },
|
|
59
68
|
logger: this.logger
|
|
60
69
|
});
|
|
61
70
|
return this.tables;
|
|
62
71
|
}
|
|
63
72
|
async getJA4Records() {
|
|
64
|
-
return this.
|
|
73
|
+
return this.getTables().ja4.find({});
|
|
65
74
|
}
|
|
66
75
|
async getJA4RecordByFingerprintAndUserAgent(ja4Fingerprint, userAgentString) {
|
|
67
|
-
return this.
|
|
76
|
+
return this.getTables().ja4.findOne({
|
|
68
77
|
ja4_fingerprint: ja4Fingerprint,
|
|
69
78
|
user_agent_string: userAgentString
|
|
70
79
|
});
|
|
@@ -76,7 +85,7 @@ var JA4Database = class extends MongoDatabase {
|
|
|
76
85
|
await existingRecord.save();
|
|
77
86
|
return existingRecord;
|
|
78
87
|
}
|
|
79
|
-
const newRecord = new this.
|
|
88
|
+
const newRecord = new (this.getTables()).ja4(ja4Record);
|
|
80
89
|
await newRecord.save();
|
|
81
90
|
return newRecord;
|
|
82
91
|
}
|
package/dist/db.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,CAAN,IAAY,UAEX;AAFD,WAAY,UAAU;IACrB,yBAAW,CAAA;AACZ,CAAC,EAFW,UAAU,KAAV,UAAU,QAErB;AAoCD,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,EAAE,EAAE,MAAM;IACV,iBAAiB,EAAE,MAAM;IACzB,qBAAqB,EAAE,MAAM;IAC7B,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE;IAC/C,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IAC3C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IACpC,eAAe,EAAE,EAAE,IA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,CAAC,CAAC;QACxD,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IAClB,CAAC;CACD"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
package/dist/isMain.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMain.d.ts","sourceRoot":"","sources":["../src/isMain.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,MAAM,cACP,MAAM,eACL,MAAM,GAAG,SAAS,KAC5B,OASF,CAAC"}
|
package/dist/isMain.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { argv } from "node:process";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
//#region src/isMain.ts
|
|
5
|
+
/**
|
|
6
|
+
* Whether the module at moduleUrl is the one node was asked to run.
|
|
7
|
+
*
|
|
8
|
+
* Guards the module's side effects so importing it — for its exports, or from a
|
|
9
|
+
* test — does not start a server.
|
|
10
|
+
*/
|
|
11
|
+
var isMain = (moduleUrl, entrypoint = argv[1]) => {
|
|
12
|
+
if (entrypoint === void 0) return false;
|
|
13
|
+
return fileURLToPath(moduleUrl) === resolve(entrypoint);
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { isMain };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMain.js","sourceRoot":"","sources":["../src/isMain.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQzC,MAAM,CAAC,MAAM,MAAM,GAAG,CACrB,SAAiB,EACjB,aAAiC,IAAI,CAAC,CAAC,CAAC,EAC9B,EAAE;IACZ,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACd,CAAC;IAKD,OAAO,aAAa,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AACzD,CAAC,CAAC"}
|
package/dist/start.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
+
import { type Logger } from "@prosopo/logger";
|
|
2
|
+
import { type Express, type RequestHandler } from "express";
|
|
3
|
+
import { type RouterDeps, prosopoRouter } from "./api.js";
|
|
4
|
+
export declare const DEFAULT_API_PORT = 9229;
|
|
5
|
+
type Router = ReturnType<typeof prosopoRouter>;
|
|
6
|
+
export interface StartDeps {
|
|
7
|
+
createApp: () => Express;
|
|
8
|
+
i18n: () => Promise<RequestHandler>;
|
|
9
|
+
router: (deps?: RouterDeps) => Router;
|
|
10
|
+
logger: Logger;
|
|
11
|
+
port: number;
|
|
12
|
+
exit: (code: number) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const defaultStartDeps: (env?: NodeJS.ProcessEnv) => StartDeps;
|
|
15
|
+
export declare const readPort: (env: NodeJS.ProcessEnv) => number;
|
|
16
|
+
export declare const startApi: (deps?: StartDeps) => Promise<Express>;
|
|
17
|
+
export declare const main: (deps?: StartDeps) => Promise<void>;
|
|
1
18
|
export {};
|
|
2
19
|
//# sourceMappingURL=start.d.ts.map
|
package/dist/start.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAY,KAAK,MAAM,EAAa,MAAM,iBAAiB,CAAC;AAEnE,OAAgB,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG1D,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/C,MAAM,WAAW,SAAS;IACzB,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,IAAI,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,KAAK,MAAM,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,SACvB,MAAM,CAAC,UAAU,KACpB,SASD,CAAC;AAUH,eAAO,MAAM,QAAQ,QAAS,MAAM,CAAC,UAAU,KAAG,MAUjD,CAAC;AAEF,eAAO,MAAM,QAAQ,UACd,SAAS,KACb,OAAO,CAAC,OAAO,CA0BjB,CAAC;AAEF,eAAO,MAAM,IAAI,UACV,SAAS,KACb,OAAO,CAAC,IAAI,CAUd,CAAC"}
|