@idp.global/interfaces 30.1.0 → 30.2.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,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-11-12 - 30.2.0
4
+
5
+ ### Features
6
+
7
+ - app connections in the OIDC flow (data, request, dto)
8
+ - `IOidcAppConnectionAuthorizationRequest` is the `authorization_details` entry of type `app_connection` that a
9
+ global app allowed to request app connections sends; `IOidcAppConnectionAuthorizationResult` is
10
+ `ITokenResponse.authorization_details` on the authorization-code grant; `IOidcAppConnectionView` is the
11
+ `IReq_PrepareOidcAuthorizationV2` response `appConnection`; `IReq_InspectOidcAuthorizationV2` responds
12
+ `appConnection: { requiresPasskey: true }`.
13
+ - `IAuthorizationRequest.authorization_details` is the RFC 9396 query parameter, a JSON-encoded array of
14
+ `IOidcAppConnectionAuthorizationRequest`; the server rejects a malformed value or an unknown `type` with
15
+ `invalid_authorization_details`. `IOidcDiscoveryDocument.authorization_details_types_supported` lists the
16
+ supported types (idp.global advertises `['app_connection']` from app 16.4.0).
17
+ - `IReq_SetGlobalAppConnectionRequests` (`setGlobalAppConnectionRequests`, classified global-admin) allows or stops a
18
+ global app's app-connection requests and returns the resulting state; `IReq_GetGlobalAppStats` entries carry an
19
+ optional `mayRequestAppConnections`. `IGlobalAppDto` is unchanged.
20
+ - The activity vocabulary gains `oidc_client_app_connection_requests_enabled` and
21
+ `oidc_client_app_connection_requests_disabled` (target `oidc_client`, facts `clientType`).
22
+
23
+ ### Maintenance
24
+
25
+ - release tooling currency (tooling)
26
+ - Replaces the deprecated `@git.zone/tsbuild`, `@git.zone/tstest`, `@git.zone/tsdoc` and `@git.zone/tsrun` with
27
+ `@git.zone/tsrepo` `^2.1.0`. The scripts run `tsrepo build`, `tsrepo test` and `tsrepo docs`, and the tests import
28
+ `@git.zone/tsrepo/tapbundle`. The build now compiles with the TypeScript 7 native compiler; the published file list is
29
+ unchanged.
30
+ - `packageManager` pnpm@12.18.0 and `@types/node` 26.6.6.
31
+
3
32
  ## 2026-10-30 - 30.1.0
4
33
 
5
34
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '30.1.0',
6
+ version: '30.2.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -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' | 'global_admin_granted' | 'global_admin_removed' | 'global_capabilities_changed' | 'break_glass_requested' | 'break_glass_activated' | 'break_glass_used' | 'break_glass_reviewed' | 'administrator_recovery_requested' | 'administrator_recovery_activated' | 'administrator_recovery_completed' | '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' | 'oidc_authorization_granted' | 'oidc_code_exchanged' | 'oidc_refresh_rotated' | 'oidc_refresh_reuse_detected' | 'oidc_token_revoked' | 'oidc_logout' | 'oidc_client_created' | 'oidc_client_updated' | 'oidc_client_activation_changed' | 'oidc_client_deleted' | 'oidc_client_secret_rotated' | 'oidc_signing_key_rotated' | 'oidc_lifecycle_revoked' | 'org_suspended' | 'org_unsuspended';
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' | 'global_admin_granted' | 'global_admin_removed' | 'global_capabilities_changed' | 'break_glass_requested' | 'break_glass_activated' | 'break_glass_used' | 'break_glass_reviewed' | 'administrator_recovery_requested' | 'administrator_recovery_activated' | 'administrator_recovery_completed' | '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' | 'oidc_authorization_granted' | 'oidc_code_exchanged' | 'oidc_refresh_rotated' | 'oidc_refresh_reuse_detected' | 'oidc_token_revoked' | 'oidc_logout' | 'oidc_client_created' | 'oidc_client_updated' | 'oidc_client_activation_changed' | 'oidc_client_deleted' | 'oidc_client_secret_rotated' | 'oidc_client_app_connection_requests_enabled' | 'oidc_client_app_connection_requests_disabled' | 'oidc_signing_key_rotated' | 'oidc_lifecycle_revoked' | 'org_suspended' | 'org_unsuspended';
2
2
  export type TActivityOutcome = 'attempted' | 'succeeded' | 'denied' | 'failed';
