@prosopo/user-access-policy 3.13.0 → 3.14.0

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.
Files changed (42) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +7 -7
  2. package/.turbo/turbo-build$colon$tsc.log +14 -14
  3. package/.turbo/turbo-build.log +8 -8
  4. package/CHANGELOG.md +28 -0
  5. package/dist/cjs/mongoose/mongooseRuleSchema.cjs +4 -0
  6. package/dist/cjs/redis/redisRuleIndex.cjs +4 -0
  7. package/dist/cjs/rule.cjs +1 -0
  8. package/dist/cjs/ruleInput/userScopeInput.cjs +9 -1
  9. package/dist/cjs/ruleRecord.cjs +2 -1
  10. package/dist/mongoose/mongooseRuleSchema.d.ts.map +1 -1
  11. package/dist/mongoose/mongooseRuleSchema.js +4 -0
  12. package/dist/mongoose/mongooseRuleSchema.js.map +1 -1
  13. package/dist/redis/redisRuleIndex.d.ts.map +1 -1
  14. package/dist/redis/redisRuleIndex.js +4 -0
  15. package/dist/redis/redisRuleIndex.js.map +1 -1
  16. package/dist/rule.d.ts +3 -1
  17. package/dist/rule.d.ts.map +1 -1
  18. package/dist/rule.js +1 -0
  19. package/dist/rule.js.map +1 -1
  20. package/dist/ruleInput/ruleInput.d.ts +6 -0
  21. package/dist/ruleInput/ruleInput.d.ts.map +1 -1
  22. package/dist/ruleInput/userScopeInput.d.ts +8 -0
  23. package/dist/ruleInput/userScopeInput.d.ts.map +1 -1
  24. package/dist/ruleInput/userScopeInput.js +9 -1
  25. package/dist/ruleInput/userScopeInput.js.map +1 -1
  26. package/dist/ruleRecord.d.ts +2 -2
  27. package/dist/ruleRecord.d.ts.map +1 -1
  28. package/dist/ruleRecord.js +2 -1
  29. package/dist/ruleRecord.js.map +1 -1
  30. package/dist/tests/redis/reader/redisRulesQuery.unit.test.js +3 -3
  31. package/dist/tests/redis/reader/redisRulesQuery.unit.test.js.map +1 -1
  32. package/dist/tests/transformRule.unit.test.js +1 -0
  33. package/dist/tests/transformRule.unit.test.js.map +1 -1
  34. package/package.json +4 -4
  35. package/src/mongoose/mongooseRuleSchema.ts +1 -0
  36. package/src/redis/redisRuleIndex.ts +1 -0
  37. package/src/rule.ts +16 -0
  38. package/src/ruleInput/userScopeInput.ts +21 -0
  39. package/src/ruleRecord.ts +1 -0
  40. package/src/tests/redis/reader/redisRulesQuery.unit.test.ts +3 -3
  41. package/src/tests/transformRule.unit.test.ts +1 -0
  42. package/tsconfig.tsbuildinfo +1 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/user-access-policy@3.13.0 build:cjs
2
+ > @prosopo/user-access-policy@3.14.0 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -43,11 +43,11 @@ dist/cjs/api/write/.export.cjs 0.00 kB │ gzip: 0.02 kB
43
43
  dist/cjs/mongoose/.export.cjs 0.25 kB │ gzip: 0.16 kB
44
44
  dist/cjs/rulesStorage.cjs 0.34 kB │ gzip: 0.22 kB
45
45
  dist/cjs/redis/.export.cjs 0.40 kB │ gzip: 0.18 kB
46
- dist/cjs/rule.cjs 0.45 kB │ gzip: 0.26 kB
46
+ dist/cjs/rule.cjs 0.48 kB │ gzip: 0.27 kB
47
47
  dist/cjs/api/.export.cjs 0.53 kB │ gzip: 0.21 kB
48
48
  dist/cjs/ruleInput/.export.cjs 0.57 kB │ gzip: 0.20 kB
49
49
  dist/cjs/api/delete/deleteAllRules.cjs 0.79 kB │ gzip: 0.41 kB
50
- dist/cjs/ruleRecord.cjs 0.90 kB │ gzip: 0.38 kB
50
+ dist/cjs/ruleRecord.cjs 0.92 kB │ gzip: 0.39 kB
51
51
  dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
52
52
  dist/cjs/api/read/getMissingIds.cjs 1.12 kB │ gzip: 0.51 kB
53
53
  dist/cjs/api/read/fetchRules.cjs 1.22 kB │ gzip: 0.54 kB
@@ -57,7 +57,7 @@ dist/cjs/classifyBrowser.cjs 1.45 kB │ gzip: 0.73 kB
57
57
  dist/cjs/api/write/rehashRules.cjs 1.48 kB │ gzip: 0.56 kB
58
58
  dist/cjs/api/delete/deleteRules.cjs 1.52 kB │ gzip: 0.65 kB
59
59
  dist/cjs/api/read/findRuleIds.cjs 1.58 kB │ gzip: 0.66 kB
60
- dist/cjs/mongoose/mongooseRuleSchema.cjs 1.79 kB │ gzip: 0.45 kB
60
+ dist/cjs/mongoose/mongooseRuleSchema.cjs 1.85 kB │ gzip: 0.46 kB
61
61
  dist/cjs/redis/redisClient.cjs 1.92 kB │ gzip: 0.72 kB
62
62
  dist/cjs/classifyOs.cjs 2.04 kB │ gzip: 1.05 kB
63
63
  dist/cjs/ruleInput/policyInput.cjs 2.09 kB │ gzip: 0.79 kB
