@friggframework/schemas 2.0.0--canary.682.d8626c4.0 → 2.0.0--canary.679.a2bcc2f.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.682.d8626c4.0",
3
+ "version": "2.0.0--canary.679.a2bcc2f.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": "d8626c44a041edbf421a843c24d6a050cbf8657b"
44
+ "gitHead": "a2bcc2f124b0574c0d868beff77b4da848fd7849"
45
45
  }
@@ -173,11 +173,6 @@
173
173
  "default": 1,
174
174
  "description": "Current step number for multi-step flows"
175
175
  },
176
- "scope": {
177
- "type": "string",
178
- "enum": ["individual", "organization"],
179
- "description": "The scope to connect at, from the entity type's allow list (ADR-056 §3.1). Omit to take the type's default. global is refused."
180
- },
181
176
  "sessionId": {
182
177
  "type": "string",
183
178
  "description": "Session ID from previous step (required for step > 1)"
@@ -37,28 +37,6 @@
37
37
  "type": "boolean",
38
38
  "description": "Whether authentication is currently valid"
39
39
  },
40
- "scope": {
41
- "type": "string",
42
- "enum": ["individual", "organization"],
43
- "description": "Whose the entity is (ADR-056 §3.4). `global` ones are not listed to tenants."
44
- },
45
- "owner": {
46
- "type": "object",
47
- "properties": {
48
- "type": { "type": "string", "enum": ["individual", "organization"] },
49
- "id": { "type": "string" }
50
- },
51
- "description": "The user that owns it: the person, or the organization's user"
52
- },
53
- "organizationId": {
54
- "type": ["string", "null"],
55
- "description": "The organization it belongs to. Null for an individual entity connected outside an organization, or under ownership.individualAcross 'all'."
56
- },
57
- "access": {
58
- "type": "string",
59
- "enum": ["manage", "use", "view"],
60
- "description": "What the caller may do: manage (create, reauthorize, delete), use (bind it, proxy through it) or view (metadata only)"
61
- },
62
40
  "createdAt": {
63
41
  "type": "string",
64
42
  "format": "date-time",
@@ -169,15 +147,6 @@
169
147
  "type": "string"
170
148
  },
171
149
  "description": "List of capabilities this entity type supports"
172
- },
173
- "scope": {
174
- "type": "object",
175
- "description": "The scope a new connection of this type gets and the scopes a request may choose (ADR-056 §3.1). global is never offered.",
176
- "properties": {
177
- "default": { "type": "string", "enum": ["individual", "organization", "global"] },
178
- "allow": { "type": "array", "items": { "type": "string", "enum": ["individual", "organization"] } },
179
- "source": { "type": "string", "enum": ["binding", "integration", "entityType", "app", "default"] }
180
- }
181
150
  }
182
151
  }
183
152
  },
@@ -105,16 +105,6 @@
105
105
  "description": "Require organization user for authentication",
106
106
  "default": false
107
107
  },
108
- "strictMembership": {
109
- "type": "boolean",
110
- "description": "Reject x-frigg headers that name an organization the person is not already a member of, instead of adding the membership (ADR-056 §3.6). Turn on once entities and integrations are scoped by organization and your app manages membership itself.",
111
- "default": false
112
- },
113
- "strictUserValidation": {
114
- "type": "boolean",
115
- "description": "DEPRECATED alias of strictMembership; its meaning changed.",
116
- "default": false
117
- },
118
108
  "authModes": {
119
109
  "type": "object",
120
110
  "description": "Authentication mode configuration - enables multiple authentication strategies. x-frigg-appUserId and x-frigg-appOrgId headers are automatically supported for user identification with any auth mode.",
@@ -139,72 +129,30 @@
139
129
  },
140
130
  "jwtConfig": {
141
131
  "type": "object",
142
- "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.",
132
+ "description": "JWT configuration for adopter JWT authentication mode (when authModes.adopterJwt is true)",
143
133
  "properties": {
144
- "jwksUri": {
145
- "type": "string",
146
- "format": "uri",
147
- "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."
148
- },
149
134
  "secret": {
150
135
  "type": "string",
151
- "description": "Shared HMAC secret for HS* tokens (set via an environment variable, never in source)"
152
- },
153
- "issuer": {
154
- "type": "string",
155
- "description": "Required iss claim. Not checked when omitted; with jwksUri a startup warning is logged when it is unset."
156
- },
157
- "audience": {
158
- "description": "Accepted aud claim value(s). Required with jwksUri; optional (not checked when omitted) with secret.",
159
- "oneOf": [
160
- { "type": "string" },
161
- { "type": "array", "items": { "type": "string" }, "minItems": 1 }
162
- ]
163
- },
164
- "algorithms": {
165
- "type": "array",
166
- "description": "Allowed signing algorithms. Defaults to ES256 and RS256 with jwksUri, HS256 with secret. HS* only with secret, never with jwksUri.",
167
- "items": {
168
- "type": "string",
169
- "enum": ["ES256", "ES384", "RS256", "RS384", "RS512", "HS256", "HS384", "HS512"]
170
- },
171
- "minItems": 1
172
- },
173
- "algorithm": {
174
- "type": "string",
175
- "description": "Deprecated alias for a one-item algorithms list. Setting both algorithm and algorithms is an error.",
176
- "enum": ["ES256", "ES384", "RS256", "RS384", "RS512", "HS256", "HS384", "HS512"]
177
- },
178
- "clockToleranceSec": {
179
- "type": "integer",
180
- "minimum": 0,
181
- "description": "Clock skew allowed on exp and nbf, in seconds",
182
- "default": 30
136
+ "description": "JWT secret key for signature validation (should be set via environment variable)"
183
137
  },
184
138
  "userIdClaim": {
185
139
  "type": "string",
186
- "description": "JWT claim name containing the app user ID",
140
+ "description": "JWT claim name containing the user ID",
187
141
  "default": "sub"
188
142
  },
189
143
  "orgIdClaim": {
190
144
  "type": "string",
191
- "description": "JWT claim name containing the app organization ID",
145
+ "description": "JWT claim name containing the organization ID",
192
146
  "default": "org_id"
193
147
  },
194
- "roleClaim": {
148
+ "algorithm": {
195
149
  "type": "string",
196
- "description": "JWT claim name containing the organization role. Read and exposed on the authenticated user; not stored yet.",
197
- "default": "org_role"
150
+ "description": "JWT signing algorithm",
151
+ "enum": ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512"],
152
+ "default": "HS256"
198
153
  }
199
154
  },
200
- "oneOf": [
201
- { "required": ["secret"] },
202
- { "required": ["jwksUri"] }
203
- ],
204
- "dependencies": {
205
- "jwksUri": ["audience"]
206
- },
207
- "not": { "required": ["algorithm", "algorithms"] },
155
+ "required": ["secret"],
208
156
  "additionalProperties": false
209
157
  },
210
158
  "fields": {
@@ -745,38 +693,6 @@
745
693
  "additionalProperties": false
746
694
  }
747
695
  },