3
3
  /**
4
4
  * Public failure reasons are deliberately finite and non-descriptive. They
@@ -1,4 +1,4 @@
1
- export declare const globalCapabilities: readonly ["global.oidc-client.read", "global.oidc-client.manage", "global.organization.read", "global.organization.manage", "global.alert.read", "global.alert.manage", "global.user.read", "global.user.manage", "global.user.delete", "global.admin.manage", "global.signing-key.rotate", "global.break-glass.request", "global.break-glass.approve"];
1
+ export declare const globalCapabilities: readonly ['global.oidc-client.read', 'global.oidc-client.manage', 'global.organization.read', 'global.organization.manage', 'global.alert.read', 'global.alert.manage', 'global.user.read', 'global.user.manage', 'global.user.delete', 'global.admin.manage', 'global.signing-key.rotate', 'global.break-glass.request', 'global.break-glass.approve'];
2
2
  export type TGlobalCapability = (typeof globalCapabilities)[number];
3
3
  export declare const delegableGlobalCapabilities: readonly ["global.oidc-client.read", "global.oidc-client.manage", "global.organization.read", "global.organization.manage", "global.alert.read", "global.alert.manage", "global.user.read", "global.user.manage", "global.break-glass.request"];
4
4
  export type TDelegableGlobalCapability = (typeof delegableGlobalCapabilities)[number];
@@ -9,7 +9,7 @@ export type TDelegableGlobalCapability = (typeof delegableGlobalCapabilities)[nu
9
9
  */
10
10
  export declare const breakGlassEligibleGlobalCapabilities: readonly ["global.oidc-client.manage", "global.organization.manage", "global.alert.manage", "global.user.manage"];
11
11
  export type TBreakGlassEligibleGlobalCapability = (typeof breakGlassEligibleGlobalCapabilities)[number];
12
- export declare const tenantCapabilities: readonly ["tenant.organization.read", "tenant.organization.manage", "tenant.organization.delete", "tenant.organization.export", "tenant.role.read", "tenant.role.manage", "tenant.membership.read", "tenant.membership.manage", "tenant.ownership.transfer", "tenant.app-connection.read", "tenant.app-connection.manage", "tenant.sso.read", "tenant.sso.manage", "tenant.scim-token.read", "tenant.scim-token.manage", "tenant.billing.read", "tenant.billing.manage", "tenant.alert.read", "tenant.alert.manage"];
12
+ export declare const tenantCapabilities: readonly ['tenant.organization.read', 'tenant.organization.manage', 'tenant.organization.delete', 'tenant.organization.export', 'tenant.role.read', 'tenant.role.manage', 'tenant.membership.read', 'tenant.membership.manage', 'tenant.ownership.transfer', 'tenant.app-connection.read', 'tenant.app-connection.manage', 'tenant.sso.read', 'tenant.sso.manage', 'tenant.scim-token.read', 'tenant.scim-token.manage', 'tenant.billing.read', 'tenant.billing.manage', 'tenant.alert.read', 'tenant.alert.manage'];
13
13
  export type TTenantCapability = (typeof tenantCapabilities)[number];
14
14
  export declare const delegableTenantCapabilities: readonly ["tenant.organization.read", "tenant.organization.manage", "tenant.organization.export", "tenant.role.read", "tenant.role.manage", "tenant.membership.read", "tenant.membership.manage", "tenant.app-connection.read", "tenant.app-connection.manage", "tenant.sso.read", "tenant.sso.manage", "tenant.scim-token.read", "tenant.scim-token.manage", "tenant.billing.read", "tenant.billing.manage", "tenant.alert.read", "tenant.alert.manage"];
15
15
  export type TDelegableTenantCapability = (typeof delegableTenantCapabilities)[number];
