zuplo 6.70.15 → 6.70.21

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.
@@ -1,6 +1,32 @@
1
- This policy will authenticate users based on mTLS certificates that are
2
- configured for your project. This policy is available only to enterprise
3
- customers (contact sales@zuplo.com to request info). When a requests is
4
- authenticated with an mTLS certificate, the certificate data will be set as the
5
- user object of the request. The `user.sub` property will be the value of the
6
- certificates DN.
1
+ This policy verifies client mTLS results supplied by Zuplo's edge proxy. It
2
+ checks the incoming mTLS verification status and, when enforcement is enabled,
3
+ rejects requests where no client certificate was presented, certificate
4
+ verification failed, or the certificate metadata cannot be parsed.
5
+
6
+ When verification passes, the policy parses the client certificate metadata and
7
+ sets it on `request.user.data.mtlsAuth`. The metadata includes `subject`,
8
+ `issuer`, `notBefore`, `notAfter`, and `sha256Fingerprint`. If `request.user`
9
+ already exists, its `sub` is preserved. Otherwise, the policy creates
10
+ `request.user` with the certificate subject as `sub`.
11
+
12
+ Set `allowUnauthenticatedRequests` to `true` to enable passthrough mode. In
13
+ passthrough mode, requests are allowed even when mTLS verification fails or no
14
+ certificate is present. If a parseable certificate is present, the policy still
15
+ sets `request.user.data.mtlsAuth`; otherwise it leaves the request unchanged.
16
+
17
+ Set `certIssuerDN` to the fully qualified issuer distinguished name to require
18
+ on the client certificate. When set and enforcement is enabled, the policy
19
+ rejects certificates whose parsed issuer DN does not match. Comparison is
20
+ order-sensitive on RDNs (e.g. `"CN=foo, O=bar"` does not match
21
+ `"O=bar, CN=foo"`, which matches RFC 4514 §2.1 semantics) but tolerant of
22
+ casing and whitespace, so `"CN=example-ca, O=Example, C=US"` matches
23
+ `"cn=Example-CA,o=example,c=us"`. Multi-valued RDNs (`+`) and hex-encoded
24
+ values (`#...`) are not normalized. The simplest way to obtain the expected
25
+ value is to inspect `request.user.data.mtlsAuth.issuer` from a request signed
26
+ by the desired CA.
27
+
28
+ The `certIssuerDN` is useful when you want to distinguish between client certs from
29
+ different CAs if you have multiple set on your account. It is recommended to set this by default.
30
+
31
+ Note: this policy does not work with local development since it relies on metadata from the upstream reverse proxy,
32
+ it is recommended to test this using a working-copy or preview environment.
@@ -4,8 +4,8 @@
4
4
  "type": "object",
5
5
  "title": "mTLS Auth",
6
6
  "isDeprecated": false,
7
- "isPaidAddOn": true,
8
- "isEnterprise": false,
7
+ "isPaidAddOn": false,
8
+ "isEnterprise": true,
9
9
  "isInternal": false,
10
10
  "isBeta": false,
11
11
  "isHidden": false,
@@ -37,17 +37,12 @@
37
37
  "allowUnauthenticatedRequests": {
38
38
  "type": "boolean",
39
39
  "default": false,
40
- "description": "Indicates whether the request should continue if authentication fails. Default is `false` which means unauthenticated users will automatically receive a 401 response."
40
+ "description": "Allows requests to continue even when mTLS verification fails, no client certificate is presented, or the certificate metadata cannot be parsed. Defaults to false."
41
41
  },