@@ -66,15 +66,15 @@ dist/cjs/matchedRule.cjs 2.29 kB │ gzip: 1.03 kB
66
66
  dist/cjs/.export.cjs 2.44 kB │ gzip: 0.57 kB
67
67
  dist/cjs/api/rulesApiClient.cjs 2.53 kB │ gzip: 0.68 kB
68
68
  dist/cjs/redis/reader/redisAggregate.cjs 2.57 kB │ gzip: 1.04 kB
69
- dist/cjs/ruleInput/userScopeInput.cjs 2.67 kB │ gzip: 0.81 kB
70
69
  dist/cjs/transformRule.cjs 2.90 kB │ gzip: 1.03 kB
70
+ dist/cjs/ruleInput/userScopeInput.cjs 3.02 kB │ gzip: 0.95 kB
71
71
  dist/cjs/api/write/insertRules.cjs 3.12 kB │ gzip: 1.09 kB
72
72
  dist/cjs/redis/redisRulesWriter.cjs 3.50 kB │ gzip: 1.15 kB
73
- dist/cjs/redis/redisRuleIndex.cjs 3.55 kB │ gzip: 0.85 kB
73
+ dist/cjs/redis/redisRuleIndex.cjs 3.64 kB │ gzip: 0.87 kB
74
74
  dist/cjs/api/ruleApiRoutes.cjs 4.14 kB │ gzip: 1.06 kB
75
75
  dist/cjs/redis/reader/redisRulesQuery.cjs 4.76 kB │ gzip: 1.58 kB
76
76
  dist/cjs/redis/reader/redisRulesSplitQuery.cjs 5.17 kB │ gzip: 2.17 kB
77
77
  dist/cjs/headerMatch.cjs 5.74 kB │ gzip: 2.25 kB
78
78
  dist/cjs/redis/reader/redisRulesReader.cjs 11.85 kB │ gzip: 2.88 kB
79
79
 
80
- ✓ built in 116ms
80
+ ✓ built in 99ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/user-access-policy@3.13.0 build:tsc
2
+ > @prosopo/user-access-policy@3.14.0 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 1:15:14 PM - Projects in this build:
5
+ 11:40:48 AM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -15,27 +15,27 @@
15
15
  * ../api/tsconfig.json
16
16
  * tsconfig.json
17
17
 
18
- 1:15:14 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
18
+ 11:40:48 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/vite.backend.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
19
19
 
20
- 1:15:14 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
20
+ 11:40:48 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
21
21
 
22
- 1:15:14 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
22
+ 11:40:48 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
23
23
 
24
- 1:15:14 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
24
+ 11:40:48 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
25
25
 
26
- 1:15:14 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
26
+ 11:40:48 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
27
27
 
28
- 1:15:14 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
28
+ 11:40:48 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
29
29
 
30
- 1:15:14 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
30
+ 11:40:48 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
31
31
 
32
- 1:15:14 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
32
+ 11:40:48 AM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
33
33
 
34
- 1:15:14 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
34
+ 11:40:48 AM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
35
35
 
36
- 1:15:14 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
36
+ 11:40:48 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
37
37
 
38
- 1:15:14 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
38
+ 11:40:48 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
39
39
 
40
- 1:15:14 PM - Building project '/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json'...
40
+ 11:40:48 AM - Building project '/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json'...
41
41
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/user-access-policy@3.13.0 build
2
+ > @prosopo/user-access-policy@3.14.0 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/user-access-policy@3.13.0 build:cross-env
6
+ > @prosopo/user-access-policy@3.14.0 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -50,9 +50,9 @@ dist/redis/.export.js 0.24 kB │ gzip: 0.14 kB
50
50
  dist/rulesStorage.js 0.29 kB │ gzip: 0.19 kB
51
51
  dist/ruleInput/.export.js 0.30 kB │ gzip: 0.14 kB
52
52
  dist/api/.export.js 0.31 kB │ gzip: 0.16 kB
53
- dist/rule.js 0.36 kB │ gzip: 0.23 kB
53
+ dist/rule.js 0.40 kB │ gzip: 0.24 kB
54
54
  dist/api/delete/deleteAllRules.js 0.73 kB │ gzip: 0.37 kB
55
- dist/ruleRecord.js 0.74 kB │ gzip: 0.35 kB
55
+ dist/ruleRecord.js 0.76 kB │ gzip: 0.36 kB
56
56
  dist/api/read/getMissingIds.js 1.02 kB │ gzip: 0.48 kB
57
57
  dist/api/read/fetchRules.js 1.07 kB │ gzip: 0.49 kB
58
58
  dist/redis/redisRulesStorage.js 1.22 kB │ gzip: 0.45 kB
@@ -62,18 +62,18 @@ dist/classifyBrowser.js 1.38 kB │ gzip: 0.71 kB
62
62
  dist/api/read/findRuleIds.js 1.39 kB │ gzip: 0.60 kB
63
63
  dist/api/write/rehashRules.js 1.42 kB │ gzip: 0.53 kB
64
64
  dist/.export.js 1.43 kB │ gzip: 0.42 kB
65
- dist/mongoose/mongooseRuleSchema.js 1.74 kB │ gzip: 0.43 kB
66
65
  dist/redis/redisClient.js 1.78 kB │ gzip: 0.68 kB
66
+ dist/mongoose/mongooseRuleSchema.js 1.79 kB │ gzip: 0.44 kB
67
67
  dist/ruleInput/ruleInput.js 1.80 kB │ gzip: 0.63 kB
68
68
  dist/ruleInput/policyInput.js 1.84 kB │ gzip: 0.73 kB
69
69
  dist/classifyOs.js 1.98 kB │ gzip: 1.03 kB