@@ -18,6 +18,12 @@ export interface IOidcDiscoveryDocument {
18
18
  /** Optional RFC 7662 support; older providers may omit introspection. */
19
19
  introspection_endpoint?: string;
20
20
  introspection_endpoint_auth_methods_supported?: string[];
21
+ /**
22
+ * The RFC 9396 authorization-details types the server supports, server-wide. idp.global
23
+ * advertises `['app_connection']` from app 16.4.0; whether a given client may send one is gated
24
+ * by that client's stored capability.
25
+ */
26
+ authorization_details_types_supported?: string[];
21
27
  end_session_endpoint: string;
22
28
  scopes_supported: TOidcScope[];
23
29
  response_types_supported: string[];
@@ -115,6 +121,47 @@ export interface ITokenResponse {
115
121
  refresh_token?: string;
116
122
  id_token?: string;
117
123
  scope: string;
124
+ /** What the authorization did besides signing in (RFC 9396), on the authorization-code grant only. */
125
+ authorization_details?: IOidcAppConnectionAuthorizationResult[];
126
+ }
127
+ /**
128
+ * An app connection as an OIDC authorization detail (`authorization_details`, RFC 9396 style):
129
+ * a global app whose stored capability allows it to request app connections (a global
130
+ * administrator sets it with `setGlobalAppConnectionRequests`) asks, in its V2 authorization
131
+ * request, that the signed-in member connect an app to one of their organizations, or disconnect
132
+ * it. The member signs in with a passkey and consents; the connection takes effect when the
133
+ * client redeems the code, and the token response reports it. The connection is made before the
134
+ * tokens are issued, so after any redemption error a client re-reads the connection state instead
135
+ * of assuming that nothing changed.
136
+ */
137
+ export interface IOidcAppConnectionAuthorizationRequest {
138
+ type: 'app_connection';
139
+ action: 'connect' | 'disconnect';
140
+ organization_id: string;
141
+ /** The `https:` origin of the app's registered `appUrl`; it must name exactly one active global app. */
142
+ app_origin: string;
143
+ /** The user the client expects to sign in. */
144
+ subject: string;
145
+ }
146
+ /** The token endpoint's report of an app connection. */
147
+ export interface IOidcAppConnectionAuthorizationResult {
148
+ type: 'app_connection';
149
+ action: 'connect' | 'disconnect';
150
+ organization_id: string;
151
+ app_id: string;
152
+ status: 'active' | 'disconnected';
153
+ }
154
+ /** What the login prompt shows the member about an app connection before they allow it. */
155
+ export interface IOidcAppConnectionView {
156
+ action: 'connect' | 'disconnect';
157
+ organizationName: string;
158
+ appName: string;
159
+ appUrl: string;
160
+ appLogoUrl: string;
161
+ /** The scopes the connection grants: the app's reviewed scopes. */
162
+ scopes: string[];
163
+ /** The sign-in used a passkey recently enough to change the organization's apps. */
164
+ passkeyFresh: boolean;
118
165
  }
119
166
  /**
120
167
  * Token endpoint error response
@@ -137,6 +184,12 @@ export interface IAuthorizationRequest {
137
184
  code_challenge_method: 'S256';
138
185
  nonce?: string;
139
186
  prompt?: 'none' | 'login' | 'consent';
187
+ /**
188
+ * The RFC 9396 `authorization_details` query parameter: a JSON-encoded array of
189
+ * `IOidcAppConnectionAuthorizationRequest`. The server rejects a malformed value or an unknown
190
+ * `type` with `invalid_authorization_details` (RFC 9396 section 5) and never ignores it.
191
+ */
192
+ authorization_details?: string;
140
193
  }
141
194
  /**
142
195
  * Token request for authorization_code grant
@@ -2,13 +2,13 @@ import type { TDelegableGlobalCapability } from '../data/authorization.js';
2
2
  export declare const devIdpManifestSchemaVersion: 3;
3
3
  export declare const devIdpResultSchemaVersion: 1;
4
4
  export declare const devIdpInternalPort: 2999;
5
- export declare const devIdpDerivedSubjectSentinel: "derived";
6
- export declare const devIdpPersonaAuthorityProfile: "platform-personas-v1";
5
+ export declare const devIdpDerivedSubjectSentinel: 'derived';
6
+ export declare const devIdpPersonaAuthorityProfile: 'platform-personas-v1';
7
7
  export declare const devIdpPersonaNames: readonly ["testuser", "testmoderator", "testsuperadmin"];
8
8
  export declare const devIdpHostnames: readonly ["idp.localhost", "login.idp.localhost", "app.idp.localhost", "superadmin.idp.localhost"];
9
9
  export declare const devIdpDegradedDependencies: Readonly<{
10
- readonly audit: "ephemeral-memory";
11
- readonly platform: "test-authorization";
10
+ readonly audit: 'ephemeral-memory';
11
+ readonly platform: 'test-authorization';
12
12
  }>;
13
13
  export type TDevIdpPersonaName = typeof devIdpPersonaNames[number];
14
14
  export declare const devIdpModeratorCapabilities: readonly ["global.alert.manage", "global.alert.read", "global.user.manage", "global.user.read"];
@@ -59,6 +59,10 @@ export type TActivityEventDto = TActivityEventFor<'login', 'account', {
59
59
  clientType: TOAuthClientType;
60
60
  }> | TActivityEventFor<'oidc_client_secret_rotated', 'oidc_client', {
61
61
  clientType: 'confidential';
62
+ }> | TActivityEventFor<'oidc_client_app_connection_requests_enabled', 'oidc_client', {
63
+ clientType: TOAuthClientType;
64
+ }> | TActivityEventFor<'oidc_client_app_connection_requests_disabled', 'oidc_client', {
65
+ clientType: TOAuthClientType;
62
66
  }> | TActivityEventFor<'oidc_signing_key_rotated', 'oidc_signing_key', null> | TActivityEventFor<'oidc_lifecycle_revoked', 'oidc_lifecycle', {
63
67
  revocationScope: TActivityRevocationScope;
64
68
  }> | TActivityEventFor<'org_suspended', 'organization', null> | TActivityEventFor<'org_unsuspended', 'organization', null>;
@@ -74,6 +74,12 @@ export interface IReq_GetGlobalAppStats extends plugins.typedRequestInterfaces.i
74
74
  apps: Array<{
75
75
  app: dto.IGlobalAppDto;
76
76
  connectionCount: number;
77
+ /**
78
+ * The app may request app connections in its OIDC authorizations (see
79
+ * `setGlobalAppConnectionRequests`). Absent from servers that predate the capability; treat
80
+ * absent as `false`.
81
+ */
82
+ mayRequestAppConnections?: boolean;
77
83
  }>;
