@idp.global/interfaces 9.2.0 → 9.3.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/changelog.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-10 - 9.3.0
4
+
5
+ ### Features
6
+
7
+ - add SSO domain verification contracts (sso)
8
+ - Define SSO domain verification status, DNS TXT challenge, and globally unique domain claim interfaces.
9
+ - Expose optional domainVerifications on SSO connection DTOs.
10
+ - Add verifySsoDomain typed request contract and sso_domain_verified activity type.
11
+ - Update pnpm workspace package manager and build approval configuration.
12
+
3
13
  ## 2026-07-08 - 9.2.0
4
14
 
5
15
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '9.2.0',
6
+ version: '9.3.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -1,4 +1,4 @@
1
- export type TActivityAction = 'login' | 'logout' | 'session_created' | 'session_revoked' | 'passport_device_enrolled' | 'passport_device_revoked' | 'passport_challenge_approved' | 'passport_challenge_rejected' | 'org_created' | 'org_updated' | 'org_deleted' | 'org_ownership_transferred' | 'org_joined' | 'org_left' | 'role_changed' | 'org_app_role_mappings_updated' | 'profile_updated' | 'totp_enabled' | 'totp_disabled' | 'backup_codes_regenerated' | 'mfa_completed' | 'passkey_registered' | 'passkey_revoked' | 'passkey_login' | 'app_connected' | 'app_disconnected' | 'user_suspended' | 'user_unsuspended' | 'account_deletion_requested' | 'account_deletion_cancelled' | 'account_purged' | 'sso_connection_created' | 'sso_connection_updated' | 'sso_connection_deleted' | 'sso_login' | 'scim_token_created' | 'scim_token_revoked' | 'scim_user_provisioned' | 'scim_user_updated' | 'scim_user_deactivated' | 'scim_group_membership_changed';
1
+ export type TActivityAction = 'login' | 'logout' | 'session_created' | 'session_revoked' | 'passport_device_enrolled' | 'passport_device_revoked' | 'passport_challenge_approved' | 'passport_challenge_rejected' | 'org_created' | 'org_updated' | 'org_deleted' | 'org_ownership_transferred' | 'org_joined' | 'org_left' | 'role_changed' | 'org_app_role_mappings_updated' | 'profile_updated' | 'totp_enabled' | 'totp_disabled' | 'backup_codes_regenerated' | 'mfa_completed' | 'passkey_registered' | 'passkey_revoked' | 'passkey_login' | 'app_connected' | 'app_disconnected' | 'user_suspended' | 'user_unsuspended' | 'account_deletion_requested' | 'account_deletion_cancelled' | 'account_purged' | 'sso_connection_created' | 'sso_connection_updated' | 'sso_connection_deleted' | 'sso_domain_verified' | 'sso_login' | 'scim_token_created' | 'scim_token_revoked' | 'scim_user_provisioned' | 'scim_user_updated' | 'scim_user_deactivated' | 'scim_group_membership_changed';
2
2
  export interface IActivityLog {
3
3
  id: string;
4
4
  data: {
@@ -5,6 +5,20 @@
5
5
  * - jit-and-scim: both paths are allowed
6
6
  */
7
7
  export type TSsoProvisioningMode = 'jit' | 'scim-only' | 'jit-and-scim';
8
+ export type TSsoDomainVerificationStatus = 'pending' | 'verified';
9
+ /**
10
+ * DNS TXT ownership proof for one email domain claimed by an SSO connection.
11
+ * The TXT challenge is public material and may be shown to organization admins.
12
+ */
13
+ export interface ISsoDomainVerification {
14
+ domain: string;
15
+ status: TSsoDomainVerificationStatus;
16
+ dnsTxtName: string;
17
+ dnsTxtValue: string;
18
+ createdAt: number;
19
+ lastCheckedAt?: number;
20
+ verifiedAt?: number;
21
+ }
8
22
  /**
9
23
  * Maps an IdP-side group name to org roles on idp.global.
10
24
  * Used both for SAML group attributes and SCIM group memberships.
@@ -37,8 +51,8 @@ export interface ISsoConnection {
37
51
  displayName: string;
38
52
  status: 'active' | 'disabled';
39
53
  /**
40
- * Email domains routed to this connection during home-realm discovery.
41
- * Globally unique across all connections.
54
+ * Email domains claimed by this connection. Claims are globally unique,
55
+ * but only verified claims may enable home-realm discovery or SAML login.
42
56
  */
43
57
  emailDomains: string[];
44
58
  idp: {
@@ -65,6 +79,17 @@ export interface ISsoConnection {
65
79
  updatedAt: number;
66
80
  };
67
81
  }
82
+ /**
83
+ * Authoritative globally unique email-domain claim. This is persisted
84
+ * separately from the SSO connection so concurrent claims cannot race.
85
+ */
86
+ export interface ISsoDomainClaim {
87
+ id: string;
88
+ data: ISsoDomainVerification & {
89
+ organizationId: string;
90
+ connectionId: string;
91
+ };
92
+ }
68
93
  /**
69
94
  * Internal persisted SCIM bearer token record. Never return this shape to
70
95
  * clients; the plaintext token is shown exactly once at creation.
@@ -1,4 +1,4 @@
1
- import type { TSsoProvisioningMode, IGroupRoleMapping, ISsoAttributeMapping } from '../data/ssoconnection.js';
1
+ import type { TSsoProvisioningMode, IGroupRoleMapping, ISsoAttributeMapping, ISsoDomainVerification } from '../data/ssoconnection.js';
2
2
  /**
3
3
  * Client-facing SSO connection shape. IdP signing certificates are public
4
4
  * material and stay included; the raw metadata XML is omitted.
@@ -11,6 +11,8 @@ export interface ISsoConnectionDto {
11
11
  displayName: string;
12
12
  status: 'active' | 'disabled';
13
13
  emailDomains: string[];
14
+ /** Present on servers that enforce DNS ownership verification. */
15
+ domainVerifications?: ISsoDomainVerification[];
14
16
  idp: {
15
17
  entityId: string;
16
18
  ssoUrl: string;
@@ -100,6 +100,22 @@ export interface IReq_GetSsoSpDetails extends plugins.typedRequestInterfaces.imp
100
100
  spDetails: dto.ISsoSpDetailsDto;
101
101
  };
102
102
  }
103
+ /**
104
+ * Check the DNS TXT ownership challenge for an SSO email domain (org admin only).
105
+ * The domain must already be claimed by the specified connection.
106
+ */
107
+ export interface IReq_VerifySsoDomain extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_VerifySsoDomain> {
108
+ method: 'verifySsoDomain';
109
+ request: {
110
+ jwt: string;
111
+ connectionId: string;
112
+ domain: string;
113
+ };
114
+ response: {
115
+ verified: boolean;
116
+ connection: dto.ISsoConnectionDto;
117
+ };
118
+ }
103
119
  /**
104
120
  * Create a SCIM bearer token for an organization (org admin only).
105
121
  * The plaintext token is returned exactly once.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
@@ -16,7 +16,7 @@
16
16
  "devDependencies": {
17
17
  "@git.zone/tsbuild": "^4.4.2",
18
18
  "@git.zone/tsdoc": "^2.1.1",
19
- "@git.zone/tsrun": "^2.0.4",
19
+ "@git.zone/tsrun": "^2.0.5",
20
20
  "@git.zone/tstest": "^3.6.6",
21
21
  "@types/node": "^26.0.0"
22
22
  },
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '9.2.0',
6
+ version: '9.3.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -33,6 +33,7 @@ export type TActivityAction =
33
33
  | 'sso_connection_created'
34
34
  | 'sso_connection_updated'
35
35
  | 'sso_connection_deleted'
36
+ | 'sso_domain_verified'
36
37
  | 'sso_login'
37
38
  | 'scim_token_created'
38
39
  | 'scim_token_revoked'
@@ -6,6 +6,22 @@
6
6
  */
7
7
  export type TSsoProvisioningMode = 'jit' | 'scim-only' | 'jit-and-scim';
8
8
 
9
+ export type TSsoDomainVerificationStatus = 'pending' | 'verified';
10
+
11
+ /**
12
+ * DNS TXT ownership proof for one email domain claimed by an SSO connection.
13
+ * The TXT challenge is public material and may be shown to organization admins.
14
+ */
15
+ export interface ISsoDomainVerification {
16
+ domain: string;
17
+ status: TSsoDomainVerificationStatus;
18
+ dnsTxtName: string;
19
+ dnsTxtValue: string;
20
+ createdAt: number;
21
+ lastCheckedAt?: number;
22
+ verifiedAt?: number;
23
+ }
24
+
9
25
  /**
10
26
  * Maps an IdP-side group name to org roles on idp.global.
11
27
  * Used both for SAML group attributes and SCIM group memberships.
@@ -40,8 +56,8 @@ export interface ISsoConnection {
40
56
  displayName: string;
41
57
  status: 'active' | 'disabled';
42
58
  /**
43
- * Email domains routed to this connection during home-realm discovery.
44
- * Globally unique across all connections.
59
+ * Email domains claimed by this connection. Claims are globally unique,
60
+ * but only verified claims may enable home-realm discovery or SAML login.
45
61
  */
46
62
  emailDomains: string[];
47
63
  idp: {
@@ -69,6 +85,18 @@ export interface ISsoConnection {
69
85
  };
70
86
  }
71
87
 
88
+ /**
89
+ * Authoritative globally unique email-domain claim. This is persisted
90
+ * separately from the SSO connection so concurrent claims cannot race.
91
+ */
92
+ export interface ISsoDomainClaim {
93
+ id: string;
94
+ data: ISsoDomainVerification & {
95
+ organizationId: string;
96
+ connectionId: string;
97
+ };
98
+ }
99
+
72
100
  /**
73
101
  * Internal persisted SCIM bearer token record. Never return this shape to
74
102
  * clients; the plaintext token is shown exactly once at creation.
@@ -1,4 +1,9 @@
1
- import type { TSsoProvisioningMode, IGroupRoleMapping, ISsoAttributeMapping } from '../data/ssoconnection.js';
1
+ import type {
2
+ TSsoProvisioningMode,
3
+ IGroupRoleMapping,
4
+ ISsoAttributeMapping,
5
+ ISsoDomainVerification,
6
+ } from '../data/ssoconnection.js';
2
7
 
3
8
  /**
4
9
  * Client-facing SSO connection shape. IdP signing certificates are public
@@ -12,6 +17,8 @@ export interface ISsoConnectionDto {
12
17
  displayName: string;
13
18
  status: 'active' | 'disabled';
14
19
  emailDomains: string[];
20
+ /** Present on servers that enforce DNS ownership verification. */
21
+ domainVerifications?: ISsoDomainVerification[];
15
22
  idp: {
16
23
  entityId: string;
17
24
  ssoUrl: string;
@@ -126,6 +126,27 @@ export interface IReq_GetSsoSpDetails
126
126
  };
127
127
  }
128
128
 
129
+ /**
130
+ * Check the DNS TXT ownership challenge for an SSO email domain (org admin only).
131
+ * The domain must already be claimed by the specified connection.
132
+ */
133
+ export interface IReq_VerifySsoDomain
134
+ extends plugins.typedRequestInterfaces.implementsTR<
135
+ plugins.typedRequestInterfaces.ITypedRequest,
136
+ IReq_VerifySsoDomain
137
+ > {
138
+ method: 'verifySsoDomain';
139
+ request: {
140
+ jwt: string;
141
+ connectionId: string;
142
+ domain: string;
143
+ };
144
+ response: {
145
+ verified: boolean;
146
+ connection: dto.ISsoConnectionDto;
147
+ };
148
+ }
149
+
129
150
  /**
130
151
  * Create a SCIM bearer token for an organization (org admin only).
131
152
  * The plaintext token is returned exactly once.