70
70
  dist/api/rulesApiClient.js 2.12 kB │ gzip: 0.62 kB
71
71
  dist/matchedRule.js 2.22 kB │ gzip: 1.00 kB
72
- dist/ruleInput/userScopeInput.js 2.31 kB │ gzip: 0.70 kB
73
72
  dist/redis/reader/redisAggregate.js 2.35 kB │ gzip: 0.99 kB
74
73
  dist/transformRule.js 2.40 kB │ gzip: 0.94 kB
74
+ dist/ruleInput/userScopeInput.js 2.65 kB │ gzip: 0.85 kB
75
75
  dist/api/write/insertRules.js 2.87 kB │ gzip: 1.03 kB
76
- dist/redis/redisRuleIndex.js 2.87 kB │ gzip: 0.77 kB
76
+ dist/redis/redisRuleIndex.js 2.95 kB │ gzip: 0.79 kB
77
77
  dist/redis/redisRulesWriter.js 3.03 kB │ gzip: 1.07 kB
78
78
  dist/api/ruleApiRoutes.js 3.68 kB │ gzip: 0.99 kB
79
79
  dist/redis/reader/redisRulesQuery.js 4.53 kB │ gzip: 1.54 kB
@@ -81,4 +81,4 @@ dist/redis/reader/redisRulesSplitQuery.js 4.98 kB │ gzip: 2.14 kB
81
81
  dist/headerMatch.js 5.51 kB │ gzip: 2.22 kB
82
82
  dist/redis/reader/redisRulesReader.js 10.44 kB │ gzip: 2.74 kB
83
83
 
84
- ✓ built in 149ms
84
+ ✓ built in 239ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @prosopo/user-access-policy
2
2
 
3
+ ## 3.14.0
4
+ ### Minor Changes
5
+
6
+ - af267c2: Web Bot Auth verifier and an authenticated frictionless flow for pre-verified agents.
7
+
8
+ **`@prosopo/web-bot-auth`** — a new package: an RFC 9421 HTTP Message Signatures verifier built on `@noble/curves/ed25519`, with no Cloudflare dependency. It parses `Signature-Agent` in both its bare-string and dictionary forms, resolves the signer's JWKS at `/.well-known/http-message-signatures-directory` honouring the response's cache-control TTL, and verifies the Ed25519 signature over the RFC 9421 signature base.
9
+
10
+ **Provider fast path.** `/captcha/frictionless` returns `captchaType: authenticated` when a non-`deferToVerify` `AccessPolicyType.Allow` rule matches the request's user scope, and writes a session with `serverChecked: false`, `agent: true` and the issuing IP frozen for verify-time binding. Decrypt, bot score and the decision machine are all skipped. A verified `Signature-Agent` is one way to qualify — the userScope gains a `webBotAuthAgent` field, set only when signature verification succeeded so a rule scoped to a signer can never be matched by a spoofed header — but an IP CIDR, JA4, user agent, ASN or country rule qualifies the same way. A `Block` or `Restrict` on the same match set always wins, because severity outranks Allow.
11
+
12
+ **`/client/authenticated/verify`.** A separate router with mandatory IP binding — the operator must forward the client IP (`API.AUTHENTICATED_IP_REQUIRED`) and it must match the one the session was issued to (`API.AUTHENTICATED_IP_MISMATCH`), so a leaked token cannot be replayed from elsewhere. Single use is enforced through `serverChecked`, and `captchaType` is checked so an ordinary captcha token cannot be redeemed on this route. `clientSessionId` correlation goes through the same `isClientSessionMismatch` helper as pow / image / puzzle, so the authenticated path cannot drift from the others.
13
+
14
+ **Surface.** `AccessPolicyType.Allow` and `CaptchaType.authenticated`; `webBotAuthAgent` on the user scope (indexed, normalised at parse time to a lowercase scheme+host with no trailing slash); `Session.agent` / `Session.webBotAuthAgent` for the Traffic view's "pre-verified pass" filter; `submitAuthenticatedCaptchaVerify` on `ProviderApi` and the matching branch in `@prosopo/server.verifyProvider`; `AuthenticatedBadge` and a dispatch branch in `procaptcha-frictionless`.
15
+
16
+ Three fixes the new end-to-end coverage turned up, each of which broke the flow outright:
17
+
18
+ - `ipMatchesSession` compared the operator's parsed IP against the session's composite halves with `===`. A session read back from Mongo carries BSON (`Decimal128`, or `Long` on pre-migration records), not the `bigint` the type claims, so the comparison was false for every session that had been through the database — every legitimate redemption was rejected as `API.AUTHENTICATED_IP_MISMATCH`. Both halves are now normalised before comparison, and an unparseable half fails closed rather than defaulting to `0n`, so garbage still cannot match garbage.
19
+ - `serverChecked` was never written onto the authenticated session, so "never set" and "consumed" were distinguishable only by an absence. It is now written as `false` at issuance.
20
+ - `serverChecked` was missing from `SESSION_PROJECTION`. Left out, the single-use check reads `undefined` and an authenticated token verifies an unlimited number of times.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [929d99b]
25
+ - Updated dependencies [934fa5d]
26
+ - Updated dependencies [27f525e]
27
+ - Updated dependencies [af267c2]
28
+ - @prosopo/types@5.8.0
29
+ - @prosopo/api@4.2.0
30
+
3
31
  ## 3.13.0
4
32
  ### Minor Changes
5
33
 
@@ -56,6 +56,10 @@ var userAttributesSchema = {
56
56
  headerOperator: {
57
57
  type: String,
58
58
  required: false
59
+ },
60
+ webBotAuthAgent: {
61
+ type: String,
62
+ required: false
59
63
  }
60
64
  };