78
84
  };
79
85
  }
@@ -115,6 +121,26 @@ export interface IReq_UpdateGlobalApp extends plugins.typedRequestInterfaces.imp
115
121
  app: dto.IGlobalAppDto;
116
122
  };
117
123
  }
124
+ /**
125
+ * Allow or stop a global app's requests for app connections in its OIDC
126
+ * authorizations (`IOidcAppConnectionAuthorizationRequest`); admin only, with
127
+ * `global.oidc-client.manage`. Only global apps carry the capability. Allowing
128
+ * requires a fresh passkey step-up; stopping does not. Setting the current
129
+ * state changes nothing, and neither direction revokes the app's tokens.
130
+ * The state appears only in admin responses, never in `IGlobalAppDto`.
131
+ */
132
+ export interface IReq_SetGlobalAppConnectionRequests extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetGlobalAppConnectionRequests> {
133
+ method: 'setGlobalAppConnectionRequests';
134
+ request: {
135
+ jwt: string;
136
+ appId: string;
137
+ mayRequestAppConnections: boolean;
138
+ };
139
+ response: {
140
+ /** The resulting state. */
141
+ mayRequestAppConnections: boolean;
142
+ };
143
+ }
118
144
  /**
119
145
  * Delete a global app (admin only)
120
146
  */
@@ -1,5 +1,5 @@
1
1
  import * as plugins from '../plugins.js';
2
- import { type TOidcScope } from '../data/index.js';
2
+ import { type IOidcAppConnectionView, type TOidcScope } from '../data/index.js';
3
3
  export interface IReq_CompleteOidcAuthorization extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CompleteOidcAuthorization> {
4
4
  method: 'completeOidcAuthorization';
5
5
  request: {
@@ -53,6 +53,10 @@ export interface IReq_InspectOidcAuthorizationV2 extends plugins.typedRequestInt
53
53
  };
54
54
  response: {
55
55
  prompt: 'none' | 'login' | 'consent' | null;
56
+ /** The transaction asks for an app connection: the sign-in must use a passkey. Nothing more before the sign-in. */
57
+ appConnection?: {
58
+ requiresPasskey: true;
59
+ };
56
60
  };
57
61
  }
58
62
  export interface IReq_PrepareOidcAuthorizationV2 extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_PrepareOidcAuthorizationV2> {
@@ -61,7 +65,10 @@ export interface IReq_PrepareOidcAuthorizationV2 extends plugins.typedRequestInt
61
65
  jwt: string;
62
66
  transactionId: string;
63
67
  };
64
- response: IReq_PrepareOidcAuthorization['response'];
68
+ response: IReq_PrepareOidcAuthorization['response'] & {
69
+ /** The app connection the transaction asks for (its status is then always `consent_required`). */
70
+ appConnection?: IOidcAppConnectionView;
71
+ };
65
72
  }
