@friggframework/schemas 2.0.0--canary.671.e50fe9c.0 → 2.0.0--canary.678.58db4b2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@friggframework/schemas",
3
- "version": "2.0.0--canary.671.e50fe9c.0",
3
+ "version": "2.0.0--canary.678.58db4b2.0",
4
4
  "description": "Canonical JSON Schema definitions for Frigg Framework",
5
5
  "main": "index.js",
6
6
  "author": "",
@@ -41,5 +41,5 @@
41
41
  "middleware/",
42
42
  "index.js"
43
43
  ],
44
- "gitHead": "e50fe9c3d910653eef00ca7248658e7a7f637493"
44
+ "gitHead": "58db4b2bc17529f46b8dae1110771f5df39033ed"
45
45
  }
@@ -129,30 +129,72 @@
129
129
  },
130
130
  "jwtConfig": {
131
131
  "type": "object",
132
- "description": "JWT configuration for adopter JWT authentication mode (when authModes.adopterJwt is true)",
132
+ "description": "Adopter token (JWT) verification for authModes.adopterJwt. Set exactly one of jwksUri (asymmetric keys, rotating) or secret (HMAC). With jwksUri, audience is required and issuer should be set.",
133
133
  "properties": {
134
+ "jwksUri": {
135
+ "type": "string",
136
+ "format": "uri",
137
+ "description": "URL of the issuer's JWKS (https; http only for localhost, 127.0.0.0/8 or ::1). Keys are fetched, cached and rotated per process."
138
+ },
134
139
  "secret": {
135
140
  "type": "string",
136
- "description": "JWT secret key for signature validation (should be set via environment variable)"
141
+ "description": "Shared HMAC secret for HS* tokens (set via an environment variable, never in source)"
142
+ },
143
+ "issuer": {
144
+ "type": "string",
145
+ "description": "Required iss claim. Not checked when omitted; with jwksUri a startup warning is logged when it is unset."
146
+ },
147
+ "audience": {
148
+ "description": "Accepted aud claim value(s). Required with jwksUri; optional (not checked when omitted) with secret.",
149
+ "oneOf": [
150
+ { "type": "string" },
151
+ { "type": "array", "items": { "type": "string" }, "minItems": 1 }
152
+ ]
153
+ },
154
+ "algorithms": {
155
+ "type": "array",
156
+ "description": "Allowed signing algorithms. Defaults to ES256 and RS256 with jwksUri, HS256 with secret. HS* only with secret, never with jwksUri.",
157
+ "items": {
158
+ "type": "string",
159
+ "enum": ["ES256", "ES384", "RS256", "RS384", "RS512", "HS256", "HS384", "HS512"]
160
+ },
161
+ "minItems": 1
162
+ },
163
+ "algorithm": {
164
+ "type": "string",
165
+ "description": "Deprecated alias for a one-item algorithms list. Setting both algorithm and algorithms is an error.",
166
+ "enum": ["ES256", "ES384", "RS256", "RS384", "RS512", "HS256", "HS384", "HS512"]
167
+ },
168
+ "clockToleranceSec": {
169
+ "type": "integer",
170
+ "minimum": 0,
171
+ "description": "Clock skew allowed on exp and nbf, in seconds",
172
+ "default": 30
137
173
  },
138
174
  "userIdClaim": {
139
175
  "type": "string",
140
- "description": "JWT claim name containing the user ID",
176
+ "description": "JWT claim name containing the app user ID",
141
177
  "default": "sub"
142
178
  },
143
179
  "orgIdClaim": {
144
180
  "type": "string",
145
- "description": "JWT claim name containing the organization ID",
181
+ "description": "JWT claim name containing the app organization ID",
146
182
  "default": "org_id"
147
183
  },
148
- "algorithm": {
184
+ "roleClaim": {
149
185
  "type": "string",
150
- "description": "JWT signing algorithm",
151
- "enum": ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512"],
152
- "default": "HS256"
186
+ "description": "JWT claim name containing the organization role. Read and exposed on the authenticated user; not stored yet.",
187
+ "default": "org_role"
153
188
  }
154
189
  },
155
- "required": ["secret"],
190
+ "oneOf": [
191
+ { "required": ["secret"] },
192
+ { "required": ["jwksUri"] }
193
+ ],
194
+ "dependencies": {
195
+ "jwksUri": ["audience"]
196
+ },
197
+ "not": { "required": ["algorithm", "algorithms"] },
156
198
  "additionalProperties": false
157
199
  },
158
200
  "fields": {