61
65
  var userIpSchema = {
@@ -74,6 +74,10 @@ var userAttributesRedisSchema = {
74
74
  headerOperator: {
75
75
  type: _redis_search.SCHEMA_FIELD_TYPE.TAG,
76
76
  INDEXMISSING: true
77
+ },
78
+ webBotAuthAgent: {
79
+ type: _redis_search.SCHEMA_FIELD_TYPE.TAG,
80
+ INDEXMISSING: true
77
81
  }
78
82
  };
79
83
  var userScopeRedisSchema = {
package/dist/cjs/rule.cjs CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  var AccessPolicyType = /* @__PURE__ */ function(AccessPolicyType) {
4
4
  AccessPolicyType["Block"] = "block";
5
5
  AccessPolicyType["Restrict"] = "restrict";
6
+ AccessPolicyType["Allow"] = "allow";
6
7
  return AccessPolicyType;
7
8
  }({});
8
9
  var GLOBAL_CLIENT_SCOPE_SENTINEL = "global";
@@ -6,6 +6,13 @@ node_crypto = require_runtime.__toESM(node_crypto, 1);
6
6
  let _prosopo_util = require("@prosopo/util");
7
7
  let ip_address = require("ip-address");
8
8
  //#region src/ruleInput/userScopeInput.ts
9
+ function normaliseSignatureAgentUrl(raw) {
10
+ const url = new URL(raw);
11
+ url.hostname = url.hostname.toLowerCase();
12
+ url.protocol = url.protocol.toLowerCase();
13
+ if (url.pathname === "/") url.pathname = "";
14
+ return url.toString().replace(/\/$/, "");
15
+ }
9
16
  var userAttributesSchema = zod.z.object({
10
17
  userId: zod.z.coerce.string().optional(),
11
18
  ja4Hash: zod.z.coerce.string().optional(),
@@ -20,7 +27,8 @@ var userAttributesSchema = zod.z.object({
20
27
  headerMatch: zod.z.coerce.string().optional(),
21
28
  headerName: zod.z.coerce.string().optional(),
22
29
  headerValue: zod.z.coerce.string().optional(),
23
- headerOperator: zod.z.coerce.string().optional()
30
+ headerOperator: zod.z.coerce.string().optional(),
31
+ webBotAuthAgent: zod.z.coerce.string().url().transform(normaliseSignatureAgentUrl).optional()
24
32
  });
25
33
  var userAttributesInput = zod.z.object({
26
34
  ...userAttributesSchema.shape,
@@ -14,7 +14,8 @@ var userAttributesRecordFields = [
14
14
  "headerMatch",
15
15
  "headerName",
16
16
  "headerValue",
17
- "headerOperator"
17
+ "headerOperator",
18
+ "webBotAuthAgent"
18
19
  ];
19
20
  var userIpRecordFields = ["ip", "ipMask"];
20
21
  var userScopeRecordFields = [...userAttributesRecordFields, ...userIpRecordFields];
@@ -1 +1 @@
1
- {"version":3,"file":"mongooseRuleSchema.d.ts","sourceRoot":"","sources":["../../src/mongoose/mongooseRuleSchema.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,KAAK,EACX,gBAAgB,EAIhB,MAAM,uBAAuB,CAAC;AA6C/B,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,CAAC,gBAAgB,CAKtC,CAAC"}
1
+ {"version":3,"file":"mongooseRuleSchema.d.ts","sourceRoot":"","sources":["../../src/mongoose/mongooseRuleSchema.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,KAAK,EACX,gBAAgB,EAIhB,MAAM,uBAAuB,CAAC;AA8C/B,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,CAAC,gBAAgB,CAKtC,CAAC"}
@@ -56,6 +56,10 @@ var userAttributesSchema = {
56
56
  headerOperator: {
57
57
  type: String,
58
58
  required: false
59
+ },
60
+ webBotAuthAgent: {
61
+ type: String,
62
+ required: false
59
63
  }
60
64
  };
61
65
  var userIpSchema = {
@@ -1 +1 @@
1
- {"version":3,"file":"mongooseRuleSchema.js","sourceRoot":"","sources":["../../src/mongoose/mongooseRuleSchema.ts"],"names":[],"mappings":"AAwBA,MAAM,oBAAoB,GAA2C;IACpE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IACzC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC1C,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC5C,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC9C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC3C,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IACzC,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC9C,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAA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AE,UAOnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAAU,UAAU,KAAG,MACD,CAAC"}
1
+ {"version":3,"file":"redisRuleIndex.d.ts","sourceRoot":"","sources":["../../src/redis/redisRuleIndex.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,KAAK,gBAAgB,EAAqB,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EACX,UAAU,EAKV,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,iBAAiB,EAAE,gBAIL,CAAC;AAE5B,eAAO,MAAM,yBAAyB,EAAE,gBA0BL,CAAC;AAEpC,eAAO,MAAM,oBAAoB,EAAE,gBAGR,CAAC;AAE5B,eAAO,MAAM,sBAAsB,EAAE,gBAKL,CAAC;AAUjC,eAAO,MAAM,qBAAqB,EAAE,gBAiBR,CAAC;AAE7B,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AAGvE,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAMnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,eAAO,MAAM,qBAAqB,EAAE,UAOnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAAU,UAAU,KAAG,MACD,CAAC"}
@@ -74,6 +74,10 @@ var userAttributesRedisSchema = {
74
74
  headerOperator: {
75
75
  type: SCHEMA_FIELD_TYPE.TAG,
76
76
  INDEXMISSING: true
77
+ },
78
+ webBotAuthAgent: {
79
+ type: SCHEMA_FIELD_TYPE.TAG,
80
+ INDEXMISSING: true
77
81
  }
78
82
  };
79
83
  var userScopeRedisSchema = {
@@ -1 +1 @@
1
- {"version":3,"file":"redisRuleIndex.js","sourceRoot":"","sources":["../../src/redis/redisRuleIndex.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAyB,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAQzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,C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AAE,iBAAiB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE;IAM5D,IAAI,EAAE,EAAE,IAAI,EAAE,iBAAiB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE;IAOzD,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE;CACvC,CAAC;AAE7B,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AAGvE,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAMnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,CAAC,MAAM,qBAAqB,GAAe;IAChD,IAAI,EAAE,6BAA6B;IACnC,MAAM,EAAE,qBAAqB;IAC7B,OAAO,EAAE;QACR,EAAE,EAAE,MAAe;QACnB,MAAM,EAAE,CAAC,4BAA4B,CAAC;KACtC;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAgB,EAAU,EAAE,CACjE,4BAA4B,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC"}
package/dist/rule.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import type { CaptchaType } from "@prosopo/types";
2
2
  export declare enum AccessPolicyType {
3
3
  Block = "block",
4
- Restrict = "restrict"
4
+ Restrict = "restrict",
5
+ Allow = "allow"
5
6
  }
6
7
  export declare const GLOBAL_CLIENT_SCOPE_SENTINEL = "global";
7
8
  export type AccessPolicy = {
@@ -38,6 +39,7 @@ export type UserAttributes = {
38
39
  headerName?: string;
39
40
  headerValue?: string;
40
41
  headerOperator?: string;
42
+ webBotAuthAgent?: string;
41
43
  };
42
44
  export type UserScope = UserAttributes & UserIp;
43
45
  export type AccessRule = AccessPolicy & PolicyScope & UserScope & {
@@ -1 +1 @@
1
- {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../src/rule.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK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AAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IAMb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IAUjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IAOxB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,MAAM,CAAC;AAGhD,MAAM,MAAM,UAAU,GAAG,YAAY,GACpC,WAAW,GACX,SAAS,GAAG;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
package/dist/rule.js CHANGED
@@ -3,6 +3,7 @@ import "./_virtual/_rolldown/runtime.js";
3
3
  var AccessPolicyType = /* @__PURE__ */ function(AccessPolicyType) {
4
4
  AccessPolicyType["Block"] = "block";
5
5
  AccessPolicyType["Restrict"] = "restrict";
6
+ AccessPolicyType["Allow"] = "allow";
6
7
  return AccessPolicyType;
7
8
  }({});
8
9
  var GLOBAL_CLIENT_SCOPE_SENTINEL = "global";
package/dist/rule.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rule.js","sourceRoot":"","sources":["../src/rule.ts"],"names":[],"mappings":"AAeA,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,yCAAqB,CAAA;AACtB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAYD,MAAM,CAAC,MAAM,4BAA4B,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"rule.js","sourceRoot":"","sources":["../src/rule.ts"],"names":[],"mappings":"AAeA,MAAM,CAAN,IAAY,gBAYX;AAZD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,yCAAqB,CAAA;IASrB,mCAAe,CAAA;AAChB,CAAC,EAZW,gBAAgB,KAAhB,gBAAgB,QAY3B;AAYD,MAAM,CAAC,MAAM,4BAA4B,GAAG,QAAQ,CAAC"}
@@ -69,6 +69,7 @@ export declare const accessRulesFilterInput: z.ZodObject<{
69
69
  headerName: z.ZodOptional<z.ZodString>;
70
70
  headerValue: z.ZodOptional<z.ZodString>;
71
71
  headerOperator: z.ZodOptional<z.ZodString>;
72
+ webBotAuthAgent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
72
73
  }, "strip", z.ZodTypeAny, {
73
74
  userAgentHash?: string | undefined;
74
75
  userId?: string | undefined;
@@ -84,6 +85,7 @@ export declare const accessRulesFilterInput: z.ZodObject<{
84
85
  headerName?: string | undefined;
85
86
  headerValue?: string | undefined;
86
87
  headerOperator?: string | undefined;
88
+ webBotAuthAgent?: string | undefined;
87
89
  userAgent?: string | undefined;
88
90
  }, {
89
91
  userAgentHash?: string | undefined;
@@ -100,6 +102,7 @@ export declare const accessRulesFilterInput: z.ZodObject<{
100
102
  headerName?: string | undefined;
101
103
  headerValue?: string | undefined;
102
104
  headerOperator?: string | undefined;
105
+ webBotAuthAgent?: string | undefined;
103
106
  userAgent?: string | undefined;
104
107
  }>, import("#policy/rule.js").UserAttributes, {
105
108
  userAgentHash?: string | undefined;
@@ -116,6 +119,7 @@ export declare const accessRulesFilterInput: z.ZodObject<{
116
119
  headerName?: string | undefined;
117
120
  headerValue?: string | undefined;
118
121
  headerOperator?: string | undefined;
122
+ webBotAuthAgent?: string | undefined;
119
123
  userAgent?: string | undefined;
120
124
  }>>, UserScopeInput, {} & {
121
125
  ip?: string | undefined;
@@ -138,6 +142,7 @@ export declare const accessRulesFilterInput: z.ZodObject<{
138
142
  headerName?: string | undefined;
139
143
  headerValue?: string | undefined;
140
144
  headerOperator?: string | undefined;
145
+ webBotAuthAgent?: string | undefined;
141
146
  userAgent?: string | undefined;
142
147
  }>>;
143
148
  userScopeMatch: z.ZodDefault<z.ZodNativeEnum<typeof FilterScopeMatch>>;
@@ -179,6 +184,7 @@ export declare const accessRulesFilterInput: z.ZodObject<{
179
184
  headerName?: string | undefined;
180
185
  headerValue?: string | undefined;
181
186
  headerOperator?: string | undefined;
187
+ webBotAuthAgent?: string | undefined;
182
188
  userAgent?: string | undefined;
183
189
  }) | undefined;
184
190
  groupId?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ruleInput.d.ts","sourceRoot":"","sources":["../../src/ruleInput/ruleInput.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AAE1E,KAAK,cAAc,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,YAAY,GACzC,WAAW,GACX,cAAc,GACd,cAAc,CAAC;AA6BhB,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAOL,CAAC;AAEnE,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAIrC,CAAC;AAEvC,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG;IACxD,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,YAAY,CAAC,EAAE,WA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AW,EAAE,CAAC;CAC7B,CAAC;AAQF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaS,CAAC;AAE7C,eAAO,MAAM,6BAA6B,gBAC5B,sBAAsB,KACjC,iBAAiB,EAiBnB,CAAC"}
@@ -19,6 +19,7 @@ export declare const userScopeSchema: z.ZodObject<{
19
19
  headerName: z.ZodOptional<z.ZodString>;
20
20
  headerValue: z.ZodOptional<z.ZodString>;
21
21
  headerOperator: z.ZodOptional<z.ZodString>;
22
+ webBotAuthAgent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
22
23
  numericIp: z.ZodOptional<z.ZodBigInt>;
23
24
  numericIpMaskMin: z.ZodOptional<z.ZodBigInt>;
24
25
  numericIpMaskMax: z.ZodOptional<z.ZodBigInt>;
@@ -37,6 +38,7 @@ export declare const userScopeSchema: z.ZodObject<{
37
38
  headerName?: string | undefined;
38
39
  headerValue?: string | undefined;
39
40
  headerOperator?: string | undefined;
41
+ webBotAuthAgent?: string | undefined;
40
42
  numericIp?: bigint | undefined;
41
43
  numericIpMaskMin?: bigint | undefined;
42
44
  numericIpMaskMax?: bigint | undefined;
@@ -55,6 +57,7 @@ export declare const userScopeSchema: z.ZodObject<{
55
57
  headerName?: string | undefined;
56
58
  headerValue?: string | undefined;
57
59
  headerOperator?: string | undefined;
60
+ webBotAuthAgent?: string | undefined;
58
61
  numericIp?: bigint | undefined;
59
62
  numericIpMaskMin?: bigint | undefined;
60
63
  numericIpMaskMax?: bigint | undefined;
@@ -99,6 +102,7 @@ export declare const userScopeInput: z.ZodEffects<z.ZodIntersection<z.ZodInterse
99
102
  headerName: z.ZodOptional<z.ZodString>;
100
103
  headerValue: z.ZodOptional<z.ZodString>;
101
104
  headerOperator: z.ZodOptional<z.ZodString>;
105
+ webBotAuthAgent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
102
106
  }, "strip", z.ZodTypeAny, {
103
107
  userAgentHash?: string | undefined;
104
108
  userId?: string | undefined;
@@ -114,6 +118,7 @@ export declare const userScopeInput: z.ZodEffects<z.ZodIntersection<z.ZodInterse
114
118
  headerName?: string | undefined;
115
119
  headerValue?: string | undefined;
116
120
  headerOperator?: string | undefined;
121
+ webBotAuthAgent?: string | undefined;
117
122
  userAgent?: string | undefined;
118
123
  }, {
119
124
  userAgentHash?: string | undefined;
@@ -130,6 +135,7 @@ export declare const userScopeInput: z.ZodEffects<z.ZodIntersection<z.ZodInterse
130
135
  headerName?: string | undefined;
131
136
  headerValue?: string | undefined;
132
137
  headerOperator?: string | undefined;
138
+ webBotAuthAgent?: string | undefined;
133
139
  userAgent?: string | undefined;
134
140
  }>, UserAttributes, {
135
141
  userAgentHash?: string | undefined;
@@ -146,6 +152,7 @@ export declare const userScopeInput: z.ZodEffects<z.ZodIntersection<z.ZodInterse
146
152
  headerName?: string | undefined;
147
153
  headerValue?: string | undefined;
148
154
  headerOperator?: string | undefined;
155
+ webBotAuthAgent?: string | undefined;
149
156
  userAgent?: string | undefined;
150
157
  }>>, UserScopeInput, {} & {
151
158
  ip?: string | undefined;
@@ -168,6 +175,7 @@ export declare const userScopeInput: z.ZodEffects<z.ZodIntersection<z.ZodInterse
168
175
  headerName?: string | undefined;
169
176
  headerValue?: string | undefined;
170
177
  headerOperator?: string | undefined;
178
+ webBotAuthAgent?: string | undefined;
171
179
  userAgent?: string | undefined;
172
180
  }>;
173
181
  //# sourceMappingURL=userScopeInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"userScopeInput.d.ts","sourceRoot":"","sources":["../../src/ruleInput/userScopeInput.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAgB,CAAC,EAAE,MAAM,KAAK,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQzB,CAAC"}
@@ -4,6 +4,13 @@ import crypto from "node:crypto";
4
4
  import { getIPAddress } from "@prosopo/util";
5
5
  import { Address4, Address6 } from "ip-address";
6
6
  //#region src/ruleInput/userScopeInput.ts
7
+ function normaliseSignatureAgentUrl(raw) {
8
+ const url = new URL(raw);
9
+ url.hostname = url.hostname.toLowerCase();
10
+ url.protocol = url.protocol.toLowerCase();
11
+ if (url.pathname === "/") url.pathname = "";
12
+ return url.toString().replace(/\/$/, "");
13
+ }
7
14
  var userAttributesSchema = z.object({
8
15
  userId: z.coerce.string().optional(),
9
16
  ja4Hash: z.coerce.string().optional(),
@@ -18,7 +25,8 @@ var userAttributesSchema = z.object({
18
25
  headerMatch: z.coerce.string().optional(),
19
26
  headerName: z.coerce.string().optional(),
20
27
  headerValue: z.coerce.string().optional(),
21
- headerOperator: z.coerce.string().optional()
28
+ headerOperator: z.coerce.string().optional(),
29
+ webBotAuthAgent: z.coerce.string().url().transform(normaliseSignatureAgentUrl).optional()
22
30
  });
23
31
  var userAttributesInput = z.object({
24
32
  ...userAttributesSchema.shape,
@@ -1 +1 @@
1
- {"version":3,"file":"userScopeInput.js","sourceRoot":"","sources":["../../src/ruleInput/userScopeInput.ts"],"names":[],"mappings":"AAcA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAgB,CAAC,EAAE,MAAM,KAAK,CAAC;AAMtC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAErC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ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,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACE,CAAC;KAChC,SAAS,CAAC,CAAC,WAAwB,EAAU,EAAE;IAE/C,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,GAAG,WAAW,CAAC;IAErD,IAAI,QAAQ,KAAK,OAAO,EAAE,EAAE,CAAC;QAC5B,aAAa,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACrD,CAAC;IAGD,IAAI,QAAQ,KAAK,OAAO,MAAM,EAAE,CAAC;QAIhC,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;YACxC,CAAC,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC;YACtB,CAAC,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;QAExB,aAAa,CAAC,gBAAgB,GAAG,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC;QAClE,aAAa,CAAC,gBAAgB,GAAG,QAAQ,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC;IACjE,CAAC;IAED,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC,CAAC;AAIJ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,GAAG,YAAY,CAAC,KAAK;IACrB,GAAG,oBAAoB,CAAC,KAAK;CACA,CAA8B,CAAC;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC7B,MAAM,CAAC,EAAE,CAAC;KAEV,GAAG,CAAC,WAAW,CAAC;KAChB,GAAG,CAAC,mBAAmB,CAAC;KACxB,SAAS,CAET,CAAC,cAAc,EAAkB,EAAE,CAAC,cAAc,CAClD,CAAC"}
@@ -2,14 +2,14 @@ import type { AccessPolicy, PolicyScope, UserAttributes } from "#policy/rule.js"
2
2
  export type UserAttributesRecord = Omit<UserAttributes, "userAgentHash"> & {
3
3
  userAgent?: string;
4
4
  };
5
- export declare const userAttributesRecordFields: ["userId", "ja4Hash", "headersHash", "userAgent", "headHash", "coords", "countryCode", "asn", "os", "browser", "headerMatch", "headerName", "headerValue", "headerOperator"];
5
+ export declare const userAttributesRecordFields: ["userId", "ja4Hash", "headersHash", "userAgent", "headHash", "coords", "countryCode", "asn", "os", "browser", "headerMatch", "headerName", "headerValue", "headerOperator", "webBotAuthAgent"];
6
6
  export type UserIpRecord = {
7
7
  ip?: string;
8
8
  ipMask?: string;
9
9
  };
10
10
  export declare const userIpRecordFields: ["ip", "ipMask"];
11
11
  export type UserScopeRecord = UserAttributesRecord & UserIpRecord;
12
- export declare const userScopeRecordFields: ["userId", "ja4Hash", "headersHash", "userAgent", "headHash", "coords", "countryCode", "asn", "os", "browser", "headerMatch", "headerName", "headerValue", "headerOperator", "ip", "ipMask"];
12
+ export declare const userScopeRecordFields: ["userId", "ja4Hash", "headersHash", "userAgent", "headHash", "coords", "countryCode", "asn", "os", "browser", "headerMatch", "headerName", "headerValue", "headerOperator", "webBotAuthAgent", "ip", "ipMask"];
13
13
  export type UserScopeRecordField = (typeof userScopeRecordFields)[number];
14
14
  export type AccessRuleRecord = AccessPolicy & PolicyScope & UserScopeRecord & {
15
15
  ruleGroupId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ruleRecord.d.ts","sourceRoot":"","sources":["../src/ruleRecord.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACX,YAAY,EACZ,WAAW,EACX,cAAc,EACd,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,GAAG;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,0BAA0B,8KAeY,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG;IAE1B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAE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AC"}
@@ -14,7 +14,8 @@ var userAttributesRecordFields = [
14
14
  "headerMatch",
15
15
  "headerName",
16
16
  "headerValue",
17
- "headerOperator"
17
+ "headerOperator",
18
+ "webBotAuthAgent"
18
19
  ];
19
20
  var userIpRecordFields = ["ip", "ipMask"];
20
21
  var userScopeRecordFields = [...userAttributesRecordFields, ...userIpRecordFields];
@@ -1 +1 @@
1
- {"version":3,"file":"ruleRecord.js","sourceRoot":"","sources":["../src/ruleRecord.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC,QAAQ;IACR,SAAS;IACT,aAAa;IACb,WAAW;IACX,UAAU;IACV,QAAQ;IACR,aAAa;IACb,KAAK;IACL,IAAI;IACJ,SAAS;IACT,aAAa;IACb,YAAY;IACZ,aAAa;IACb,gBAAgB;CACkC,CAAC;AASpD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,IAAI;IACJ,QAAQ;CACkC,CAAC;AAI5C,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC,GAAG,0BAA0B;IAC7B,GAAG,kBAAkB;CACwB,CAAC;AAU/C,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACrD,UAA4B,EACV,EAAE,CACpB,MAAM,CAAC,WAAW,CACjB,qBAAqB;KACnB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;KAC1C,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAC5C,CAAC"}
1
+ {"version":3,"file":"ruleRecord.js","sourceRoot":"","sources":["../src/ruleRecord.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC,QAAQ;IACR,SAAS;IACT,aAAa;IACb,WAAW;IACX,UAAU;IACV,QAAQ;IACR,aAAa;IACb,KAAK;IACL,IAAI;IACJ,SAAS;IACT,aAAa;IACb,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,iBAAiB;CACiC,CAAC;AASpD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,IAAI;IACJ,QAAQ;CACkC,CAAC;AAI5C,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC,GAAG,0BAA0B;IAC7B,GAAG,kBAAkB;CACwB,CAAC;AAU/C,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACrD,UAA4B,EACV,EAAE,CACpB,MAAM,CAAC,WAAW,CACjB,qBAAqB;KACnB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;KAC1C,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAC5C,CAAC"}
@@ -24,7 +24,7 @@ describe("getRulesRedisQuery", () => {
24
24
  userScopeMatch: FilterScopeMatch.Exact,
25
25
  };
26
26
  const query = getRulesRedisQuery(filter, true);
27
- expect(query).toBe("( ( @numericIp:[100 100] | ( @numericIpMaskMin:[-inf 100] @numericIpMaskMax:[100 +inf] ) ) @ja4Hash:{ja4Hash} ismissing(@userAgentHash) ismissing(@userId) ismissing(@headersHash) ismissing(@headHash) ismissing(@coords) ismissing(@countryCode) ismissing(@asn) ismissing(@os) ismissing(@browser) ismissing(@headerMatch) ismissing(@headerName) ismissing(@headerValue) ismissing(@headerOperator) )");
27
+ expect(query).toBe("( ( @numericIp:[100 100] | ( @numericIpMaskMin:[-inf 100] @numericIpMaskMax:[100 +inf] ) ) @ja4Hash:{ja4Hash} ismissing(@userAgentHash) ismissing(@userId) ismissing(@headersHash) ismissing(@headHash) ismissing(@coords) ismissing(@countryCode) ismissing(@asn) ismissing(@os) ismissing(@browser) ismissing(@headerMatch) ismissing(@headerName) ismissing(@headerValue) ismissing(@headerOperator) ismissing(@webBotAuthAgent) )");
28
28
  });
29
29
  it("puts ismissing(x) for multiple fields passed in as `undefined` when user scope match is exact", () => {
30
30
  const filter = {
@@ -80,7 +80,7 @@ describe("getRulesRedisQuery", () => {
80
80
  userScopeMatch: FilterScopeMatch.Exact,
81
81
  };
82
82
  const query = getRulesRedisQuery(filter, true);
83
- expect(query).toBe("( ( @numericIp:[100 100] | ( @numericIpMaskMin:[-inf 100] @numericIpMaskMax:[100 +inf] ) ) @ja4Hash:{ja4Hash} ismissing(@userAgentHash) ismissing(@headersHash) ismissing(@userId) ismissing(@headHash) ismissing(@coords) ismissing(@countryCode) ismissing(@asn) ismissing(@os) ismissing(@browser) ismissing(@headerMatch) ismissing(@headerName) ismissing(@headerValue) ismissing(@headerOperator) )");
83
+ expect(query).toBe("( ( @numericIp:[100 100] | ( @numericIpMaskMin:[-inf 100] @numericIpMaskMax:[100 +inf] ) ) @ja4Hash:{ja4Hash} ismissing(@userAgentHash) ismissing(@headersHash) ismissing(@userId) ismissing(@headHash) ismissing(@coords) ismissing(@countryCode) ismissing(@asn) ismissing(@os) ismissing(@browser) ismissing(@headerMatch) ismissing(@headerName) ismissing(@headerValue) ismissing(@headerOperator) ismissing(@webBotAuthAgent) )");
84
84
  });
85
85
  it("does not put ismissing(numericIp) when numericIpMaskMin and numericIpMaskMax are passed in", () => {
86
86
  const filter = {
@@ -95,7 +95,7 @@ describe("getRulesRedisQuery", () => {
95
95
  userScopeMatch: FilterScopeMatch.Exact,
96
96
  };
97
97
  const query = getRulesRedisQuery(filter, true);
98
- expect(query).toBe("( @numericIpMaskMin:[-inf 100] @numericIpMaskMax:[200 +inf] @ja4Hash:{ja4Hash} ismissing(@userAgentHash) ismissing(@headersHash) ismissing(@userId) ismissing(@headHash) ismissing(@coords) ismissing(@countryCode) ismissing(@asn) ismissing(@os) ismissing(@browser) ismissing(@headerMatch) ismissing(@headerName) ismissing(@headerValue) ismissing(@headerOperator) )");
98
+ expect(query).toBe("( @numericIpMaskMin:[-inf 100] @numericIpMaskMax:[200 +inf] @ja4Hash:{ja4Hash} ismissing(@userAgentHash) ismissing(@headersHash) ismissing(@userId) ismissing(@headHash) ismissing(@coords) ismissing(@countryCode) ismissing(@asn) ismissing(@os) ismissing(@browser) ismissing(@headerMatch) ismissing(@headerName) ismissing(@headerValue) ismissing(@headerOperator) ismissing(@webBotAuthAgent) )");
99
99
  });
100
100
  it("emits NUMERIC range syntax for asn, not TAG syntax", () => {
101
101
  const filter = {