66
73
  export interface IReq_CompleteOidcAuthorizationV2 extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CompleteOidcAuthorizationV2> {
67
74
  method: 'completeOidcAuthorizationV2';
@@ -1,3 +1,3 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import {} from '../data/index.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXphdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvYXV0aG9yaXphdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQW1CLE1BQU0sa0JBQWtCLENBQUMifQ==
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXphdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvYXV0aG9yaXphdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQWdELE1BQU0sa0JBQWtCLENBQUMifQ==
@@ -1,10 +1,10 @@
1
- import type { IReq_AcknowledgeAppSecretDelivery, IReq_ApproveAdministratorRecovery, IReq_ApproveBreakGlassAccess, IReq_ApproveOidcSigningKeyRotation, IReq_CheckGlobalAdmin, IReq_CreateGlobalApp, IReq_DeleteGlobalApp, IReq_GetGlobalAppStats, IReq_GetGlobalOrgStats, IReq_GetGlobalUsers, IReq_RegenerateAppCredentials, IReq_RequestAdministratorRecovery, IReq_RequestBreakGlassAccess, IReq_ReviewBreakGlassAccess, IReq_RotateOidcSigningKey, IReq_SetGlobalAdmin, IReq_SetGlobalCapabilityAssignments, IReq_SetOrganizationSuspension, IReq_SetUserSuspension, IReq_UpdateGlobalApp } from './admin.js';
1
+ import type { IReq_AcknowledgeAppSecretDelivery, IReq_ApproveAdministratorRecovery, IReq_ApproveBreakGlassAccess, IReq_ApproveOidcSigningKeyRotation, IReq_CheckGlobalAdmin, IReq_CreateGlobalApp, IReq_DeleteGlobalApp, IReq_GetGlobalAppStats, IReq_GetGlobalOrgStats, IReq_GetGlobalUsers, IReq_RegenerateAppCredentials, IReq_RequestAdministratorRecovery, IReq_RequestBreakGlassAccess, IReq_ReviewBreakGlassAccess, IReq_RotateOidcSigningKey, IReq_SetGlobalAdmin, IReq_SetGlobalAppConnectionRequests, IReq_SetGlobalCapabilityAssignments, IReq_SetOrganizationSuspension, IReq_SetUserSuspension, IReq_UpdateGlobalApp } from './admin.js';
2
2
  import type { IReq_DeleteSuspendedUser } from './user.js';
3
- export type TGlobalAdminTypedRequest = IReq_AcknowledgeAppSecretDelivery | IReq_ApproveAdministratorRecovery | IReq_ApproveBreakGlassAccess | IReq_ApproveOidcSigningKeyRotation | IReq_CheckGlobalAdmin | IReq_CreateGlobalApp | IReq_DeleteGlobalApp | IReq_DeleteSuspendedUser | IReq_GetGlobalAppStats | IReq_GetGlobalOrgStats | IReq_GetGlobalUsers | IReq_RegenerateAppCredentials | IReq_RequestAdministratorRecovery | IReq_RequestBreakGlassAccess | IReq_ReviewBreakGlassAccess | IReq_RotateOidcSigningKey | IReq_SetGlobalAdmin | IReq_SetGlobalCapabilityAssignments | IReq_SetOrganizationSuspension | IReq_SetUserSuspension | IReq_UpdateGlobalApp;
3
+ export type TGlobalAdminTypedRequest = IReq_AcknowledgeAppSecretDelivery | IReq_ApproveAdministratorRecovery | IReq_ApproveBreakGlassAccess | IReq_ApproveOidcSigningKeyRotation | IReq_CheckGlobalAdmin | IReq_CreateGlobalApp | IReq_DeleteGlobalApp | IReq_DeleteSuspendedUser | IReq_GetGlobalAppStats | IReq_GetGlobalOrgStats | IReq_GetGlobalUsers | IReq_RegenerateAppCredentials | IReq_RequestAdministratorRecovery | IReq_RequestBreakGlassAccess | IReq_ReviewBreakGlassAccess | IReq_RotateOidcSigningKey | IReq_SetGlobalAdmin | IReq_SetGlobalAppConnectionRequests | IReq_SetGlobalCapabilityAssignments | IReq_SetOrganizationSuspension | IReq_SetUserSuspension | IReq_UpdateGlobalApp;
4
4
  export type TGlobalAdminTypedRequestMethod = TGlobalAdminTypedRequest['method'];
5
5
  /**
6
6
  * Canonical transport-boundary classification for platform-wide
7
7
  * administration. Consumers use this inventory to keep privileged request
8
8
  * methods off public transports.
9
9
  */
10
- export declare const globalAdminTypedRequestMethods: readonly ["checkGlobalAdmin", "getGlobalAppStats", "createGlobalApp", "updateGlobalApp", "deleteGlobalApp", "regenerateAppCredentials", "acknowledgeAppSecretDelivery", "rotateOidcSigningKey", "approveOidcSigningKeyRotation", "setOrganizationSuspension", "getGlobalUsers", "setUserSuspension", "setGlobalAdmin", "setGlobalCapabilityAssignments", "requestBreakGlassAccess", "approveBreakGlassAccess", "reviewBreakGlassAccess", "requestAdministratorRecovery", "approveAdministratorRecovery", "getGlobalOrgStats", "deleteSuspendedUser"];
10
+ export declare const globalAdminTypedRequestMethods: readonly ["checkGlobalAdmin", "getGlobalAppStats", "createGlobalApp", "updateGlobalApp", "setGlobalAppConnectionRequests", "deleteGlobalApp", "regenerateAppCredentials", "acknowledgeAppSecretDelivery", "rotateOidcSigningKey", "approveOidcSigningKeyRotation", "setOrganizationSuspension", "getGlobalUsers", "setUserSuspension", "setGlobalAdmin", "setGlobalCapabilityAssignments", "requestBreakGlassAccess", "approveBreakGlassAccess", "reviewBreakGlassAccess", "requestAdministratorRecovery", "approveAdministratorRecovery", "getGlobalOrgStats", "deleteSuspendedUser"];
@@ -8,6 +8,7 @@ export const globalAdminTypedRequestMethods = [
8
8
  'getGlobalAppStats',
9
9
  'createGlobalApp',
10
10
  'updateGlobalApp',
11
+ 'setGlobalAppConnectionRequests',
11
12
  'deleteGlobalApp',
12
13
  'regenerateAppCredentials',
13
14
  'acknowledgeAppSecretDelivery',
@@ -26,4 +27,4 @@ export const globalAdminTypedRequestMethods = [
26
27
  'getGlobalOrgStats',
27
28
  'deleteSuspendedUser',
28
29
  ];
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsYWRtaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L2dsb2JhbGFkbWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlEQTs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQUc7SUFDNUMsa0JBQWtCO0lBQ2xCLG1CQUFtQjtJQUNuQixpQkFBaUI7SUFDakIsaUJBQWlCO0lBQ2pCLGlCQUFpQjtJQUNqQiwwQkFBMEI7SUFDMUIsOEJBQThCO0lBQzlCLHNCQUFzQjtJQUN0QiwrQkFBK0I7SUFDL0IsMkJBQTJCO0lBQzNCLGdCQUFnQjtJQUNoQixtQkFBbUI7SUFDbkIsZ0JBQWdCO0lBQ2hCLGdDQUFnQztJQUNoQyx5QkFBeUI7SUFDekIseUJBQXlCO0lBQ3pCLHdCQUF3QjtJQUN4Qiw4QkFBOEI7SUFDOUIsOEJBQThCO0lBQzlCLG1CQUFtQjtJQUNuQixxQkFBcUI7Q0FDdUMsQ0FBQyJ9
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsYWRtaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L2dsb2JhbGFkbWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1EQTs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQUc7SUFDNUMsa0JBQWtCO0lBQ2xCLG1CQUFtQjtJQUNuQixpQkFBaUI7SUFDakIsaUJBQWlCO0lBQ2pCLGdDQUFnQztJQUNoQyxpQkFBaUI7SUFDakIsMEJBQTBCO0lBQzFCLDhCQUE4QjtJQUM5QixzQkFBc0I7SUFDdEIsK0JBQStCO0lBQy9CLDJCQUEyQjtJQUMzQixnQkFBZ0I7SUFDaEIsbUJBQW1CO0lBQ25CLGdCQUFnQjtJQUNoQixnQ0FBZ0M7SUFDaEMseUJBQXlCO0lBQ3pCLHlCQUF5QjtJQUN6Qix3QkFBd0I7SUFDeEIsOEJBQThCO0lBQzlCLDhCQUE4QjtJQUM5QixtQkFBbUI7SUFDbkIscUJBQXFCO0NBQ3VDLENBQUMifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "30.1.0",
3
+ "version": "30.2.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
@@ -23,12 +23,9 @@
23
23
  }
24
24
  },