42
- "allowExpiredCertificates": {
43
- "type": "boolean",
44
- "default": false,
45
- "description": "Indicates whether the request should continue if the certificate is expired."
46
- },
47
- "allowRevokedCertificates": {
48
- "type": "boolean",
49
- "default": false,
50
- "description": "Indicates whether the request should continue if the certificate is revoked."
42
+ "certIssuerDN": {
43
+ "type": "string",
44
+ "description": "Optional fully qualified issuer distinguished name to require on the client certificate. When set, the policy rejects certificates whose parsed issuer DN does not match this string exactly. The expected format matches the parsed metadata issuer, e.g. \"CN=example-ca, O=Example, C=US\".",
45
+ "examples": ["CN=example-ca, O=Example, C=US"]
51
46
  }
52
47
  }
53
48
  }
@@ -57,9 +52,8 @@
57
52
  "export": "MTLSAuthInboundPolicy",
58
53
  "module": "$import(@zuplo/runtime)",
59
54
  "options": {
60
- "allowExpiredCertificates": false,
61
- "allowRevokedCertificates": false,
62
- "allowUnauthenticatedRequests": false
55
+ "allowUnauthenticatedRequests": false,
56
+ "certIssuerDN": "CN=example-ca, O=Example, C=US"
63
57
  }
64
58
  }
65
59
  ]
@@ -9,7 +9,7 @@
9
9
  "isInternal": false,
10
10
  "isBeta": false,
11
11
  "isHidden": false,
12
- "products": ["api-gateway"],
12
+ "products": ["ai-gateway", "mcp-gateway"],
13
13
  "description": "Uses an LLM agent to detect prompt injection attempts in user provided content or potentially poisoned response bodies. This is primarily intended to be used with downstream LLM agents who are at risk of having prompt injection attacks executed against them.",
14
14
  "deprecatedMessage": "",
15
15
  "required": ["handler"],
@@ -9,7 +9,7 @@
9
9
  "isInternal": false,
10
10
  "isBeta": true,
11
11
  "isHidden": false,
12
- "products": ["api-gateway"],
12
+ "products": ["ai-gateway"],
13
13
  "description": "Respond to matched incoming requests with semantically cached content\n\nThe Semantic Cache Inbound policy caches responses based on semantic similarity of cache keys rather than exact matches. This allows for more flexible caching where similar requests can return cached responses even if the cache key is not exactly the same.\n\nThe policy uses Large Language Model (LLM) embeddings to determine semantic similarity between cache keys based on a configurable similarity tolerance.\n\nOptions: - semanticTolerance: The semantic similarity threshold for semantic cache matches (0-1, default: 0.2). Values closer to 0 require higher similarity. Can be overridden by custom functions. - expirationSecondsTtl: The timeout of the cache in seconds (default: 3600, 1 hour). Can be overridden by custom functions. - namespace: Optional namespace to isolate cache entries (default: \"default\"). Useful for multi-tenant scenarios or different cache contexts. - cacheBy: Determines how cache keys are generated: 'function' for custom logic or 'propertyPath' to extract from JSON body.",
14
14
  "deprecatedMessage": "",
15
15
  "required": ["handler"],
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft-07/schema",
3
3
  "$id": "http://zuplo.com/schemas/policies/auth0-jwt-auth-inbound.json",
4
4
  "type": "object",
5
- "title": "XML to JSON Outbound",
5
+ "title": "XML to JSON",
6
6
  "isDeprecated": false,
7
7
  "isPaidAddOn": false,
8
8
  "isEnterprise": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zuplo",
3
- "version": "6.70.15",
3
+ "version": "6.70.21",
4
4
  "type": "module",
5
5
  "description": "The programmable API Gateway",
6
6
  "author": "Zuplo, Inc.",
@@ -19,9 +19,9 @@
19
19
  "zuplo": "zuplo.js"
20
20
  },
21
21
  "dependencies": {
22
- "@zuplo/cli": "6.70.15",
23
- "@zuplo/core": "6.70.15",
24
- "@zuplo/runtime": "6.70.15",
22
+ "@zuplo/cli": "6.70.21",
23
+ "@zuplo/core": "6.70.21",
24
+ "@zuplo/runtime": "6.70.21",
25
25
  "@zuplo/test": "1.4.0"
26
26
  }
27
27
  }