748
- "ownership": {
749
- "type": "object",
750
- "description": "Who owns what a person connects (ADR-056 §3). `scope` is the app-level default for any entity type or integration binding that sets none; the order is request, binding, integration, entity type, app, then `organization` for an organization-primary app and `individual` otherwise.",
751
- "properties": {
752
- "scope": {
753
- "description": "One scope, or a default plus the scopes a request may choose from.",
754
- "oneOf": [
755
- { "type": "string", "enum": ["individual", "organization", "global"] },
756
- {
757
- "type": "object",
758
- "properties": {
759
- "default": { "type": "string", "enum": ["individual", "organization", "global"] },
760
- "allow": {
761
- "type": "array",
762
- "items": { "type": "string", "enum": ["individual", "organization", "global"] },
763
- "minItems": 1,
764
- "uniqueItems": true
765
- }
766
- },
767
- "additionalProperties": false
768
- }
769
- ]
770
- },
771
- "individualAcross": {
772
- "type": "string",
773
- "enum": ["organization", "all"],
774
- "default": "organization",
775
- "description": "`organization` (default): an individual entity belongs to the organization it was connected in and is not visible in another. `all`: one connection per person across every organization they belong to, stored with no organizationId."
776
- }
777
- },
778
- "additionalProperties": false
779
- },
780
696
  "managementApi": {
781
697
  "type": "object",
782
698
  "description": "Management API settings (ADR-053 versioning, ADR-052 entity proxy).",
@@ -263,62 +263,11 @@
263
263
  "definition": {
264
264
  "type": "object",
265
265
  "description": "The API module definition (e.g., from @friggframework/api-module-*)"
266
- },
267
- "scope": {
268
- "description": "The scope this binding accepts (ADR-056 §3.1): an entity bound here must have it. Overrides ownership.scope.",
269
- "oneOf": [
270
- { "type": "string", "enum": ["individual", "organization", "global"] },
271
- {
272
- "type": "object",
273
- "properties": {
274
- "default": { "type": "string", "enum": ["individual", "organization", "global"] },
275
- "allow": {
276
- "type": "array",
277
- "items": { "type": "string", "enum": ["individual", "organization", "global"] },
278
- "minItems": 1,
279
- "uniqueItems": true
280
- }
281
- },
282
- "additionalProperties": false
283
- }
284
- ]
285
266
  }
286
267
  },
287
268
  "additionalProperties": true
288
269
  }
289
270
  },
290
- "ownership": {
291
- "type": "object",
292
- "description": "Who owns this integration and what scope its bindings accept (ADR-056 §3.1, §3.3).",
293
- "properties": {
294
- "scope": {
295
- "description": "One scope, or a default plus the scopes a request may choose from.",
296
- "oneOf": [
297
- { "type": "string", "enum": ["individual", "organization", "global"] },
298
- {
299
- "type": "object",
300
- "properties": {
301
- "default": { "type": "string", "enum": ["individual", "organization", "global"] },
302
- "allow": {
303
- "type": "array",
304
- "items": { "type": "string", "enum": ["individual", "organization", "global"] },
305
- "minItems": 1,
306
- "uniqueItems": true
307
- }
308
- },
309
- "additionalProperties": false
310
- }
311
- ]
312
- },
313
- "owner": {
314
- "type": "string",
315
- "enum": ["derive", "individual", "organization"],
316
- "default": "derive",
317
- "description": "`derive` (default): the organization when every entity it uses is organization-scoped, otherwise the person. An organization-owned integration cannot bind an individual entity."
318
- }
319
- },
320
- "additionalProperties": false
321
- },
322
271
  "hasUserConfig": {
323
272
  "type": "boolean",
324
273
  "description": "Whether integration requires user-specific configuration",