25
25
  "devDependencies": {
26
- "@git.zone/tsbuild": "^5.1.2",
27
- "@git.zone/tsdoc": "^3.0.2",
28
- "@git.zone/tsrun": "^3.0.2",
29
- "@git.zone/tstest": "^7.2.0",
26
+ "@git.zone/tsrepo": "^2.1.0",
30
27
  "@push.rocks/smartmail": "^3.0.0",
31
- "@types/node": "26.6.3"
28
+ "@types/node": "26.6.6"
32
29
  },
33
30
  "files": [
34
31
  "ts/**/*",
@@ -60,8 +57,8 @@
60
57
  "last 1 chrome versions"
61
58
  ],
62
59
  "scripts": {
63
- "test": "tstest test/ --verbose --logfile --timeout 60",
64
- "build": "tsbuild tsfolders --allowimplicitany",
65
- "buildDocs": "tsdoc"
60
+ "test": "tsrepo test test/ --verbose --logfile --timeout 60",
61
+ "build": "tsrepo build tsfolders --allowimplicitany",
62
+ "buildDocs": "tsrepo docs"
66
63
  }
67
64
  }
package/readme.md CHANGED
@@ -118,6 +118,20 @@ a caller-stable operation id. Customer-defined organization roles carry a
118
118
  sorted `capabilities` list; tenant deletion and ownership transfer remain
119
119
  reserved to the built-in owner role.
120
120
 
121
+ A global app may ask, in its OIDC authorization, that the signed-in member
122
+ connect an app to one of their organizations or disconnect it: an
123
+ `authorization_details` entry `data.IOidcAppConnectionAuthorizationRequest`,
124
+ reported on the token response as `data.IOidcAppConnectionAuthorizationResult`.
125
+ The entries travel JSON-encoded in the `authorization_details` query parameter
126
+ (`data.IAuthorizationRequest.authorization_details`); a malformed value or an
127
+ unknown `type` fails with `invalid_authorization_details`. The discovery
128
+ document lists the supported types in `authorization_details_types_supported`.
129
+ Only a global app whose stored capability allows it may ask. A global
130
+ administrator sets that capability with `setGlobalAppConnectionRequests` and
131
+ reads it in `getGlobalAppStats`; it never appears in `IGlobalAppDto`. Changes
132
+ are recorded as the `oidc_client_app_connection_requests_enabled` and
133
+ `oidc_client_app_connection_requests_disabled` activity actions.
134
+
121
135
  The target hash is derived server-side from the canonical, authorized
122
136
  `ITransferTarget.appUrl`; the raw target URL is never persisted in session
