@friggframework/schemas 2.0.0--canary.680.b3ca7f1.0 → 2.0.0--canary.681.d970b9e.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.680.b3ca7f1.0",
3
+ "version": "2.0.0--canary.681.d970b9e.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": "b3ca7f1295d79b4d0cb5fb9fb4ec41093033ba4d"
44
+ "gitHead": "d970b9e1776a2ec45a07e08a527bf5c02c248461"
45
45
  }
@@ -122,11 +122,6 @@
122
122
  "type": "string",
123
123
  "description": "Description of the entity type"
124
124
  },
125
- "usedBy": {
126
- "type": "array",
127
- "items": { "type": "string" },
128
- "description": "Names of the integrations that bind this entity type; empty for a type registered only in appDefinition.entities"
129
- },
130
125
  "authType": {
131
126
  "type": "string",
132
127
  "enum": ["oauth2", "form", "api-key", "basic"],
@@ -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": {
@@ -643,56 +685,6 @@
643
685
  },
644
686
  "additionalProperties": false
645
687
  },
646
- "entities": {
647
- "type": "object",
648
- "description": "App-level entity type registry (ADR-059). Keyed by entity type name; each key must equal its definition's moduleName / getName(). Registered types can be connected without any integration. Entity types bound by declared integrations are inferred and merged unless $infer is false.",
649
- "properties": {
650
- "$infer": {
651
- "type": "boolean",
652
- "default": true,
653
- "description": "false turns inference off: every module an integration binds must then be registered here, or the app fails to load."
654
- }
655
- },
656
- "additionalProperties": {
657
- "type": "object",
658
- "description": "One entity type: its module definition plus app-level settings.",
659
- "required": ["definition"],
660
- "properties": {
661
- "definition": {
662
- "type": "object",
663
- "description": "The API module definition (the object an integration binds as modules.<key>.definition)."
664
- },
665
- "scope": {
666
- "description": "Who owns entities of this type (ADR-056): one scope, or a default plus the scopes callers may choose.",
667
- "oneOf": [
668
- { "type": "string", "enum": ["individual", "organization", "global"] },
669
- {
670
- "type": "object",
671
- "properties": {
672
- "default": { "type": "string", "enum": ["individual", "organization", "global"] },
673
- "allow": {
674
- "type": "array",
675
- "items": { "type": "string", "enum": ["individual", "organization", "global"] },
676
- "minItems": 1,
677
- "uniqueItems": true
678
- }
679
- },
680
- "additionalProperties": false
681
- }
682
- ]
683
- },
684
- "proxy": {
685
- "type": "object",
686
- "description": "Per-type entity proxy allow-list override (ADR-052)."
687
- },
688
- "display": {
689
- "type": "object",
690
- "description": "Label, icon and description shown by UIs and GET /api/v2/entity-types."
691
- }
692
- },
693
- "additionalProperties": false
694
- }
695
- },
696
688
  "managementApi": {
697
689
  "type": "object",
698
690
  "description": "Management API settings (ADR-053 versioning, ADR-052 entity proxy).",