@happyvertical/smrt-users 0.62.12 → 0.62.14
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/AGENTS.md +1 -0
- package/agents/service-principals.md +63 -0
- package/dist/chunks/{PasswordCredentialService-BfYi-lfi.js → PasswordCredentialService-DODrdCBc.js} +155 -16
- package/dist/chunks/PasswordCredentialService-DODrdCBc.js.map +1 -0
- package/dist/chunks/{TerminalAuthService-BS0LEIuW.js → TerminalAuthService-BQANhFsS.js} +6 -5
- package/dist/chunks/TerminalAuthService-BQANhFsS.js.map +1 -0
- package/dist/collections/SessionCollection.d.ts +20 -1
- package/dist/collections/SessionCollection.d.ts.map +1 -1
- package/dist/collections/UserCollection.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +219 -7
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +203 -7
- package/dist/models/Session.d.ts +4 -3
- package/dist/models/Session.d.ts.map +1 -1
- package/dist/models/User.d.ts +56 -0
- package/dist/models/User.d.ts.map +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/operator.js +1 -1
- package/dist/password-readiness.d.ts.map +1 -1
- package/dist/services/DeviceCredentialService.d.ts.map +1 -1
- package/dist/services/PasswordCredentialService.d.ts.map +1 -1
- package/dist/services/ServicePrincipalService.d.ts +106 -0
- package/dist/services/ServicePrincipalService.d.ts.map +1 -0
- package/dist/services/SessionService.d.ts.map +1 -1
- package/dist/services/TenantInvitationService.d.ts.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +113 -6
- package/dist/smrt-knowledge.okf.md +6 -2
- package/dist/sveltekit.js +2 -2
- package/package.json +9 -9
- package/dist/chunks/PasswordCredentialService-BfYi-lfi.js.map +0 -1
- package/dist/chunks/TerminalAuthService-BS0LEIuW.js.map +0 -1
|
@@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AAyB,CAAC;KACzC,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,IAAI,CAAA;KAAE,CAAC;IA4ChC;;;;;OAKG;IACG,mBAAmB,CAAC,KAAK,EAAE;QAC/B,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,wBAAwB,CAAC;YA4CvB,YAAY;IAc1B,sFAAsF;IAChF,MAAM,CAAC,KAAK,EAAE;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA0CrC;;;;OAIG;IACG,kBAAkB,CACtB,OAAO,EAAE,iCAAiC,EAC1C,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACf;;;;;;YAuCW,kBAAkB;YASlB,WAAW;YASX,UAAU;IAkBxB,mFAAmF;YACrE,iBAAiB;
|
|
1
|
+
{"version":3,"file":"TenantInvitationService.d.ts","sourceRoot":"","sources":["../../src/services/TenantInvitationService.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,KAAK,OAAO,EAEb,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EACL,KAAK,iCAAiC,EAGvC,MAAM,kCAAkC,CAAC;AAK1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAE/B,MAAM,mCAAmC,CAAC;AAG3C,8EAA8E;AAC9E,MAAM,MAAM,4BAA4B,GAAG;I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Y,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACf;;;;;;YAuCW,kBAAkB;YASlB,WAAW;YASX,UAAU;IAkBxB,mFAAmF;YACrE,iBAAiB;YAgGjB,qBAAqB;IAkBnC,iFAAiF;IAC3E,OAAO,CACX,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,wBAAwB,CAAC;CAoHrC"}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { deriveOperationPermissionCollectionName, deriveOperationPermissionSlug,
|
|
|
20
20
|
export { type PermissionResolutionOptions, type PermissionResolutionResult, PermissionResolver, type PermissionResolverOptions, type TenantPermissionInheritanceResult, } from './PermissionResolver.js';
|
|
21
21
|
export { applyPostgresPermissionPolicies, type GeneratePostgresPermissionSqlResult, generatePostgresPermissionSql, type PostgresPermissionPolicyReportItem, type PostgresPermissionPolicyTarget, } from './PostgresPermissionPolicies.js';
|
|
22
22
|
export { type CreateResourceGrantOptions, checkResourceOperationPermission, MAX_RESOURCE_GRANT_DELEGATION_DEPTH, type ResourceGrantDecision, ResourceGrantService, type ResourceIdentity, type ResourceIdentityVerifier, type ResourceOperationPermissionOptions, type RevokeResourceGrantOptions, } from './ResourceGrantService.js';
|
|
23
|
+
export { type CreatedServicePrincipal, type CreateServicePrincipalInput, type ServicePrincipalRecord, ServicePrincipalService, type ServicePrincipalServiceOptions, } from './ServicePrincipalService.js';
|
|
23
24
|
export { getCurrentSessionPermissionContext, getRequestScopedDatabase, type PrincipalPermissionRuntimeOptions, type SessionPermissionRuntimeContext, type SessionPermissionRuntimeOptions, withPrincipalPermissionContext, withSessionPermissionContext, } from './SessionPermissionContext.js';
|
|
24
25
|
export { type SessionContext, type SessionParentContext, SessionService, type SessionServiceOptions, type SwitchTenantResult, } from './SessionService.js';
|
|
25
26
|
export { type AcceptedTenantInvitation, type IssuedTenantInvitation, type PreparedTenantInvitation, type PrepareTenantInvitationInput, TenantInvitationError, TenantInvitationService, type TenantInvitationServiceOptions, } from './TenantInvitationService.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,+BAA+B,EAC/B,+BAA+B,EAC/B,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,aAAa,EAClB,kCAAkC,EAClC,6BAA6B,EAC7B,qBAAqB,EACrB,8BAA8B,EAC9B,2BAA2B,EAC3B,uBAAuB,EACvB,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,8BAA8B,EAC9B,cAAc,EACd,0BAA0B,EAC1B,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,oCAAoC,EACpC,kCAAkC,EAClC,4BAA4B,EAC5B,i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,OAAO,EACL,kCAAkC,EAClC,wBAAwB,EACxB,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,8BAA8B,GACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,yBAAyB,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,+CAA+C,EAC/C,qCAAqC,EACrC,sCAAsC,EACtC,oCAAoC,EACpC,+BAA+B,EAC/B,2BAA2B,EAC3B,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,0BAA0B,CAAC"}
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-users",
|
|
6
|
-
"packageVersion": "0.62.
|
|
6
|
+
"packageVersion": "0.62.14",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
12
|
-
"agents": "
|
|
10
|
+
"manifest": "afdee25dd7c7206713d347bdd05b2e413a3c9ab23bd0999f55b7b45cede29156",
|
|
11
|
+
"packageJson": "e869f3f6ddd7bffcb4be329554f99d56c7933154e0ccf92aa924e4f0b51ef46e",
|
|
12
|
+
"agents": "b6ae65770f9d085554ccb058f5f87f88132df9dfba3a80f311cb6bb029de9c23",
|
|
13
13
|
"moduleDoc:agents/permissions.md": "e8c6c8aecdbac4b7371557008bbd9fae3f5ec3c86a7b4a84108012442b550068",
|
|
14
14
|
"moduleDoc:agents/oidc-provisioning.md": "8408153424b22c6648f062151e261fe4b72271d5c0812b55e6d09a558a4386fd",
|
|
15
15
|
"moduleDoc:agents/mobile-auth.md": "25e85e83f43e3a46383a92fa809f3a003b4545c3026e78dbe1bccbbc35161e18",
|
|
16
16
|
"moduleDoc:agents/terminal-auth-testing.md": "ca6bdf325fe4edc3c875e6da38e3f5b4ae287bc0e7035002d275cf15de36e906",
|
|
17
17
|
"moduleDoc:agents/family-invitations.md": "8598bfc3540b4c5ee2aef611db55dc2a8f6b6993fce9619f84a8ce32608a2954",
|
|
18
18
|
"moduleDoc:agents/oauth-authorization.md": "ab2c07927e72a0ac47953052aebb48d0df42a34b9b6cf77db2de73933103e17d",
|
|
19
|
+
"moduleDoc:agents/service-principals.md": "ae11f9b0d05e7c77a0a9a827f35422c161e250e3338616337991a636a83f5859",
|
|
19
20
|
"moduleDoc:agents/retention.md": "fc6ed5443b154641bfe890a4de1213366d4b330ea1bb18ea9e0edfe605f45b02"
|
|
20
21
|
},
|
|
21
22
|
"exports": [
|
|
@@ -2341,6 +2342,7 @@
|
|
|
2341
2342
|
"findChildren",
|
|
2342
2343
|
"findValidSession",
|
|
2343
2344
|
"getSessionData",
|
|
2345
|
+
"isSessionlessPrincipal",
|
|
2344
2346
|
"markReauthenticated",
|
|
2345
2347
|
"recordStepUpIntent",
|
|
2346
2348
|
"revokeChildren",
|
|
@@ -2418,6 +2420,14 @@
|
|
|
2418
2420
|
],
|
|
2419
2421
|
"returns": "Promise<T | undefined>"
|
|
2420
2422
|
},
|
|
2423
|
+
{
|
|
2424
|
+
"name": "isSessionlessPrincipal",
|
|
2425
|
+
"async": true,
|
|
2426
|
+
"params": [
|
|
2427
|
+
"userId: string"
|
|
2428
|
+
],
|
|
2429
|
+
"returns": "Promise<boolean>"
|
|
2430
|
+
},
|
|
2421
2431
|
{
|
|
2422
2432
|
"name": "markReauthenticated",
|
|
2423
2433
|
"async": true,
|
|
@@ -2570,6 +2580,13 @@
|
|
|
2570
2580
|
"reason": "not listed in api.include",
|
|
2571
2581
|
"objectName": "@happyvertical/smrt-users:SessionCollection"
|
|
2572
2582
|
},
|
|
2583
|
+
{
|
|
2584
|
+
"kind": "api",
|
|
2585
|
+
"operation": "isSessionlessPrincipal",
|
|
2586
|
+
"code": "not-included",
|
|
2587
|
+
"reason": "not listed in api.include",
|
|
2588
|
+
"objectName": "@happyvertical/smrt-users:SessionCollection"
|
|
2589
|
+
},
|
|
2573
2590
|
{
|
|
2574
2591
|
"kind": "api",
|
|
2575
2592
|
"operation": "markReauthenticated",
|
|
@@ -7686,6 +7703,38 @@
|
|
|
7686
7703
|
"required": false,
|
|
7687
7704
|
"columnType": "TIMESTAMP",
|
|
7688
7705
|
"description": "When this person most recently signed in."
|
|
7706
|
+
},
|
|
7707
|
+
{
|
|
7708
|
+
"name": "principalKind",
|
|
7709
|
+
"type": "text",
|
|
7710
|
+
"required": false,
|
|
7711
|
+
"columnType": "TEXT",
|
|
7712
|
+
"readonly": true,
|
|
7713
|
+
"description": "Empty for a person; \"service\" for an automated account that can never sign in."
|
|
7714
|
+
},
|
|
7715
|
+
{
|
|
7716
|
+
"name": "servicePrincipalTenantId",
|
|
7717
|
+
"type": "text",
|
|
7718
|
+
"required": false,
|
|
7719
|
+
"columnType": "UUID",
|
|
7720
|
+
"readonly": true,
|
|
7721
|
+
"description": "For an automated account, the organization it belongs to; empty for a person."
|
|
7722
|
+
},
|
|
7723
|
+
{
|
|
7724
|
+
"name": "servicePrincipalKey",
|
|
7725
|
+
"type": "text",
|
|
7726
|
+
"required": false,
|
|
7727
|
+
"columnType": "TEXT",
|
|
7728
|
+
"readonly": true,
|
|
7729
|
+
"description": "For an automated account, the key its creator gave it; empty for a person."
|
|
7730
|
+
},
|
|
7731
|
+
{
|
|
7732
|
+
"name": "retiredAt",
|
|
7733
|
+
"type": "datetime",
|
|
7734
|
+
"required": false,
|
|
7735
|
+
"columnType": "TIMESTAMP",
|
|
7736
|
+
"readonly": true,
|
|
7737
|
+
"description": "When this automated account was permanently retired; empty while in use."
|
|
7689
7738
|
}
|
|
7690
7739
|
],
|
|
7691
7740
|
"relationships": [
|
|
@@ -7698,18 +7747,31 @@
|
|
|
7698
7747
|
}
|
|
7699
7748
|
],
|
|
7700
7749
|
"methods": [
|
|
7750
|
+
"canHoldSession",
|
|
7701
7751
|
"hasValidEmail",
|
|
7752
|
+
"initialize",
|
|
7702
7753
|
"isActive",
|
|
7703
7754
|
"isPending",
|
|
7755
|
+
"isServicePrincipal",
|
|
7704
7756
|
"isSuspended",
|
|
7757
|
+
"loadDataFromDb",
|
|
7705
7758
|
"recordLogin",
|
|
7706
7759
|
"save"
|
|
7707
7760
|
],
|
|
7708
7761
|
"methodSignatures": [
|
|
7762
|
+
{
|
|
7763
|
+
"name": "canHoldSession",
|
|
7764
|
+
"returns": "boolean"
|
|
7765
|
+
},
|
|
7709
7766
|
{
|
|
7710
7767
|
"name": "hasValidEmail",
|
|
7711
7768
|
"returns": "boolean"
|
|
7712
7769
|
},
|
|
7770
|
+
{
|
|
7771
|
+
"name": "initialize",
|
|
7772
|
+
"async": true,
|
|
7773
|
+
"returns": "Promise<this>"
|
|
7774
|
+
},
|
|
7713
7775
|
{
|
|
7714
7776
|
"name": "isActive",
|
|
7715
7777
|
"returns": "boolean"
|
|
@@ -7718,10 +7780,22 @@
|
|
|
7718
7780
|
"name": "isPending",
|
|
7719
7781
|
"returns": "boolean"
|
|
7720
7782
|
},
|
|
7783
|
+
{
|
|
7784
|
+
"name": "isServicePrincipal",
|
|
7785
|
+
"returns": "boolean"
|
|
7786
|
+
},
|
|
7721
7787
|
{
|
|
7722
7788
|
"name": "isSuspended",
|
|
7723
7789
|
"returns": "boolean"
|
|
7724
7790
|
},
|
|
7791
|
+
{
|
|
7792
|
+
"name": "loadDataFromDb",
|
|
7793
|
+
"async": true,
|
|
7794
|
+
"params": [
|
|
7795
|
+
"data: Record<string, unknown>"
|
|
7796
|
+
],
|
|
7797
|
+
"returns": "any"
|
|
7798
|
+
},
|
|
7725
7799
|
{
|
|
7726
7800
|
"name": "recordLogin",
|
|
7727
7801
|
"returns": "void"
|
|
@@ -7778,6 +7852,13 @@
|
|
|
7778
7852
|
}
|
|
7779
7853
|
],
|
|
7780
7854
|
"withheldSurfaces": [
|
|
7855
|
+
{
|
|
7856
|
+
"kind": "api",
|
|
7857
|
+
"operation": "canHoldSession",
|
|
7858
|
+
"code": "not-included",
|
|
7859
|
+
"reason": "not listed in api.include",
|
|
7860
|
+
"objectName": "@happyvertical/smrt-users:User"
|
|
7861
|
+
},
|
|
7781
7862
|
{
|
|
7782
7863
|
"kind": "api",
|
|
7783
7864
|
"operation": "hasValidEmail",
|
|
@@ -7785,6 +7866,13 @@
|
|
|
7785
7866
|
"reason": "not listed in api.include",
|
|
7786
7867
|
"objectName": "@happyvertical/smrt-users:User"
|
|
7787
7868
|
},
|
|
7869
|
+
{
|
|
7870
|
+
"kind": "api",
|
|
7871
|
+
"operation": "initialize",
|
|
7872
|
+
"code": "lifecycle-method",
|
|
7873
|
+
"reason": "`initialize` is a framework lifecycle method, not a distinct operation",
|
|
7874
|
+
"objectName": "@happyvertical/smrt-users:User"
|
|
7875
|
+
},
|
|
7788
7876
|
{
|
|
7789
7877
|
"kind": "api",
|
|
7790
7878
|
"operation": "isActive",
|
|
@@ -7799,6 +7887,13 @@
|
|
|
7799
7887
|
"reason": "not listed in api.include",
|
|
7800
7888
|
"objectName": "@happyvertical/smrt-users:User"
|
|
7801
7889
|
},
|
|
7890
|
+
{
|
|
7891
|
+
"kind": "api",
|
|
7892
|
+
"operation": "isServicePrincipal",
|
|
7893
|
+
"code": "not-included",
|
|
7894
|
+
"reason": "not listed in api.include",
|
|
7895
|
+
"objectName": "@happyvertical/smrt-users:User"
|
|
7896
|
+
},
|
|
7802
7897
|
{
|
|
7803
7898
|
"kind": "api",
|
|
7804
7899
|
"operation": "isSuspended",
|
|
@@ -7806,6 +7901,13 @@
|
|
|
7806
7901
|
"reason": "not listed in api.include",
|
|
7807
7902
|
"objectName": "@happyvertical/smrt-users:User"
|
|
7808
7903
|
},
|
|
7904
|
+
{
|
|
7905
|
+
"kind": "api",
|
|
7906
|
+
"operation": "loadDataFromDb",
|
|
7907
|
+
"code": "lifecycle-method",
|
|
7908
|
+
"reason": "`loadDataFromDb` is a framework lifecycle method, not a distinct operation",
|
|
7909
|
+
"objectName": "@happyvertical/smrt-users:User"
|
|
7910
|
+
},
|
|
7809
7911
|
{
|
|
7810
7912
|
"kind": "api",
|
|
7811
7913
|
"operation": "recordLogin",
|
|
@@ -8334,9 +8436,9 @@
|
|
|
8334
8436
|
"junctionCollections": 0,
|
|
8335
8437
|
"hierarchicalObjects": 0,
|
|
8336
8438
|
"polymorphicAssociations": 0,
|
|
8337
|
-
"uuidColumns":
|
|
8439
|
+
"uuidColumns": 164
|
|
8338
8440
|
},
|
|
8339
|
-
"agentDoc": "# @happyvertical/smrt-users\n\nMulti-tenant identity, RBAC, hierarchical tenants, sessions, and SvelteKit auth.\n\n## Modules\n\nRead only the module relevant to the change; protocol and provisioning details\nare not prerequisites for unrelated user-package work.\n\n| Module | Scope | Module doc |\n|---|---|---|\n| `src/permission-registry.ts` | portable permission metadata registration; same root/service singleton, no authority grants | [agents/permissions.md](agents/permissions.md#portable-metadata-registry-4765) |\n| `src/services/PermissionResolver.ts` | permission precedence, inherited memberships, guards, RLS, role seeding | [agents/permissions.md](agents/permissions.md) |\n| `src/services/OidcLoginService.ts`, collections and OIDC handlers | identity reconciliation, transaction boundaries, migration readiness | [agents/oidc-provisioning.md](agents/oidc-provisioning.md) |\n| `src/services/MobileAuthService.ts` | mobile handshake, bearer sessions, bootstrap extension boundary | [agents/mobile-auth.md](agents/mobile-auth.md) |\n| `src/services/TerminalAuthService.ts`, `src/services/LoginAttemptLimiter.ts`, `src/collections/LoginAttemptCollection.ts` | terminal approval concurrency, shared login budget and lockout (#3273), retry-safe database fixtures | [agents/terminal-auth-testing.md](agents/terminal-auth-testing.md) |\n| `src/services/DeviceCredentialService.ts` | per-person PIN layered on a device session (#3276), verifier seam for other credential kinds | this file, \"Security boundaries\" |\n| `src/services/PasswordCredentialService.ts`, `src/sveltekit/password-handlers.ts` | email + password sign-in and password lifecycle (#3274); shared scrypt in `credential-hash.ts` | this file, \"Security boundaries\"; README \"Password sign-in\" |\n| `src/services/PasskeyCredentialService.ts`, `src/sveltekit/passkey-handlers.ts`, `src/svelte/passkey.ts` | passkey (WebAuthn) sign-in and passkey lifecycle (#3275); library does all verification | this file, \"Security boundaries\"; README \"Passkey sign-in\" |\n| `src/services/TenantInvitationService.ts`, `src/services/MailboxAuthenticationService.ts` | exact-role invitations, preserved identity, one-use generations and embedded transaction send budgets | [agents/family-invitations.md](agents/family-invitations.md) |\n| `src/services/oauth-cimd.ts`, `src/services/oauth-cimd-fetch.ts` | opt-in Client ID Metadata Documents for the SDK OAuth server (#5081): required origin policy, SSRF-pinned fetch, cache | [agents/oauth-authorization.md](agents/oauth-authorization.md#client-id-metadata-documents-5081) |\n| `src/retention.ts` | expired session/token/CLI-auth reaping and retention sweep wiring | [agents/retention.md](agents/retention.md) |\n\n## Models and authority\n\n- Users are global; tenant access comes through Membership (unique user/tenant).\n User email is normalized and globally unique through readonly nullable\n `emailKey`. `profileId` is a unique cross-package reference: at most one User\n owns each non-null Profile.\n- Tenant uses STI and a materialized hierarchy, maximum depth 10.\n `hierarchyPath`/`hierarchyLevel` are derived from `parentTenantId` by\n `Tenant.save()` on every save (any caller-supplied value is recomputed) and\n descendants are re-materialized when they change; never hand-maintain them.\n Legacy rows are backfilled with `smrt db:materialize-tenant-hierarchy`\n (`materializeTenantHierarchy()`). Tests that need a corrupt path must write it\n with raw SQL (#3036).\n- Role with `tenantId = null` is available to all tenants; `isSystem` prevents\n deletion. `inheritsToDescendants` is opt-in. Seed owner/admin/member/viewer\n through `RoleCollection.seedSystemRoles()` at application initialization.\n- Group roles apply only in their own tenant. Use `getGroupIdsForTenant()`,\n never cross-tenant `getGroupIds()`, for authorization.\n- Upward visibility is opt-in and read-only: `permissions.ancestorRead`\n ({ roles, collections, maxDepth? }) lets a DESCENDANT membership contribute\n declared `<collection>.read` at an ancestor, only when no membership resolved\n there, intersected with BOTH the role's own catalog grants and the\n principal's effective permissions in that descendant, and only for SYSTEM\n roles (a tenant-scoped role sharing a declared slug is ignored). Off by default, never\n write, never lateral, and never row visibility — sibling rows stay scoped by\n tenancy/RLS. Read the permissions module before changing it.\n- Membership DENY always wins. Direct inactive membership blocks inherited\n authority; a direct active membership pins resolution instead of unioning it\n with ancestors. Read the permissions module before changing these rules.\n- AccessRequest has no generated API/MCP/CLI operations; access it through\n `AccessRequestService`. Its JSON field is `requestContext`, not reserved\n slug-scoping `context`.\n\n## Security boundaries\n\n- Generated REST/MCP operations on identity/RBAC models are list/get only.\n Route authentication does not authorize authority mutations, and these models\n are not tenant-scoped. Use permission-gated services or explicitly checked\n consumer handlers. Generated CLI is list/get or closed (`cli: false` for\n credential/grant models) because agents shell out to it; a `cli` without\n `include` is full CRUD (#3742). Their catalog slugs stay full via\n `USERS_AUTHORITY_CATALOG_MODELS`. Preserve the registry assertions in\n `security-audit-1400.test.ts` and `issue-3742-cli-surface-lockdown.test.ts`.\n- Resource guards take the resource tenant, not the session tenant. Omit a\n session membership when targeting a different tenant; mismatches fail closed.\n `loadSessionContext().tenantAuthorization` must be checked by required-tenant\n consumers: null membership can represent inherited authority.\n- Sessions use secure UUIDs; TTL is seconds (default seven days). Access marks\n expired sessions EXPIRED. Magic-link tokens are single use.\n- `Session.authMethod` is server-set at mint time and never read from the\n client; every mint site in this package sets it. A session with\n `parentSessionId` is valid only while its parent validates\n (`loadSessionContext` enforces this; there is no FK cascade by design), may\n not switch to a tenant other than the parent's, and is revoked with its\n parent by `destroySession`.\n- Credential sign-ins reserve through `LoginAttemptLimiter` BEFORE credential\n work and key the subject on the submitted identifier, never a resolved user,\n so unknown and wrong take the same path. Reservations are fail-closed: keep\n them on failure, release on success or abort, never skip the reserve.\n Limiter writes are raw SQL and bypass the change feed; the audit sink is the\n observability seam, and it must never throw into the sign-in path.\n Subject and source budgets are sized independently (#3531); `source: false`\n ignores the source key, so a reservation then needs a subject (fail closed).\n The `source-locked` audit entry never carries a subject or caller metadata.\n- `DeviceCredentialService` accepts a person credential only from a\n first-class session whose `authMethod` is a device-enrollment method\n (`terminal` by default) and that the host's `assertEnrolledDevice` confirms.\n A layered or PIN session can never administer PINs regardless of\n permissions. PIN hashes carry a per-row salt and the configured pepper;\n treat an unset pepper as a production misconfiguration.\n- A person session carries the PERSON's authority (resolved from their own\n membership on every load), never the device account's. `Session.data` keys\n in `SESSION_DATA_KEYS` are server-set controls enforced by the model:\n `permissionCeiling` only ever intersects (malformed fails closed to none)\n and suppresses `superAdminBypass`/`systemContext`; `absoluteExpiresAt`\n bounds `extend()` and `isValid()`; `idleSeconds` overrides the resolving\n service's TTL policy. Never write them from client input. The ceiling is a\n sign-in snapshot; `singleOccupant` revokes other children only AFTER a\n successful mint. A `mustReset` sign-in mints with an empty ceiling and\n `setPin` ends that session; do not grant it authority another way.\n- `UsersPasswordCredential` is one row per person, sensitive, with no\n generated surface; `PasswordCredentialService` and its handlers are its only\n session-authorized read/write paths. The separate Node `./operator` entrypoint\n provisions new PostgreSQL owners from trusted database custody, atomically;\n never mount it in a browser/REST/MCP handler. Exact retries verify existing\n credentials without writes; partial/conflicting identities fail closed.\n See README \"Trusted deployment owner provisioning\".\n Sign-in normalizes the email like `emailKey`, reserves\n before work, always runs one scrypt verify (dummy hash when absent), never\n creates a user, and maps every non-rate-limit refusal to one\n `PasswordCredentialError`. It re-checks the credential after the mint (a\n rehash that keeps row and version is confirmed by re-verifying); the\n parameter-upgrade write is a guarded UPDATE that must never replace a\n rotated password, and verification against a weaker stored hash is padded\n to the policy's scrypt cost. Self-service writes are guarded on the proven\n credential (first set insert-only); session sweeps run before and after\n each write. Self-service needs the current password except for a first\n set; `users.password.manage` follows the PIN's single-tenant target\n rule and never resets the actor's own. Layered sessions never manage\n passwords; a `mustChange` sign-in mints an empty ceiling.\n `replaceForgottenPassword` (#3905, opt-in `recovery`) is the only\n self-service write without the current password: it decides on the stored\n session row (owner, first-class, no ceiling, listed non-password/pin\n `authMethod`, fresh `outOfBandProofAt` stamp) and ends every session,\n its own included. Never set that stamp from client input.\n- `UsersPasskeyCredential` (many per person) and `UsersPasskeyChallenge` (consumed\n challenge ledger) are sensitive with no generated surface;\n `PasskeyCredentialService` and its handlers are the only paths. Verification is\n `@simplewebauthn/server`, loaded on first use (its `reflect-metadata` polyfill is process-wide) and external in the build; never hand-roll COSE/CBOR. Sign-in reserves on\n the submitted credential id before any work, requires user verification, checks\n user handle and a strictly advancing counter (`reason: 'counter'`), mints, then\n re-checks with a guarded counter UPDATE; a ceremony is an HMAC-signed\n `ceremonyId` consumed into the unique ledger (replay = refuse; set\n `challengeSecret` for multi-process). Unique arbiters are\n `INSERT … ON CONFLICT DO NOTHING`, never a caught constraint error. Register and\n self-remove need a session authenticated within `freshSessionSeconds`, decided\n on the stored row (`Session.getAuthenticatedAt()`: server-set\n `data.authenticatedAt`, which tenant-switch rotation carries forward, else\n `created_at`; malformed fails closed; `setSessionData` refuses the key),\n first-class, no ceiling, and its STORED `authMethod` in `freshAuthMethods` (default password/passkey/oidc/magic-link; never `terminal`, whose approval mints a fresh session for any holder of a stale one, nor `pin`); self list/rename also refuse a ceiling; `users.passkey.manage` follows the PIN's\n single-tenant rule, and `removeAllPasskeys` is admin-only, never self. Sessions\n end before and after every removal; `SESSION_DATA_KEYS.passkeyCredentialId` is\n server-set (`setSessionData` refuses it). State-changing handlers require\n `application/json` (415). Challenge rows are reaped only 10 minutes past expiry\n (clock skew).\n- Step-up (#4841, `src/step-up.ts`, subpath `./step-up`): `requireRecentAuthentication`\n decides on `SessionContext.reauthenticatedAt`, derived from the stored row:\n `data.reauthenticatedAt` (server-set through `SessionCollection.markReauthenticated`\n only after a deliberate fresh authentication; `setSessionData` refuses it;\n extend/activity never move it) or the sign-in time of a password or passkey\n session only (`STEP_UP_SIGN_IN_AUTH_METHODS` = `password`, `passkey`; an OIDC\n or magic-link SIGN-IN, `terminal`, `pin`, `mobile` never count: an unlocked\n stolen device can complete them without the person). Rule: an EXISTING\n session never counts as fresh by itself; a DELIBERATE fresh authentication\n with any supported method does, so an OIDC-only or magic-link-only owner can\n still step up. Methods, all stamping the EXISTING session (never minting one),\n all refusing layered/PIN/ceilinged sessions (`Session.isStepUpEligible`):\n `PasswordCredentialService.stepUp` (limiter-guarded password check);\n `OidcLoginService.beginStepUp`/`completeStepUp` (authorization request with\n `prompt=login` + `max_age=0`; the transaction is stored on the session as\n `data.oidcStepUpIntent`, taken at the callback so it is single use; the ID\n token must verify as at sign-in AND carry `auth_time` inside the window, not\n before the intent started, not future; its issuer+subject must be an existing\n `OidcIdentity` of the session user's own profile; a provider that omits\n `auth_time` or ignores `prompt`/`max_age` is refused);\n `MagicLinkService.requestStepUp`/`consumeStepUp` (token claim `purpose:\n step_up` + session digest + user id, TTL <= 300 s, single use; `verify` and\n `inspect` refuse it so it cannot sign in; `consumeStepUp` refuses a link\n without that purpose). Every step-up refusal is one `StepUpRequiredError`\n (`step_up_required`) that does not say which check failed. A passkey owner\n re-authenticates with a fresh passkey sign-in. Keep the entry free of\n side-effect imports.\n- A layered session whose tenant differs from its parent's never loads (null\n is allowed: narrower). Limiter rows carry `retain_until`; retention must\n not fall back to a process-wide horizon.\n- `Session.parentSessionId` is the parent's bearer: sensitive, never a\n `list()` filter (raw-SQL id reads, which also keep revocation sweeps free of\n caller list bounds), never serialized to clients. `users.pin.manage` reaches\n only people whose every active membership is in the actor's tenant (the PIN\n is global per person). A sign-in re-checks the verified\n credential generation AFTER the mint (`stillValid`); keep that ordering.\n Operation guards deny outside a session's ceiling; `loadPersonSession`\n re-checks device enrollment.\n- Tenant switching verifies active membership before writing and rotates the\n session ID for non-null targets, revoking the old session. Persist the returned\n `SwitchTenantResult.sessionId`; `switchSessionTenant()` updates the cookie and\n preserves its security settings. Failed switches mutate nothing; null clears\n do not rotate, and layered sessions never rotate (a replacement would escape\n the revocation sweeps they depend on). Layers do not nest. `SessionCollection.setSessionTenant()` is unguarded and must\n never receive an untrusted tenant ID.\n- OIDC provisioning is atomic and fail-closed. Preserve exact issuer/subject\n identifiers, claim-source email verification, unique global Person ownership,\n and transaction-bound reconciliation. Read the OIDC module and canonical\n scenario matrix before changing any provisioning path.\n\n## Entry points and validation\n\n`src/sveltekit/` owns `createSessionHandler`, `createSessionCookie`,\n`destroySessionCookie`, and `switchSessionTenant`. Use README integration examples\nrather than copying application setup into these instructions.\n\nFrom the repository root:\n\n```bash\npnpm --filter @happyvertical/smrt-users test\npnpm --filter @happyvertical/smrt-users typecheck\npnpm --filter @happyvertical/smrt-users test:postgres\n```\n\nStart with the relevant test file via `test -- src/__tests__/<file>.test.ts`.\nRun `test:postgres` for RLS, principal context, OIDC, or terminal-auth database\nchanges. `typecheck` includes Svelte accessibility checks; plain `tsc` is\ninsufficient. The typecheck configs read workspace package sources, while\n`tsconfig.svelte.json` is used to package Svelte declarations. Follow root\nknowledge freshness checks before shipping.\n\n## Pending invitations\n\n`TenantInvitationService.create({ db: tx, transaction: 'caller' }).prepare({\ntenantId, email, roleSlug })` is a trusted host integration seam. The caller\nmust authorize the destination tenant and system role, serialize its invitation\nscope, and own the entire transaction. It prepares only pending User and\nMembership records, with a canonical global Person and email reservation;\nit never proves email ownership, activates access, sends email, or mints login\ncredentials. Existing canonical User/Profile links remain unchanged; unowned\nsame-email Profiles require explicit reconciliation. Pending retries reuse rows,\nactive memberships remain active with their existing role, and inactive or\nconflicting memberships fail closed. Caller failures must roll back the whole\ntransaction; retry identity uniqueness conflicts only after rollback. Run the\nprofile/user email-key backfills before using this service.\n\n`issue({ membershipId })` requires the host to authorize that exact destination\nand returns a signed single-use `{ membershipId, token, expiresAt }`; secure\ndelivery is the host’s responsibility (no email is sent). Configure `secret` and\noptional `tokenExpiry` (1–604800 seconds, default one day) at service creation.\n`accept({ membershipId, token, sessionId, expectedUserId? })` consumes the tenant\ngrant only after validating an independently authenticated, active exact User's\nstored first-class OIDC, magic-link, password or passkey session. Layered,\npermission-ceiling, terminal and unknown sessions fail closed. It activates only\nthe Membership; reuse/switch that session through canonical session APIs.\nNever mint global identity sessions from an operator-copyable invitation.\n\nFor a new pending User, wire `authorizeOidcOwner(context, { membershipId, token })`\nonly into the canonical protocol-verified OIDC `authorizeProfileOwner` callback.\nIt requires the exact caller transaction, strict `email_verified: true` and the\nexact canonical invitee email, consumes the grant and activates pending User\nand Membership atomically before returning `{ profile, user, tenantId, membershipId }`.\nArbitrary claims must never reach this trusted callback seam. The canonical\nbinder still verifies ownership and issuer/subject authority before commit.\nThe signed scope fixes user, profile, tenant, membership and role; expiration,\nreplay, changed bindings, inactive membership and suspended users fail closed.\nNonce consumption and activation roll back together. `TenantInvitationError`\nis an expected 400/403 refusal;\n`MagicLinkError` represents invalid, expired or replayed proof. Database failures\nremain distinct. Treat tokens as secrets, prefer URL fragments and POST bodies,\nand never log or persist a copy outside the canonical token ledger.\n\n\n## Independent emailed mailbox authentication\n\n`MailboxAuthenticationService.create({db:tx,transaction:'caller',secret,loginLimiter})`\nrequests and verifies returning-client login without creating identities/sessions.\n`request({email,sourceKey,deliver})` returns only `{requested:true}` for known,\nunknown, malformed, pending, inactive or unauthorized accounts. The trusted server\n`deliver({email,token,expiresAt})` callback sends only to the eligible canonical\nactive User's email; never expose a proof in HTTP responses/operator UI/logs,\nincluding development. Ten-minute one-use proofs bind immutable User/Profile ids.\n`authenticate({token,expectedUserId?,sessionId?})` rechecks canonical identity and\nactive tenant membership before consuming proof; returns only verified\n`{userId,profileId,tenantId}` for the host's canonical magic-link session mint.\nExisting signed-in identity must match; supplied sessions cannot have a parent,\npermission ceiling, terminal/PIN/unknown method, or inactive principal.\n\nFor pending invitation onboarding, `requestMailboxAuthentication({membershipId,\ntoken:projectGrant,sourceKey,deliver})` inspects but never consumes the signed\nproject grant, then delivers a DIFFERENT mailbox proof to the fixed invitee.\nOnly `{expiresAt}` is returned. `authenticateMailbox({membershipId,\ninvitationToken:projectGrant,token:mailedProof,expectedUserId?,sessionId?})` claims\nBOTH proof nonces and activates pending canonical User/exact Membership in the\nsame caller transaction. Mailbox proof issuer binds all invitation ids, role and\nSHA256 of the exact grant. A copied operator-visible grant cannot authenticate\nidentity. Repeated email requests do not burn the grant; only the first completed\nauthentication can claim it. Existing active-session/OIDC paths remain supported.\n\nAll refusals/caller failures must roll back the whole caller transaction. Mail\ntransport must reject on failure. Delivery is an external effect before commit:\na successfully delivered but rolled-back proof is unusable; retry may send another\nmail. No session/authentication is valid without committed proof claims. The host\nmust set a bounded transport timeout and never return transport payloads/secrets.\nNo generic outbox/provider is required; compose the existing SDK email transport.\n\nBoth mail request operations REQUIRE a root-executor canonical\n`LoginAttemptLimiter` passed as `loginLimiter`; missing limiters fail before\nnonce/budget writes or delivery. Completion-only operations may omit it. Supply\nthe limiter independently from the caller transaction so\ncaller rollbacks cannot release send budgets (SQLite single-connection fixtures\ncannot prove that production-pool separation). `sourceKey` is a trusted server\nclient-address key, never request-controlled forwarded headers; limiter hashes\nand peppers it, never stores raw addresses/email. Each request retains its budget\nthrough window expiry via `retainOnSuccess`, regardless of account eligibility.\nHandle `LoginRateLimitError` with the same generic request response plus retry\npolicy. Returning request has a 250ms response floor; delivery latency remains\ntransport-dependent, so do not claim constant timing. Malformed/expired/replayed\nproofs raise `MagicLinkError`; invitation binding/status refusals also use\n`TenantInvitationError`. Database/transport faults remain distinguishable server\nfailures. Never swallow an error and commit a partially consumed transaction.\n\n`MagicLinkService.inspect()` validates signed live nonce without claiming it;\nit is preparation, never authentication. `verify()` remains the atomic claim.\nOptional generated signed `subject` binds immutable identity; legacy callers\nwithout a subject retain their existing result shape.\n\nFocused matrix: `mailbox-authentication.test.ts` runs in memory SQLite by default;\n`TEST_DB_ADAPTER=postgres` plus an explicit isolated `DATABASE_URL` creates a unique\nschema per scenario and also exercises concurrent invitation/login proof claims.\nIt is registered in `test:postgres`; no shared local service fallback is used.\n",
|
|
8441
|
+
"agentDoc": "# @happyvertical/smrt-users\n\nMulti-tenant identity, RBAC, hierarchical tenants, sessions, and SvelteKit auth.\n\n## Modules\n\nRead only the module relevant to the change; protocol and provisioning details\nare not prerequisites for unrelated user-package work.\n\n| Module | Scope | Module doc |\n|---|---|---|\n| `src/permission-registry.ts` | portable permission metadata registration; same root/service singleton, no authority grants | [agents/permissions.md](agents/permissions.md#portable-metadata-registry-4765) |\n| `src/services/PermissionResolver.ts` | permission precedence, inherited memberships, guards, RLS, role seeding | [agents/permissions.md](agents/permissions.md) |\n| `src/services/OidcLoginService.ts`, collections and OIDC handlers | identity reconciliation, transaction boundaries, migration readiness | [agents/oidc-provisioning.md](agents/oidc-provisioning.md) |\n| `src/services/MobileAuthService.ts` | mobile handshake, bearer sessions, bootstrap extension boundary | [agents/mobile-auth.md](agents/mobile-auth.md) |\n| `src/services/TerminalAuthService.ts`, `src/services/LoginAttemptLimiter.ts`, `src/collections/LoginAttemptCollection.ts` | terminal approval concurrency, shared login budget and lockout (#3273), retry-safe database fixtures | [agents/terminal-auth-testing.md](agents/terminal-auth-testing.md) |\n| `src/services/DeviceCredentialService.ts` | per-person PIN layered on a device session (#3276), verifier seam for other credential kinds | this file, \"Security boundaries\" |\n| `src/services/PasswordCredentialService.ts`, `src/sveltekit/password-handlers.ts` | email + password sign-in and password lifecycle (#3274); shared scrypt in `credential-hash.ts` | this file, \"Security boundaries\"; README \"Password sign-in\" |\n| `src/services/PasskeyCredentialService.ts`, `src/sveltekit/passkey-handlers.ts`, `src/svelte/passkey.ts` | passkey (WebAuthn) sign-in and passkey lifecycle (#3275); library does all verification | this file, \"Security boundaries\"; README \"Passkey sign-in\" |\n| `src/services/TenantInvitationService.ts`, `src/services/MailboxAuthenticationService.ts` | exact-role invitations, preserved identity, one-use generations and embedded transaction send budgets | [agents/family-invitations.md](agents/family-invitations.md) |\n| `src/services/oauth-cimd.ts`, `src/services/oauth-cimd-fetch.ts` | opt-in Client ID Metadata Documents for the SDK OAuth server (#5081): required origin policy, SSRF-pinned fetch, cache | [agents/oauth-authorization.md](agents/oauth-authorization.md#client-id-metadata-documents-5081) |\n| `src/services/ServicePrincipalService.ts` | non-login service principals (#5245): tenant-bound, idempotent per key, permanent retire; sessions refused at mint and resolve | [agents/service-principals.md](agents/service-principals.md) |\n| `src/retention.ts` | expired session/token/CLI-auth reaping and retention sweep wiring | [agents/retention.md](agents/retention.md) |\n\n## Models and authority\n\n- Users are global; tenant access comes through Membership (unique user/tenant).\n User email is normalized and globally unique through readonly nullable\n `emailKey`. `profileId` is a unique cross-package reference: at most one User\n owns each non-null Profile.\n- Tenant uses STI and a materialized hierarchy, maximum depth 10.\n `hierarchyPath`/`hierarchyLevel` are derived from `parentTenantId` by\n `Tenant.save()` on every save (any caller-supplied value is recomputed) and\n descendants are re-materialized when they change; never hand-maintain them.\n Legacy rows are backfilled with `smrt db:materialize-tenant-hierarchy`\n (`materializeTenantHierarchy()`). Tests that need a corrupt path must write it\n with raw SQL (#3036).\n- Role with `tenantId = null` is available to all tenants; `isSystem` prevents\n deletion. `inheritsToDescendants` is opt-in. Seed owner/admin/member/viewer\n through `RoleCollection.seedSystemRoles()` at application initialization.\n- Group roles apply only in their own tenant. Use `getGroupIdsForTenant()`,\n never cross-tenant `getGroupIds()`, for authorization.\n- Upward visibility is opt-in and read-only: `permissions.ancestorRead`\n ({ roles, collections, maxDepth? }) lets a DESCENDANT membership contribute\n declared `<collection>.read` at an ancestor, only when no membership resolved\n there, intersected with BOTH the role's own catalog grants and the\n principal's effective permissions in that descendant, and only for SYSTEM\n roles (a tenant-scoped role sharing a declared slug is ignored). Off by default, never\n write, never lateral, and never row visibility — sibling rows stay scoped by\n tenancy/RLS. Read the permissions module before changing it.\n- Membership DENY always wins. Direct inactive membership blocks inherited\n authority; a direct active membership pins resolution instead of unioning it\n with ancestors. Read the permissions module before changing these rules.\n- AccessRequest has no generated API/MCP/CLI operations; access it through\n `AccessRequestService`. Its JSON field is `requestContext`, not reserved\n slug-scoping `context`.\n\n## Security boundaries\n\n- Generated REST/MCP operations on identity/RBAC models are list/get only.\n Route authentication does not authorize authority mutations, and these models\n are not tenant-scoped. Use permission-gated services or explicitly checked\n consumer handlers. Generated CLI is list/get or closed (`cli: false` for\n credential/grant models) because agents shell out to it; a `cli` without\n `include` is full CRUD (#3742). Their catalog slugs stay full via\n `USERS_AUTHORITY_CATALOG_MODELS`. Preserve the registry assertions in\n `security-audit-1400.test.ts` and `issue-3742-cli-surface-lockdown.test.ts`.\n- Resource guards take the resource tenant, not the session tenant. Omit a\n session membership when targeting a different tenant; mismatches fail closed.\n `loadSessionContext().tenantAuthorization` must be checked by required-tenant\n consumers: null membership can represent inherited authority.\n- Sessions use secure UUIDs; TTL is seconds (default seven days). Access marks\n expired sessions EXPIRED. Magic-link tokens are single use.\n- `Session.authMethod` is server-set at mint time and never read from the\n client; every mint site in this package sets it. A session with\n `parentSessionId` is valid only while its parent validates\n (`loadSessionContext` enforces this; there is no FK cascade by design), may\n not switch to a tenant other than the parent's, and is revoked with its\n parent by `destroySession`.\n- Credential sign-ins reserve through `LoginAttemptLimiter` BEFORE credential\n work and key the subject on the submitted identifier, never a resolved user,\n so unknown and wrong take the same path. Reservations are fail-closed: keep\n them on failure, release on success or abort, never skip the reserve.\n Limiter writes are raw SQL and bypass the change feed; the audit sink is the\n observability seam, and it must never throw into the sign-in path.\n Subject and source budgets are sized independently (#3531); `source: false`\n ignores the source key, so a reservation then needs a subject (fail closed).\n The `source-locked` audit entry never carries a subject or caller metadata.\n- `DeviceCredentialService` accepts a person credential only from a\n first-class session whose `authMethod` is a device-enrollment method\n (`terminal` by default) and that the host's `assertEnrolledDevice` confirms.\n A layered or PIN session can never administer PINs regardless of\n permissions. PIN hashes carry a per-row salt and the configured pepper;\n treat an unset pepper as a production misconfiguration.\n- A person session carries the PERSON's authority (resolved from their own\n membership on every load), never the device account's. `Session.data` keys\n in `SESSION_DATA_KEYS` are server-set controls enforced by the model:\n `permissionCeiling` only ever intersects (malformed fails closed to none)\n and suppresses `superAdminBypass`/`systemContext`; `absoluteExpiresAt`\n bounds `extend()` and `isValid()`; `idleSeconds` overrides the resolving\n service's TTL policy. Never write them from client input. The ceiling is a\n sign-in snapshot; `singleOccupant` revokes other children only AFTER a\n successful mint. A `mustReset` sign-in mints with an empty ceiling and\n `setPin` ends that session; do not grant it authority another way.\n- `UsersPasswordCredential` is one row per person, sensitive, with no\n generated surface; `PasswordCredentialService` and its handlers are its only\n session-authorized read/write paths. The separate Node `./operator` entrypoint\n provisions new PostgreSQL owners from trusted database custody, atomically;\n never mount it in a browser/REST/MCP handler. Exact retries verify existing\n credentials without writes; partial/conflicting identities fail closed.\n See README \"Trusted deployment owner provisioning\".\n Sign-in normalizes the email like `emailKey`, reserves\n before work, always runs one scrypt verify (dummy hash when absent), never\n creates a user, and maps every non-rate-limit refusal to one\n `PasswordCredentialError`. It re-checks the credential after the mint (a\n rehash that keeps row and version is confirmed by re-verifying); the\n parameter-upgrade write is a guarded UPDATE that must never replace a\n rotated password, and verification against a weaker stored hash is padded\n to the policy's scrypt cost. Self-service writes are guarded on the proven\n credential (first set insert-only); session sweeps run before and after\n each write. Self-service needs the current password except for a first\n set; `users.password.manage` follows the PIN's single-tenant target\n rule and never resets the actor's own. Layered sessions never manage\n passwords; a `mustChange` sign-in mints an empty ceiling.\n `replaceForgottenPassword` (#3905, opt-in `recovery`) is the only\n self-service write without the current password: it decides on the stored\n session row (owner, first-class, no ceiling, listed non-password/pin\n `authMethod`, fresh `outOfBandProofAt` stamp) and ends every session,\n its own included. Never set that stamp from client input.\n- `UsersPasskeyCredential` (many per person) and `UsersPasskeyChallenge` (consumed\n challenge ledger) are sensitive with no generated surface;\n `PasskeyCredentialService` and its handlers are the only paths. Verification is\n `@simplewebauthn/server`, loaded on first use (its `reflect-metadata` polyfill is process-wide) and external in the build; never hand-roll COSE/CBOR. Sign-in reserves on\n the submitted credential id before any work, requires user verification, checks\n user handle and a strictly advancing counter (`reason: 'counter'`), mints, then\n re-checks with a guarded counter UPDATE; a ceremony is an HMAC-signed\n `ceremonyId` consumed into the unique ledger (replay = refuse; set\n `challengeSecret` for multi-process). Unique arbiters are\n `INSERT … ON CONFLICT DO NOTHING`, never a caught constraint error. Register and\n self-remove need a session authenticated within `freshSessionSeconds`, decided\n on the stored row (`Session.getAuthenticatedAt()`: server-set\n `data.authenticatedAt`, which tenant-switch rotation carries forward, else\n `created_at`; malformed fails closed; `setSessionData` refuses the key),\n first-class, no ceiling, and its STORED `authMethod` in `freshAuthMethods` (default password/passkey/oidc/magic-link; never `terminal`, whose approval mints a fresh session for any holder of a stale one, nor `pin`); self list/rename also refuse a ceiling; `users.passkey.manage` follows the PIN's\n single-tenant rule, and `removeAllPasskeys` is admin-only, never self. Sessions\n end before and after every removal; `SESSION_DATA_KEYS.passkeyCredentialId` is\n server-set (`setSessionData` refuses it). State-changing handlers require\n `application/json` (415). Challenge rows are reaped only 10 minutes past expiry\n (clock skew).\n- Step-up (#4841, `src/step-up.ts`, subpath `./step-up`): `requireRecentAuthentication`\n decides on `SessionContext.reauthenticatedAt`, derived from the stored row:\n `data.reauthenticatedAt` (server-set through `SessionCollection.markReauthenticated`\n only after a deliberate fresh authentication; `setSessionData` refuses it;\n extend/activity never move it) or the sign-in time of a password or passkey\n session only (`STEP_UP_SIGN_IN_AUTH_METHODS` = `password`, `passkey`; an OIDC\n or magic-link SIGN-IN, `terminal`, `pin`, `mobile` never count: an unlocked\n stolen device can complete them without the person). Rule: an EXISTING\n session never counts as fresh by itself; a DELIBERATE fresh authentication\n with any supported method does, so an OIDC-only or magic-link-only owner can\n still step up. Methods, all stamping the EXISTING session (never minting one),\n all refusing layered/PIN/ceilinged sessions (`Session.isStepUpEligible`):\n `PasswordCredentialService.stepUp` (limiter-guarded password check);\n `OidcLoginService.beginStepUp`/`completeStepUp` (authorization request with\n `prompt=login` + `max_age=0`; the transaction is stored on the session as\n `data.oidcStepUpIntent`, taken at the callback so it is single use; the ID\n token must verify as at sign-in AND carry `auth_time` inside the window, not\n before the intent started, not future; its issuer+subject must be an existing\n `OidcIdentity` of the session user's own profile; a provider that omits\n `auth_time` or ignores `prompt`/`max_age` is refused);\n `MagicLinkService.requestStepUp`/`consumeStepUp` (token claim `purpose:\n step_up` + session digest + user id, TTL <= 300 s, single use; `verify` and\n `inspect` refuse it so it cannot sign in; `consumeStepUp` refuses a link\n without that purpose). Every step-up refusal is one `StepUpRequiredError`\n (`step_up_required`) that does not say which check failed. A passkey owner\n re-authenticates with a fresh passkey sign-in. Keep the entry free of\n side-effect imports.\n- A layered session whose tenant differs from its parent's never loads (null\n is allowed: narrower). Limiter rows carry `retain_until`; retention must\n not fall back to a process-wide horizon.\n- `Session.parentSessionId` is the parent's bearer: sensitive, never a\n `list()` filter (raw-SQL id reads, which also keep revocation sweeps free of\n caller list bounds), never serialized to clients. `users.pin.manage` reaches\n only people whose every active membership is in the actor's tenant (the PIN\n is global per person). A sign-in re-checks the verified\n credential generation AFTER the mint (`stillValid`); keep that ordering.\n Operation guards deny outside a session's ceiling; `loadPersonSession`\n re-checks device enrollment.\n- Tenant switching verifies active membership before writing and rotates the\n session ID for non-null targets, revoking the old session. Persist the returned\n `SwitchTenantResult.sessionId`; `switchSessionTenant()` updates the cookie and\n preserves its security settings. Failed switches mutate nothing; null clears\n do not rotate, and layered sessions never rotate (a replacement would escape\n the revocation sweeps they depend on). Layers do not nest. `SessionCollection.setSessionTenant()` is unguarded and must\n never receive an untrusted tenant ID.\n- OIDC provisioning is atomic and fail-closed. Preserve exact issuer/subject\n identifiers, claim-source email verification, unique global Person ownership,\n and transaction-bound reconciliation. Read the OIDC module and canonical\n scenario matrix before changing any provisioning path.\n\n## Entry points and validation\n\n`src/sveltekit/` owns `createSessionHandler`, `createSessionCookie`,\n`destroySessionCookie`, and `switchSessionTenant`. Use README integration examples\nrather than copying application setup into these instructions.\n\nFrom the repository root:\n\n```bash\npnpm --filter @happyvertical/smrt-users test\npnpm --filter @happyvertical/smrt-users typecheck\npnpm --filter @happyvertical/smrt-users test:postgres\n```\n\nStart with the relevant test file via `test -- src/__tests__/<file>.test.ts`.\nRun `test:postgres` for RLS, principal context, OIDC, or terminal-auth database\nchanges. `typecheck` includes Svelte accessibility checks; plain `tsc` is\ninsufficient. The typecheck configs read workspace package sources, while\n`tsconfig.svelte.json` is used to package Svelte declarations. Follow root\nknowledge freshness checks before shipping.\n\n## Pending invitations\n\n`TenantInvitationService.create({ db: tx, transaction: 'caller' }).prepare({\ntenantId, email, roleSlug })` is a trusted host integration seam. The caller\nmust authorize the destination tenant and system role, serialize its invitation\nscope, and own the entire transaction. It prepares only pending User and\nMembership records, with a canonical global Person and email reservation;\nit never proves email ownership, activates access, sends email, or mints login\ncredentials. Existing canonical User/Profile links remain unchanged; unowned\nsame-email Profiles require explicit reconciliation. Pending retries reuse rows,\nactive memberships remain active with their existing role, and inactive or\nconflicting memberships fail closed. Caller failures must roll back the whole\ntransaction; retry identity uniqueness conflicts only after rollback. Run the\nprofile/user email-key backfills before using this service.\n\n`issue({ membershipId })` requires the host to authorize that exact destination\nand returns a signed single-use `{ membershipId, token, expiresAt }`; secure\ndelivery is the host’s responsibility (no email is sent). Configure `secret` and\noptional `tokenExpiry` (1–604800 seconds, default one day) at service creation.\n`accept({ membershipId, token, sessionId, expectedUserId? })` consumes the tenant\ngrant only after validating an independently authenticated, active exact User's\nstored first-class OIDC, magic-link, password or passkey session. Layered,\npermission-ceiling, terminal and unknown sessions fail closed. It activates only\nthe Membership; reuse/switch that session through canonical session APIs.\nNever mint global identity sessions from an operator-copyable invitation.\n\nFor a new pending User, wire `authorizeOidcOwner(context, { membershipId, token })`\nonly into the canonical protocol-verified OIDC `authorizeProfileOwner` callback.\nIt requires the exact caller transaction, strict `email_verified: true` and the\nexact canonical invitee email, consumes the grant and activates pending User\nand Membership atomically before returning `{ profile, user, tenantId, membershipId }`.\nArbitrary claims must never reach this trusted callback seam. The canonical\nbinder still verifies ownership and issuer/subject authority before commit.\nThe signed scope fixes user, profile, tenant, membership and role; expiration,\nreplay, changed bindings, inactive membership and suspended users fail closed.\nNonce consumption and activation roll back together. `TenantInvitationError`\nis an expected 400/403 refusal;\n`MagicLinkError` represents invalid, expired or replayed proof. Database failures\nremain distinct. Treat tokens as secrets, prefer URL fragments and POST bodies,\nand never log or persist a copy outside the canonical token ledger.\n\n\n## Independent emailed mailbox authentication\n\n`MailboxAuthenticationService.create({db:tx,transaction:'caller',secret,loginLimiter})`\nrequests and verifies returning-client login without creating identities/sessions.\n`request({email,sourceKey,deliver})` returns only `{requested:true}` for known,\nunknown, malformed, pending, inactive or unauthorized accounts. The trusted server\n`deliver({email,token,expiresAt})` callback sends only to the eligible canonical\nactive User's email; never expose a proof in HTTP responses/operator UI/logs,\nincluding development. Ten-minute one-use proofs bind immutable User/Profile ids.\n`authenticate({token,expectedUserId?,sessionId?})` rechecks canonical identity and\nactive tenant membership before consuming proof; returns only verified\n`{userId,profileId,tenantId}` for the host's canonical magic-link session mint.\nExisting signed-in identity must match; supplied sessions cannot have a parent,\npermission ceiling, terminal/PIN/unknown method, or inactive principal.\n\nFor pending invitation onboarding, `requestMailboxAuthentication({membershipId,\ntoken:projectGrant,sourceKey,deliver})` inspects but never consumes the signed\nproject grant, then delivers a DIFFERENT mailbox proof to the fixed invitee.\nOnly `{expiresAt}` is returned. `authenticateMailbox({membershipId,\ninvitationToken:projectGrant,token:mailedProof,expectedUserId?,sessionId?})` claims\nBOTH proof nonces and activates pending canonical User/exact Membership in the\nsame caller transaction. Mailbox proof issuer binds all invitation ids, role and\nSHA256 of the exact grant. A copied operator-visible grant cannot authenticate\nidentity. Repeated email requests do not burn the grant; only the first completed\nauthentication can claim it. Existing active-session/OIDC paths remain supported.\n\nAll refusals/caller failures must roll back the whole caller transaction. Mail\ntransport must reject on failure. Delivery is an external effect before commit:\na successfully delivered but rolled-back proof is unusable; retry may send another\nmail. No session/authentication is valid without committed proof claims. The host\nmust set a bounded transport timeout and never return transport payloads/secrets.\nNo generic outbox/provider is required; compose the existing SDK email transport.\n\nBoth mail request operations REQUIRE a root-executor canonical\n`LoginAttemptLimiter` passed as `loginLimiter`; missing limiters fail before\nnonce/budget writes or delivery. Completion-only operations may omit it. Supply\nthe limiter independently from the caller transaction so\ncaller rollbacks cannot release send budgets (SQLite single-connection fixtures\ncannot prove that production-pool separation). `sourceKey` is a trusted server\nclient-address key, never request-controlled forwarded headers; limiter hashes\nand peppers it, never stores raw addresses/email. Each request retains its budget\nthrough window expiry via `retainOnSuccess`, regardless of account eligibility.\nHandle `LoginRateLimitError` with the same generic request response plus retry\npolicy. Returning request has a 250ms response floor; delivery latency remains\ntransport-dependent, so do not claim constant timing. Malformed/expired/replayed\nproofs raise `MagicLinkError`; invitation binding/status refusals also use\n`TenantInvitationError`. Database/transport faults remain distinguishable server\nfailures. Never swallow an error and commit a partially consumed transaction.\n\n`MagicLinkService.inspect()` validates signed live nonce without claiming it;\nit is preparation, never authentication. `verify()` remains the atomic claim.\nOptional generated signed `subject` binds immutable identity; legacy callers\nwithout a subject retain their existing result shape.\n\nFocused matrix: `mailbox-authentication.test.ts` runs in memory SQLite by default;\n`TEST_DB_ADAPTER=postgres` plus an explicit isolated `DATABASE_URL` creates a unique\nschema per scenario and also exercises concurrent invitation/login proof claims.\nIt is registered in `test:postgres`; no shared local service fallback is used.\n",
|
|
8340
8442
|
"moduleDocs": [
|
|
8341
8443
|
{
|
|
8342
8444
|
"path": "agents/permissions.md",
|
|
@@ -8368,6 +8470,11 @@
|
|
|
8368
8470
|
"module": "oauth-authorization",
|
|
8369
8471
|
"content": "# Hosted OAuth authorization\n\n`SmrtOAuthAuthorizationStorage` implements the protocol-neutral storage contract\nfrom `@happyvertical/auth/server`. Apply normal SMRT migrations before starting\nthe server. The six `users_oauth_*` models are sensitive and have no generated\nREST, MCP or CLI operations. Keep their tables on the private application\nconnection; public catalog roles must not read them.\n\n`SmrtOAuthAuthorizationService.create({ db, scopePermissions })` supplies the\nsession boundary. `approve(server, parsedRequest, sessionId)` loads the existing\nsession again, checks its active user and tenant membership, verifies every\nscope's configured permissions, and records consent. Existing magic-link,\npassword and OIDC sessions work without a separate identity mapping. Parent\nsession validity and session permission ceilings are enforced by SessionService.\nUnknown scopes fail closed. An empty permission mapping explicitly permits a\nscope for any valid session. OAuth does not grant super-admin bypass.\n\nPass `service.identity` to the SDK server. It revalidates the stored consent on\nboth code exchange and refresh. A permission loss denies the grant rather than\nsilently expanding or partially authorizing it. The consent-time permission\nsnapshot is an upper bound even if the host later changes its scope mapping.\n\nAfter `server.verifyAccessToken(token, resource)`, always call\n`service.validateAccessTokenClaims(payload)`. A non-null result is a server-only\nSessionContext whose permissions and permissionCeiling are limited to the\nverified token's mapped scopes. Do not serialize that context: it contains the\nsession credential. The JWT carries only a non-secret `smrt_grant_id`, subject,\nclient, tenant and scopes. JWT signature verification alone does not check live\nsession, user, tenant or consent revocation.\n\n`listGrants(sessionId)` returns safe account-settings projections.\n`revokeGrant(sessionId, grantId)` checks ownership and atomically revokes the\nconsent, outstanding codes, and all refresh descendants. Revoking or replaying a\nmanaged refresh token also revokes its consent, so existing access tokens fail\nthe live grant check. Repeating revocation is safe. A foreign grant returns false.\n\nThe `/sveltekit` export `createOAuthHandlers({ server, authorization,\ngetSessionId })` provides Fetch-compatible `authorize`, `consent`, `grants` and\n`protocol` handlers. The host renders consent, supplies its existing cookie\nlookup, and preserves a validated local return path through magic-link login.\nConsent POST requires an exact same-origin Origin header and `decision=approve`;\nrequested OAuth parameters remain on the authorization URL and are revalidated\nby the SDK. Grant revocation POST has the same origin check and takes `grantId`.\nAll account/consent responses use private, no-store. No handler authenticates a\nsession from OAuth client identity or accepts a browser-submitted user/tenant.\n\n## Client ID Metadata Documents (#5081)\n\nOpt-in, off by default, like `dynamicClientRegistration`. The SDK server\nresolves clients only through `storage.getClient`, so\n`createCimdAuthorizationServer({ ...sdkOptions, clientIdMetadataDocuments })`\n(`src/services/oauth-cimd.ts`) wraps the storage and subclasses the server to\nadd `client_id_metadata_document_supported: true` to RFC 8414 metadata. Without\nthe option it returns the plain SDK server: https client_ids stay unknown,\nnothing is fetched, nothing is advertised. `withClientIdMetadataDocuments`\ncomposes the same decorator onto a storage directly.\n\n- `allowClientOrigin(origin, clientId)` is REQUIRED; construction throws\n without it (there is no implicit allow-all; pass `() => true` explicitly).\n It runs on every request before the cache, so a policy change is immediate;\n a throw or non-`true` result denies.\n- client_id must be the canonical `https://` URL with a path, default port, no\n credentials/fragment/query/dot segments, and a public DNS-style host (literal IPs,\n single-label and `.local/.internal/.localhost`-style names are refused before\n any network I/O).\n- Fetch (`oauth-cimd-fetch.ts`): DNS resolved once, every address must be\n public (non-global-unicast IPv6, private/loopback/link-local/CGNAT/metadata\n IPv4 refused), connection pinned to the vetted address, redirects never\n followed, 5 s deadline covering DNS and the request (also enforced around any injected fetcher), 16 KiB cap, at most 8 concurrent cache-miss fetches (`maxConcurrentFetches`; excess is refused as unknown client, not failure-cached), `application/json` or `+json` only,\n identity encoding. content's `safe-remote-url` is not reused: users cannot\n depend on content (heavy graph, content dev-depends on users).\n- Document: `client_id` equals the URL; `redirect_uris` 1-10 https (loopback\n http only with `allowLoopbackRedirects`); the authorization request's\n `redirect_uri` must equal one entry exactly; `token_endpoint_auth_method`\n absent or `none`; any `client_secret*` rejects; grant/response types limited\n to `authorization_code`/`refresh_token`/`code`. Allowed scopes are the\n document's `scope` intersected with the server's (all server scopes if\n absent).\n- Cache: in-memory, honours `s-maxage`/`max-age`/`Age`, clamped to 60 s..24 h\n (so `no-store` still gets the floor, bounding outbound fetches), 1 h default,\n 30 s negative cache, 1000 entries, concurrent lookups share one fetch. It is\n per-process; replicas fetch independently.\n- Every failure is \"unknown client\" to the requester; `onRejected(clientId,\n reason)` is for operator logs only. Tests: `src/__tests__/oauth-cimd.test.ts`.\n\n## Transaction invariants\n\nCode consume uses a conditional write. Refresh rotation and revocation lock a\nstable family row before reading token state; locking the token being replaced\nalone would allow a concurrent revocation to miss an inserted descendant.\nManaged operations lock the consent row first, then the family. Replacement\ninsertion, old-token consume and replay revocation share one database executor.\nA failed insert rolls back consume. Revalidated scopes and claims are persisted\natomically before the SDK exposes the replacement. Undefined claims clear prior\nclaims. Narrowing cannot expand scopes, revive or modify a consumed token.\n\nRetry only transaction failures classified as SQLite contention or PostgreSQL\nserialization/deadlock, after adapter rollback, at most six retries. Never retry\nprotocol callbacks or other external effects. The database adapter must clean up\nfailed statements and support independent connections; a process-local mutex is\nnot a replica-safety mechanism.\n\n## Behavior-to-test contract (#3659)\n\nEvery row runs in `src/__tests__/oauth-authorization.test.ts` on Node >=26 with\nSQLite and real PostgreSQL. Commands:\n\n```sh\npnpm --filter @happyvertical/smrt-users exec vitest run src/__tests__/oauth-authorization.test.ts\nDATABASE_URL=postgres://postgres@127.0.0.1:55597/smrt_oauth pnpm --filter @happyvertical/smrt-users exec vitest run src/__tests__/oauth-authorization.test.ts\npnpm --filter @happyvertical/smrt-users typecheck\n```\n\n| Invariant / trigger | Positive | Negative / failure | Actor / context | Executor / external edge | Level |\n| --- | --- | --- | --- | --- | --- |\n| Register and consume code | Metadata survives new adapter; one concurrent winner | Wrong client, redirect, resource; expiry and replay | Registered client / subject | Independent DB connections; SDK code contract | Integration |\n| Rotate / replay refresh | One replacement | Reuse revokes every descendant | Same family across replicas | Stable family lock, same transaction | Integration |\n| Rotation rollback / revoke race | Retry after insertion failure works | Duplicate replacement aborts consume; revoke cannot miss descendant | Same family, simultaneous operations | Real rollback and independent executors | Integration |\n| Narrow replacement | Subset and replacement claims persist through subsequent rotation; undefined claims clear old claims | Expansion, hash mismatch, consumed/revoked token | Authenticated client / original family | SDK fail-closed narrowing contract, atomic locked update | Integration |\n| Explicit recovery factory | Recreates configured connection after invalidation | Instance-only fails closed; ordinary storage failure propagates | Storage owner / configured database | Injected failure boundary plus real independent-connection races | Unit + integration |\n| Access revocation | Another adapter sees it; repeats safe | Expired revocation no longer effective | Possessor of verified access token | Unique insert with conflict handling | Integration |\n| Consent/grant ownership | Own grant can list/revoke | Other subject, tenant, scope deny; no session bearer in projection | Owner A/B × grant A/B | Live session + consent reads; atomic cascade | Integration |\n| Live identity and ceiling | Current permission allows | Inactive user/membership, changed session ceiling, destroyed session | Active vs revoked context | SessionService and current RBAC | Integration |\n| Code/live revoke cascade | Valid code exchanges | Membership loss before exchange; refresh revoke kills access | Original subject/tenant | SDK revalidateConsent callback | Integration |\n| Consent snapshot / tenant | Original mapped scope | Later permission mapping expansion; inactive tenant | Owner × current tenant | Stored upper bound plus live permission checks | Integration |\n| Layered session / expiry | Parent and child valid | Parent destroyed or child expired | Person session on device parent | Existing session controls | Integration |\n| Consent route | Same-origin explicit approval | Missing/foreign Origin, denial, revoked session | Browser session / untrusted POST | Fetch request and SDK parsing | Route + DB |\n\nThis is new functionality, so a base-regression comparison is N/A: base has no\nOAuth authorization storage or session grant API. Positive/negative contract\ncases exercise real persistence rather than mocked SQL. Remote-provider outage\nis N/A: the service has no external identity/provider call. SDK owns malformed\nOAuth protocol, signature, PKCE and redirect parsing tests; hosts own their\nconsent UI, login return path and application-specific workspace policy.\n\n### Recoverable local SQLite connections\n\nLocal libsql connections may be invalidated by the SQL adapter after a native\n`SQLITE_BUSY` failure. An instance-only storage adapter fails closed in this\ncase; it does not silently reconnect and discard connection settings.\nFor recoverable local multi-replica operation, supply `recoverDatabase`:\n\n```typescript\nconst storage = await SmrtOAuthAuthorizationStorage.create({\n db,\n recoverDatabase: async () => {\n const connection = await getDatabase({\n type: 'sqlite', url: configuredFileUrl, dbid: randomUUID(),\n });\n await connection.query('PRAGMA foreign_keys = ON');\n // Reapply any other application-required connection settings here.\n return connection;\n },\n});\n```\n\nThe factory is also used for the initial dedicated storage connection, keeping\nstorage recovery independent of a shared application/session connection. It\nmust return a migrated connection to the same database and restore every\nrequired PRAGMA, attachment, temporary table or other per-connection setting.\nIt must not create application schema. Known invalidated failures may be retried\nat most six times; ordinary storage failures propagate. PostgreSQL does not\nneed this factory. Connection ownership/disposal remains with the host factory.\n"
|
|
8370
8472
|
},
|
|
8473
|
+
{
|
|
8474
|
+
"path": "agents/service-principals.md",
|
|
8475
|
+
"module": "service-principals",
|
|
8476
|
+
"content": "# Service principals (#5245)\n\nA service principal is a User plus one Membership in exactly one tenant that an\nautomated actor (an agent, an integration) holds grants as. It can never sign\nin, and hosts need no per-path refusals: smrt-users enforces that itself.\n\n## Data shape\n\nAll new `User` columns are nullable and `readonly` (never mass-assigned over a\ngenerated surface); every existing row is a person and is unaffected.\n\n| Field | Person | Service principal |\n|---|---|---|\n| `principalKind` | `null` | `'service'` |\n| `servicePrincipalTenantId` | `null` | the only tenant it is valid in |\n| `servicePrincipalKey` | `null` | caller key, unique per tenant (`users_service_principal_tenant_key`) |\n| `retiredAt` | `null` | set once on retirement, never cleared by the service |\n\n`User.save()` refuses: an unknown `principalKind`; service fields on a person;\nan email or username on a service principal (so no email- or username-keyed\npath can address it); missing tenant/key; and `active`/`pending` status once\n`retiredAt` is set. Its profile is a tenant-scoped `bot` profile, one per\nprincipal (`profileId` is unique).\n\n## Enforcement\n\n- Mint: `SessionCollection.createSession` refuses any user whose stored\n `principal_kind` is non-null (fail closed for unknown kinds). Every mint in\n the package (sign-in methods, PIN layers, terminal approval, tenant-switch\n rotation, `SessionService.createSession`) goes through it; a structural test\n in `service-principal.test.ts` keeps it that way.\n- Resolve: `SessionCollection.findValidSession` returns null for such a row,\n which covers `loadSessionContext` and every direct consumer (password,\n passkey, magic-link and OIDC step-up, invitation accept, mailbox auth).\n `loadSessionContext` also refuses a service principal session user or\n layered parent (`User.canHoldSession()`). OAuth grants and mobile bearers\n resolve through `loadSessionContext`.\n- `TenantInvitationService` refuses its membership on issue, accept, mailbox\n authentication and the OIDC owner seam.\n- app-runtime's external-OIDC MCP principal mapping refuses it.\n\n## API\n\n`ServicePrincipalService.create({ db, transaction: 'caller' })` is a trusted\nhost seam like invitation `prepare()`: the host authorizes tenant and role and\nowns the transaction; the service never opens one.\n\n- `createServicePrincipal({ tenantId, key, roleSlug | roleId, displayName? })`\n creates or replays by `(tenantId, key)`; a replay with another role, or of a\n retired key, is a `ServicePrincipalError` (409).\n- `retireServicePrincipal({ tenantId, userId })` is permanent and idempotent:\n user suspended and stamped `retiredAt`, membership inactive, any session row\n revoked. Null for a person or another tenant's principal. There is no\n reactivation API; create a new principal under a new key.\n- `isActiveServicePrincipal({ tenantId, userId })` is the per-call validity\n check: service principal, bound to exactly that tenant, not retired, user and\n home membership active. A membership added elsewhere never makes it valid\n there.\n- `getServicePrincipal`, `findServicePrincipal({ tenantId, key })`,\n `listServicePrincipals({ tenantId, includeRetired? })` read records.\n\nConcurrent creation is serialized per tenant on PostgreSQL (`FOR UPDATE` on\nthe tenant row) and arbitrated by the unique index everywhere.\n"
|
|
8477
|
+
},
|
|
8371
8478
|
{
|
|
8372
8479
|
"path": "agents/retention.md",
|
|
8373
8480
|
"module": "retention",
|
|
@@ -5,10 +5,10 @@ description: "Multi-tenant user management for the SMRT framework - users, tenan
|
|
|
5
5
|
status: "stable"
|
|
6
6
|
generated:
|
|
7
7
|
by: "smrt/scripts/generate-knowledge-okf.ts"
|
|
8
|
-
at: "2026-11-
|
|
8
|
+
at: "2026-11-19T18:36:02Z"
|
|
9
9
|
audience: "internal"
|
|
10
10
|
evidence_level: "source-inspected"
|
|
11
|
-
source_revision: "sha256:
|
|
11
|
+
source_revision: "sha256:3f79fe2561160036e71872b5450f3ee8663848f0faed84f17aa1fc3ec690be4d"
|
|
12
12
|
sources:
|
|
13
13
|
- id: "manifest"
|
|
14
14
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/users/package.json"
|
|
@@ -35,6 +35,9 @@ sources:
|
|
|
35
35
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/users/agents/retention.md"
|
|
36
36
|
title: "@happyvertical/smrt-users packages/users/agents/retention.md"
|
|
37
37
|
- id: "agents-8"
|
|
38
|
+
resource: "https://github.com/happyvertical/smrt/blob/main/packages/users/agents/service-principals.md"
|
|
39
|
+
title: "@happyvertical/smrt-users packages/users/agents/service-principals.md"
|
|
40
|
+
- id: "agents-9"
|
|
38
41
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/users/agents/terminal-auth-testing.md"
|
|
39
42
|
title: "@happyvertical/smrt-users packages/users/agents/terminal-auth-testing.md"
|
|
40
43
|
---
|
|
@@ -57,6 +60,7 @@ sources:
|
|
|
57
60
|
- `packages/users/agents/oidc-provisioning.md`
|
|
58
61
|
- `packages/users/agents/permissions.md`
|
|
59
62
|
- `packages/users/agents/retention.md`
|
|
63
|
+
- `packages/users/agents/service-principals.md`
|
|
60
64
|
- `packages/users/agents/terminal-auth-testing.md`
|
|
61
65
|
|
|
62
66
|
## Framework dependencies
|
package/dist/sveltekit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as LoginRateLimitError, d as PasswordCredentialForbiddenError, f as PasswordCredentialService, g as SessionService, p as PasswordPolicyError, u as PasswordCredentialError } from "./chunks/PasswordCredentialService-
|
|
2
|
-
import { B as OidcLoginService, C as PasskeyCredentialService, D as OperationPermissionError, F as MobileAuthError, H as encodeOidcTransaction, I as MobileAuthService, J as DeviceCredentialError, L as readMobileBearerToken, P as withSessionPermissionContext, R as validateMobileRedirectUri, S as PasskeyCredentialForbiddenError, T as PasskeyRegistrationError, U as getUsersOidcConfig, V as decodeOidcTransaction, W as resolveOidcProviderConfig, X as DeviceCredentialPolicyError, Y as DeviceCredentialForbiddenError, Z as DeviceCredentialService, a as TerminalAuthError, o as TerminalAuthRateLimitError, s as TerminalAuthService, w as PasskeyReauthenticationRequiredError, x as PasskeyCredentialError, z as OidcLoginError } from "./chunks/TerminalAuthService-
|
|
1
|
+
import { M as LoginRateLimitError, d as PasswordCredentialForbiddenError, f as PasswordCredentialService, g as SessionService, p as PasswordPolicyError, u as PasswordCredentialError } from "./chunks/PasswordCredentialService-DODrdCBc.js";
|
|
2
|
+
import { B as OidcLoginService, C as PasskeyCredentialService, D as OperationPermissionError, F as MobileAuthError, H as encodeOidcTransaction, I as MobileAuthService, J as DeviceCredentialError, L as readMobileBearerToken, P as withSessionPermissionContext, R as validateMobileRedirectUri, S as PasskeyCredentialForbiddenError, T as PasskeyRegistrationError, U as getUsersOidcConfig, V as decodeOidcTransaction, W as resolveOidcProviderConfig, X as DeviceCredentialPolicyError, Y as DeviceCredentialForbiddenError, Z as DeviceCredentialService, a as TerminalAuthError, o as TerminalAuthRateLimitError, s as TerminalAuthService, w as PasskeyReauthenticationRequiredError, x as PasskeyCredentialError, z as OidcLoginError } from "./chunks/TerminalAuthService-BQANhFsS.js";
|
|
3
3
|
import { DiscoveryArtifactValidationError, SMRT_APP_RESULT_CONTRACT, SMRT_APP_RESULT_SCHEMA, SMRT_APP_RESULT_VERSION, SMRT_DISCOVERY_CONFORMANCE_ARTIFACT_SCHEMA, SMRT_DISCOVERY_CONFORMANCE_SCHEMA, SMRT_DISCOVERY_CONFORMANCE_VERSION, SMRT_MCP_RESULT_METADATA_KEY, canonicalizeDiscoveryArtifact, createDiscoveryConformanceArtifact, deriveCommandRequirements, validateDiscoveryConformanceArtifact } from "./app-contract.js";
|
|
4
4
|
import { ObjectRegistry, createClassNamePredicate, resolveCustomActionMetadata, resolveEffectiveActionMetadata } from "@happyvertical/smrt-core";
|
|
5
5
|
import { createLogger } from "@happyvertical/logger";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-users",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.14",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Multi-tenant user management for the SMRT framework - users, tenants, roles, permissions, groups",
|
|
6
6
|
"type": "module",
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@happyvertical/auth": "^0.115.0",
|
|
63
63
|
"@happyvertical/logger": "^0.115.0",
|
|
64
|
-
"@happyvertical/smrt-config": "0.62.
|
|
65
|
-
"@happyvertical/smrt-core": "0.62.
|
|
66
|
-
"@happyvertical/smrt-mobile-contract": "0.62.
|
|
67
|
-
"@happyvertical/smrt-profiles": "0.62.
|
|
68
|
-
"@happyvertical/smrt-tenancy": "0.62.
|
|
69
|
-
"@happyvertical/smrt-types": "0.62.
|
|
70
|
-
"@happyvertical/smrt-ui": "0.62.
|
|
64
|
+
"@happyvertical/smrt-config": "0.62.14",
|
|
65
|
+
"@happyvertical/smrt-core": "0.62.14",
|
|
66
|
+
"@happyvertical/smrt-mobile-contract": "0.62.14",
|
|
67
|
+
"@happyvertical/smrt-profiles": "0.62.14",
|
|
68
|
+
"@happyvertical/smrt-tenancy": "0.62.14",
|
|
69
|
+
"@happyvertical/smrt-types": "0.62.14",
|
|
70
|
+
"@happyvertical/smrt-ui": "0.62.14",
|
|
71
71
|
"@happyvertical/sql": "^0.115.0",
|
|
72
72
|
"@simplewebauthn/browser": "^14.0.0",
|
|
73
73
|
"@simplewebauthn/server": "^14.0.3",
|
|
74
74
|
"jose": "^6.2.12"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@happyvertical/smrt-vitest": "0.62.
|
|
77
|
+
"@happyvertical/smrt-vitest": "0.62.14",
|
|
78
78
|
"@sveltejs/package": "^2.5.8",
|
|
79
79
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
80
80
|
"@types/node": "24.13.6",
|