123
137
  data. Opaque tokens and the transfer target remain limited to the request and
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '30.1.0',
6
+ version: '30.2.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -62,6 +62,8 @@ export type TActivityAction =
62
62
  | 'oidc_client_activation_changed'
63
63
  | 'oidc_client_deleted'
64
64
  | 'oidc_client_secret_rotated'
65
+ | 'oidc_client_app_connection_requests_enabled'
66
+ | 'oidc_client_app_connection_requests_disabled'
65
67
  | 'oidc_signing_key_rotated'
66
68
  | 'oidc_lifecycle_revoked'
67
69
  | 'org_suspended'
package/ts/data/oidc.ts CHANGED
@@ -20,6 +20,12 @@ export interface IOidcDiscoveryDocument {
20
20
  /** Optional RFC 7662 support; older providers may omit introspection. */
21
21
  introspection_endpoint?: string;
22
22
  introspection_endpoint_auth_methods_supported?: string[];
23
+ /**
24
+ * The RFC 9396 authorization-details types the server supports, server-wide. idp.global
25
+ * advertises `['app_connection']` from app 16.4.0; whether a given client may send one is gated
26
+ * by that client's stored capability.
27
+ */
28
+ authorization_details_types_supported?: string[];
23
29
  end_session_endpoint: string;
24
30
  scopes_supported: TOidcScope[];
25
31
  response_types_supported: string[];
@@ -139,6 +145,50 @@ export interface ITokenResponse {
139
145
  refresh_token?: string;
140
146
  id_token?: string;
141
147
  scope: string;
148
+ /** What the authorization did besides signing in (RFC 9396), on the authorization-code grant only. */
149
+ authorization_details?: IOidcAppConnectionAuthorizationResult[];
150
+ }
151
+
152
+ /**
153
+ * An app connection as an OIDC authorization detail (`authorization_details`, RFC 9396 style):
154
+ * a global app whose stored capability allows it to request app connections (a global
155
+ * administrator sets it with `setGlobalAppConnectionRequests`) asks, in its V2 authorization
156
+ * request, that the signed-in member connect an app to one of their organizations, or disconnect
157
+ * it. The member signs in with a passkey and consents; the connection takes effect when the
158
+ * client redeems the code, and the token response reports it. The connection is made before the
159
+ * tokens are issued, so after any redemption error a client re-reads the connection state instead
160
+ * of assuming that nothing changed.
161
+ */
162
+ export interface IOidcAppConnectionAuthorizationRequest {
163
+ type: 'app_connection';
164
+ action: 'connect' | 'disconnect';
165
+ organization_id: string;
166
+ /** The `https:` origin of the app's registered `appUrl`; it must name exactly one active global app. */
167
+ app_origin: string;
168
+ /** The user the client expects to sign in. */
169
+ subject: string;
170
+ }
171
+
172
+ /** The token endpoint's report of an app connection. */
173
+ export interface IOidcAppConnectionAuthorizationResult {
174
+ type: 'app_connection';
175
+ action: 'connect' | 'disconnect';
176
+ organization_id: string;
177
+ app_id: string;
178
+ status: 'active' | 'disconnected';
179
+ }
180
+
181
+ /** What the login prompt shows the member about an app connection before they allow it. */
182
+ export interface IOidcAppConnectionView {
183
+ action: 'connect' | 'disconnect';
184
+ organizationName: string;
185
+ appName: string;
186
+ appUrl: string;
187
+ appLogoUrl: string;
188
+ /** The scopes the connection grants: the app's reviewed scopes. */
189
+ scopes: string[];
190
+ /** The sign-in used a passkey recently enough to change the organization's apps. */
191
+ passkeyFresh: boolean;
142
192
  }
143
193
 
144
194
  /**
@@ -163,6 +213,12 @@ export interface IAuthorizationRequest {
163
213
  code_challenge_method: 'S256';
164
214
  nonce?: string;
165
215
  prompt?: 'none' | 'login' | 'consent';
216
+ /**
217
+ * The RFC 9396 `authorization_details` query parameter: a JSON-encoded array of
218
+ * `IOidcAppConnectionAuthorizationRequest`. The server rejects a malformed value or an unknown
219
+ * `type` with `invalid_authorization_details` (RFC 9396 section 5) and never ignores it.
220
+ */
221
+ authorization_details?: string;
166
222
  }
167
223
 
168
224
  /**
@@ -154,6 +154,16 @@ export type TActivityEventDto =
154
154
  'oidc_client',
155
155
  { clientType: 'confidential' }
156
156
  >
157
+ | TActivityEventFor<
158
+ 'oidc_client_app_connection_requests_enabled',
159
+ 'oidc_client',
160
+ { clientType: TOAuthClientType }
161
+ >
162
+ | TActivityEventFor<
163
+ 'oidc_client_app_connection_requests_disabled',
164
+ 'oidc_client',
165
+ { clientType: TOAuthClientType }
166
+ >
157
167
  | TActivityEventFor<'oidc_signing_key_rotated', 'oidc_signing_key', null>
158
168
  | TActivityEventFor<
159
169
  'oidc_lifecycle_revoked',
@@ -95,6 +95,12 @@ export interface IReq_GetGlobalAppStats
95
95
  apps: Array<{
96
96
  app: dto.IGlobalAppDto;
97
97
  connectionCount: number;
98
+ /**
99
+ * The app may request app connections in its OIDC authorizations (see
100
+ * `setGlobalAppConnectionRequests`). Absent from servers that predate the capability; treat
101
+ * absent as `false`.
102
+ */
103
+ mayRequestAppConnections?: boolean;
98
104
  }>;
99
105
  };
100
106
  }
@@ -147,6 +153,31 @@ export interface IReq_UpdateGlobalApp
147
153
  };
148
154
  }
149
155
 
156
+ /**
157
+ * Allow or stop a global app's requests for app connections in its OIDC
158
+ * authorizations (`IOidcAppConnectionAuthorizationRequest`); admin only, with
159
+ * `global.oidc-client.manage`. Only global apps carry the capability. Allowing
160
+ * requires a fresh passkey step-up; stopping does not. Setting the current
161
+ * state changes nothing, and neither direction revokes the app's tokens.
162
+ * The state appears only in admin responses, never in `IGlobalAppDto`.
163
+ */
164
+ export interface IReq_SetGlobalAppConnectionRequests
165
+ extends plugins.typedRequestInterfaces.implementsTR<
166
+ plugins.typedRequestInterfaces.ITypedRequest,
167
+ IReq_SetGlobalAppConnectionRequests
168
+ > {
169
+ method: 'setGlobalAppConnectionRequests';
170
+ request: {
171
+ jwt: string;
172
+ appId: string;
173
+ mayRequestAppConnections: boolean;
174
+ };
175
+ response: {
176
+ /** The resulting state. */
177
+ mayRequestAppConnections: boolean;
178
+ };
179
+ }
180
+
150
181
  /**
151
182
  * Delete a global app (admin only)
152
183
  */
@@ -1,5 +1,5 @@
1
1
  import * as plugins from '../plugins.js';
2
- import { type TOidcScope } from '../data/index.js';
2
+ import { type IOidcAppConnectionView, type TOidcScope } from '../data/index.js';
3
3
 
4
4
  export interface IReq_CompleteOidcAuthorization
5
5
  extends plugins.typedRequestInterfaces.implementsTR<
@@ -68,6 +68,8 @@ export interface IReq_InspectOidcAuthorizationV2
68
68
  };
69
69
  response: {
70
70
  prompt: 'none' | 'login' | 'consent' | null;
71
+ /** The transaction asks for an app connection: the sign-in must use a passkey. Nothing more before the sign-in. */
72
+ appConnection?: { requiresPasskey: true };
71
73
  };
72
74
  }
73
75
 
@@ -81,7 +83,10 @@ export interface IReq_PrepareOidcAuthorizationV2
81
83
  jwt: string;
82
84
  transactionId: string;
83
85
  };
84
- response: IReq_PrepareOidcAuthorization['response'];
86
+ response: IReq_PrepareOidcAuthorization['response'] & {
87
+ /** The app connection the transaction asks for (its status is then always `consent_required`). */
88
+ appConnection?: IOidcAppConnectionView;
89
+ };
85
90
  }
86
91
 
87
92
  export interface IReq_CompleteOidcAuthorizationV2
@@ -15,6 +15,7 @@ import type {
15
15
  IReq_ReviewBreakGlassAccess,
16
16
  IReq_RotateOidcSigningKey,
17
17
  IReq_SetGlobalAdmin,
18
+ IReq_SetGlobalAppConnectionRequests,
18
19
  IReq_SetGlobalCapabilityAssignments,
19
20
  IReq_SetOrganizationSuspension,
20
21
  IReq_SetUserSuspension,
@@ -40,6 +41,7 @@ export type TGlobalAdminTypedRequest =
40
41
  | IReq_ReviewBreakGlassAccess
41
42
  | IReq_RotateOidcSigningKey
42
43
  | IReq_SetGlobalAdmin
44
+ | IReq_SetGlobalAppConnectionRequests
43
45
  | IReq_SetGlobalCapabilityAssignments
44
46
  | IReq_SetOrganizationSuspension
45
47
  | IReq_SetUserSuspension
@@ -57,6 +59,7 @@ export const globalAdminTypedRequestMethods = [
57
59
  'getGlobalAppStats',
58
60
  'createGlobalApp',
59
61
  'updateGlobalApp',
62
+ 'setGlobalAppConnectionRequests',
60
63
  'deleteGlobalApp',
61
64
  'regenerateAppCredentials',
62
65
  'acknowledgeAppSecretDelivery',