@idp.global/interfaces 24.0.0 → 25.0.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 +9 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/activity.d.ts +2 -2
- package/dist_ts/data/authorization.d.ts +7 -0
- package/dist_ts/data/authorization.js +12 -1
- package/dist_ts/data/user.d.ts +35 -1
- package/dist_ts/dto/activity.d.ts +1 -1
- package/dist_ts/dto/user.d.ts +30 -1
- package/dist_ts/request/admin.d.ts +53 -0
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/activity.ts +5 -0
- package/ts/data/authorization.ts +15 -0
- package/ts/data/user.ts +48 -1
- package/ts/dto/activity.ts +4 -0
- package/ts/dto/user.ts +39 -1
- package/ts/request/admin.ts +68 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-18 - 25.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- add break-glass access contracts (break-glass)
|
|
8
|
+
- Adds break-glass activity event and target types for request, activation, use, and review flows
|
|
9
|
+
- Adds eligible global capabilities, user data state, public DTO state, and admin request contracts for request, approval, and review
|
|
10
|
+
- Adds required breakGlassAccess to IGlobalUserAdminDto
|
|
11
|
+
|
|
3
12
|
## 2026-07-18 - 24.0.0
|
|
4
13
|
|
|
5
14
|
### Breaking Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@idp.global/interfaces',
|
|
6
|
-
version: '
|
|
6
|
+
version: '25.0.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' | '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' | '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';
|
|
2
2
|
export type TActivityOutcome = 'attempted' | 'succeeded' | 'denied' | 'failed';
|
|
3
3
|
/**
|
|
4
4
|
* Public failure reasons are deliberately finite and non-descriptive. They
|
|
@@ -6,7 +6,7 @@ export type TActivityOutcome = 'attempted' | 'succeeded' | 'denied' | 'failed';
|
|
|
6
6
|
* caller-authored text across the public contract boundary.
|
|
7
7
|
*/
|
|
8
8
|
export type TActivityReasonCode = 'account_inactive' | 'authentication_failed' | 'authorization_denied' | 'conflict' | 'expired' | 'invalid_request' | 'policy_denied' | 'rate_limited' | 'replay_detected' | 'revoked' | 'step_up_required' | 'upstream_unavailable' | 'user_cancelled';
|
|
9
|
-
export type TActivityTargetType = 'account' | 'application_connection' | 'mfa_method' | 'oidc_authorization' | 'oidc_client' | 'oidc_lifecycle' | 'oidc_signing_key' | 'oidc_token' | 'organization' | 'organization_membership' | 'organization_role_mapping' | 'passkey' | 'passport_challenge' | 'passport_device' | 'profile' | 'scim_group_membership' | 'scim_token' | 'scim_user' | 'session' | 'sso_connection' | 'sso_domain';
|
|
9
|
+
export type TActivityTargetType = 'account' | 'application_connection' | 'break_glass_access' | 'mfa_method' | 'oidc_authorization' | 'oidc_client' | 'oidc_lifecycle' | 'oidc_signing_key' | 'oidc_token' | 'organization' | 'organization_membership' | 'organization_role_mapping' | 'passkey' | 'passport_challenge' | 'passport_device' | 'profile' | 'scim_group_membership' | 'scim_token' | 'scim_user' | 'session' | 'sso_connection' | 'sso_domain';
|
|
10
10
|
export type TActivityAuthenticationMethod = 'magic_link' | 'password';
|
|
11
11
|
export type TActivitySessionKind = 'browser' | 'oidc';
|
|
12
12
|
export type TActivityRevocationScope = 'account' | 'all_sessions' | 'application' | 'current_session' | 'organization' | 'token_family';
|
|
@@ -2,6 +2,13 @@ export declare const globalCapabilities: readonly ["global.oidc-client.read", "g
|
|
|
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];
|
|
5
|
+
/**
|
|
6
|
+
* Capabilities that may be activated temporarily through the two-person
|
|
7
|
+
* break-glass protocol. Authority to delete accounts, manage administrators,
|
|
8
|
+
* rotate signing keys, or approve break-glass access is never eligible.
|
|
9
|
+
*/
|
|
10
|
+
export declare const breakGlassEligibleGlobalCapabilities: readonly ["global.oidc-client.manage", "global.organization.manage", "global.alert.manage", "global.user.manage"];
|
|
11
|
+
export type TBreakGlassEligibleGlobalCapability = (typeof breakGlassEligibleGlobalCapabilities)[number];
|
|
5
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"];
|
|
6
13
|
export type TTenantCapability = (typeof tenantCapabilities)[number];
|
|
7
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"];
|
|
@@ -24,6 +24,17 @@ export const delegableGlobalCapabilities = [
|
|
|
24
24
|
'global.user.manage',
|
|
25
25
|
'global.break-glass.request',
|
|
26
26
|
];
|
|
27
|
+
/**
|
|
28
|
+
* Capabilities that may be activated temporarily through the two-person
|
|
29
|
+
* break-glass protocol. Authority to delete accounts, manage administrators,
|
|
30
|
+
* rotate signing keys, or approve break-glass access is never eligible.
|
|
31
|
+
*/
|
|
32
|
+
export const breakGlassEligibleGlobalCapabilities = [
|
|
33
|
+
'global.oidc-client.manage',
|
|
34
|
+
'global.organization.manage',
|
|
35
|
+
'global.alert.manage',
|
|
36
|
+
'global.user.manage',
|
|
37
|
+
];
|
|
27
38
|
export const tenantCapabilities = [
|
|
28
39
|
'tenant.organization.read',
|
|
29
40
|
'tenant.organization.manage',
|
|
@@ -64,4 +75,4 @@ export const delegableTenantCapabilities = [
|
|
|
64
75
|
'tenant.alert.read',
|
|
65
76
|
'tenant.alert.manage',
|
|
66
77
|
];
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXphdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvYXV0aG9yaXphdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRztJQUNoQyx5QkFBeUI7SUFDekIsMkJBQTJCO0lBQzNCLDBCQUEwQjtJQUMxQiw0QkFBNEI7SUFDNUIsbUJBQW1CO0lBQ25CLHFCQUFxQjtJQUNyQixrQkFBa0I7SUFDbEIsb0JBQW9CO0lBQ3BCLG9CQUFvQjtJQUNwQixxQkFBcUI7SUFDckIsMkJBQTJCO0lBQzNCLDRCQUE0QjtJQUM1Qiw0QkFBNEI7Q0FDcEIsQ0FBQztBQUlYLE1BQU0sQ0FBQyxNQUFNLDJCQUEyQixHQUFHO0lBQ3pDLHlCQUF5QjtJQUN6QiwyQkFBMkI7SUFDM0IsMEJBQTBCO0lBQzFCLDRCQUE0QjtJQUM1QixtQkFBbUI7SUFDbkIscUJBQXFCO0lBQ3JCLGtCQUFrQjtJQUNsQixvQkFBb0I7SUFDcEIsNEJBQTRCO0NBQ21CLENBQUM7QUFLbEQ7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxNQUFNLG9DQUFvQyxHQUFHO0lBQ2xELDJCQUEyQjtJQUMzQiw0QkFBNEI7SUFDNUIscUJBQXFCO0lBQ3JCLG9CQUFvQjtDQUMyQixDQUFDO0FBS2xELE1BQU0sQ0FBQyxNQUFNLGtCQUFrQixHQUFHO0lBQ2hDLDBCQUEwQjtJQUMxQiw0QkFBNEI7SUFDNUIsNEJBQTRCO0lBQzVCLDRCQUE0QjtJQUM1QixrQkFBa0I7SUFDbEIsb0JBQW9CO0lBQ3BCLHdCQUF3QjtJQUN4QiwwQkFBMEI7SUFDMUIsMkJBQTJCO0lBQzNCLDRCQUE0QjtJQUM1Qiw4QkFBOEI7SUFDOUIsaUJBQWlCO0lBQ2pCLG1CQUFtQjtJQUNuQix3QkFBd0I7SUFDeEIsMEJBQTBCO0lBQzFCLHFCQUFxQjtJQUNyQix1QkFBdUI7SUFDdkIsbUJBQW1CO0lBQ25CLHFCQUFxQjtDQUNiLENBQUM7QUFJWCxNQUFNLENBQUMsTUFBTSwyQkFBMkIsR0FBRztJQUN6QywwQkFBMEI7SUFDMUIsNEJBQTRCO0lBQzVCLDRCQUE0QjtJQUM1QixrQkFBa0I7SUFDbEIsb0JBQW9CO0lBQ3BCLHdCQUF3QjtJQUN4QiwwQkFBMEI7SUFDMUIsNEJBQTRCO0lBQzVCLDhCQUE4QjtJQUM5QixpQkFBaUI7SUFDakIsbUJBQW1CO0lBQ25CLHdCQUF3QjtJQUN4QiwwQkFBMEI7SUFDMUIscUJBQXFCO0lBQ3JCLHVCQUF1QjtJQUN2QixtQkFBbUI7SUFDbkIscUJBQXFCO0NBQzBCLENBQUMifQ==
|
package/dist_ts/data/user.d.ts
CHANGED
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
import type { TDelegableGlobalCapability } from './authorization.js';
|
|
1
|
+
import type { TBreakGlassEligibleGlobalCapability, TDelegableGlobalCapability } from './authorization.js';
|
|
2
|
+
export type TBreakGlassJustificationCode = 'access_recovery' | 'security_incident' | 'service_outage';
|
|
3
|
+
export type TBreakGlassReviewOutcome = 'confirmed' | 'escalated';
|
|
4
|
+
interface IBreakGlassAccessBase {
|
|
5
|
+
operationId: string;
|
|
6
|
+
capabilities: TBreakGlassEligibleGlobalCapability[];
|
|
7
|
+
justificationCode: TBreakGlassJustificationCode;
|
|
8
|
+
requestedAt: number;
|
|
9
|
+
approvalExpiresAt: number;
|
|
10
|
+
activationDurationSeconds: number;
|
|
11
|
+
}
|
|
12
|
+
export type TBreakGlassAccess = IBreakGlassAccessBase & ({
|
|
13
|
+
status: 'pending';
|
|
14
|
+
} | {
|
|
15
|
+
status: 'active';
|
|
16
|
+
approvedByUserRef: string;
|
|
17
|
+
approvedAt: number;
|
|
18
|
+
activeUntil: number;
|
|
19
|
+
firstUsedAt: number | null;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'reviewed';
|
|
22
|
+
approvedByUserRef: string;
|
|
23
|
+
approvedAt: number;
|
|
24
|
+
activeUntil: number;
|
|
25
|
+
firstUsedAt: number | null;
|
|
26
|
+
reviewedByUserRef: string;
|
|
27
|
+
reviewedAt: number;
|
|
28
|
+
reviewOutcome: TBreakGlassReviewOutcome;
|
|
29
|
+
});
|
|
2
30
|
export interface IUser {
|
|
3
31
|
id: string;
|
|
4
32
|
data: {
|
|
@@ -38,6 +66,11 @@ export interface IUser {
|
|
|
38
66
|
isGlobalAdmin?: boolean | null;
|
|
39
67
|
/** Sorted, explicit platform capabilities for a non-administrator. */
|
|
40
68
|
globalCapabilities?: TDelegableGlobalCapability[] | null;
|
|
69
|
+
/**
|
|
70
|
+
* Current break-glass request/grant state. Active authority is always
|
|
71
|
+
* time-bounded and a reviewed record is retained until the next request.
|
|
72
|
+
*/
|
|
73
|
+
breakGlassAccess?: TBreakGlassAccess | null;
|
|
41
74
|
/**
|
|
42
75
|
* Links to external identities established via enterprise SSO.
|
|
43
76
|
* One entry per SSO connection the user has signed in through.
|
|
@@ -50,3 +83,4 @@ export interface IUser {
|
|
|
50
83
|
}[] | null;
|
|
51
84
|
};
|
|
52
85
|
}
|
|
86
|
+
export {};
|
|
@@ -24,7 +24,7 @@ export type TActivityEventDto = TActivityEventFor<'login', 'account', {
|
|
|
24
24
|
roleChange: TActivityRoleChange;
|
|
25
25
|
}> | TActivityEventFor<'org_app_role_mappings_updated', 'organization_role_mapping', null> | TActivityEventFor<'profile_updated', 'profile', null> | TActivityEventFor<'totp_enabled', 'mfa_method', null> | TActivityEventFor<'totp_disabled', 'mfa_method', null> | TActivityEventFor<'backup_codes_regenerated', 'mfa_method', null> | TActivityEventFor<'mfa_completed', 'mfa_method', {
|
|
26
26
|
factor: TActivityMfaFactor;
|
|
27
|
-
}> | TActivityEventFor<'passkey_registered', 'passkey', null> | TActivityEventFor<'passkey_revoked', 'passkey', null> | TActivityEventFor<'passkey_login', 'passkey', null> | TActivityEventFor<'app_connected', 'application_connection', null> | TActivityEventFor<'app_disconnected', 'application_connection', null> | TActivityEventFor<'user_suspended', 'account', null> | TActivityEventFor<'user_unsuspended', 'account', null> | TActivityEventFor<'global_admin_granted', 'account', null> | TActivityEventFor<'global_admin_removed', 'account', null> | TActivityEventFor<'global_capabilities_changed', 'account', null> | TActivityEventFor<'account_deletion_requested', 'account', null> | TActivityEventFor<'account_deletion_cancelled', 'account', null> | TActivityEventFor<'account_purged', 'account', null> | TActivityEventFor<'sso_connection_created', 'sso_connection', {
|
|
27
|
+
}> | TActivityEventFor<'passkey_registered', 'passkey', null> | TActivityEventFor<'passkey_revoked', 'passkey', null> | TActivityEventFor<'passkey_login', 'passkey', null> | TActivityEventFor<'app_connected', 'application_connection', null> | TActivityEventFor<'app_disconnected', 'application_connection', null> | TActivityEventFor<'user_suspended', 'account', null> | TActivityEventFor<'user_unsuspended', 'account', null> | TActivityEventFor<'global_admin_granted', 'account', null> | TActivityEventFor<'global_admin_removed', 'account', null> | TActivityEventFor<'global_capabilities_changed', 'account', null> | TActivityEventFor<'break_glass_requested', 'break_glass_access', null> | TActivityEventFor<'break_glass_activated', 'break_glass_access', null> | TActivityEventFor<'break_glass_used', 'break_glass_access', null> | TActivityEventFor<'break_glass_reviewed', 'break_glass_access', null> | TActivityEventFor<'account_deletion_requested', 'account', null> | TActivityEventFor<'account_deletion_cancelled', 'account', null> | TActivityEventFor<'account_purged', 'account', null> | TActivityEventFor<'sso_connection_created', 'sso_connection', {
|
|
28
28
|
protocol: 'saml';
|
|
29
29
|
}> | TActivityEventFor<'sso_connection_updated', 'sso_connection', {
|
|
30
30
|
protocol: 'saml';
|
package/dist_ts/dto/user.d.ts
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
|
-
import type { TDelegableGlobalCapability } from '../data/authorization.js';
|
|
1
|
+
import type { TBreakGlassEligibleGlobalCapability, TDelegableGlobalCapability } from '../data/authorization.js';
|
|
2
|
+
import type { TBreakGlassJustificationCode, TBreakGlassReviewOutcome } from '../data/user.js';
|
|
3
|
+
interface IBreakGlassAccessDtoBase {
|
|
4
|
+
operationId: string;
|
|
5
|
+
capabilities: TBreakGlassEligibleGlobalCapability[];
|
|
6
|
+
justificationCode: TBreakGlassJustificationCode;
|
|
7
|
+
requestedAt: number;
|
|
8
|
+
approvalExpiresAt: number;
|
|
9
|
+
activationDurationSeconds: number;
|
|
10
|
+
}
|
|
11
|
+
export type TBreakGlassAccessDto = IBreakGlassAccessDtoBase & ({
|
|
12
|
+
status: 'pending';
|
|
13
|
+
} | {
|
|
14
|
+
status: 'active' | 'expired';
|
|
15
|
+
approvedAt: number;
|
|
16
|
+
activeUntil: number;
|
|
17
|
+
firstUsedAt: number | null;
|
|
18
|
+
} | {
|
|
19
|
+
status: 'reviewed';
|
|
20
|
+
approvedAt: number;
|
|
21
|
+
activeUntil: number;
|
|
22
|
+
firstUsedAt: number | null;
|
|
23
|
+
reviewedAt: number;
|
|
24
|
+
reviewOutcome: TBreakGlassReviewOutcome;
|
|
25
|
+
});
|
|
2
26
|
export interface IUserDataDto {
|
|
3
27
|
name: string;
|
|
4
28
|
username: string;
|
|
@@ -8,6 +32,8 @@ export interface IUserDataDto {
|
|
|
8
32
|
connectedOrgs: string[];
|
|
9
33
|
isGlobalAdmin?: boolean;
|
|
10
34
|
globalCapabilities: TDelegableGlobalCapability[];
|
|
35
|
+
/** Current public-safe break-glass state, without custody references. */
|
|
36
|
+
breakGlassAccess?: TBreakGlassAccessDto | null;
|
|
11
37
|
}
|
|
12
38
|
export interface IUserDto {
|
|
13
39
|
id: string;
|
|
@@ -40,8 +66,11 @@ export interface IGlobalUserAdminDto {
|
|
|
40
66
|
isGlobalAdmin: boolean;
|
|
41
67
|
/** Sorted direct assignments; empty for global administrators. */
|
|
42
68
|
globalCapabilities: TDelegableGlobalCapability[];
|
|
69
|
+
/** Current public-safe break-glass request/grant/review state. */
|
|
70
|
+
breakGlassAccess: TBreakGlassAccessDto | null;
|
|
43
71
|
/** number of organizations the user belongs to */
|
|
44
72
|
orgCount: number;
|
|
45
73
|
/** epoch ms; derived for accounts created before this field existed */
|
|
46
74
|
createdAt: number;
|
|
47
75
|
}
|
|
76
|
+
export {};
|
|
@@ -288,6 +288,59 @@ export interface IReq_SetGlobalCapabilityAssignments extends plugins.typedReques
|
|
|
288
288
|
user: dto.IGlobalUserAdminDto;
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* Request narrow, temporary platform authority for the authenticated user.
|
|
293
|
+
* Approval by a distinct administrator is required before authority becomes
|
|
294
|
+
* active.
|
|
295
|
+
*/
|
|
296
|
+
export interface IReq_RequestBreakGlassAccess extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RequestBreakGlassAccess> {
|
|
297
|
+
method: 'requestBreakGlassAccess';
|
|
298
|
+
request: {
|
|
299
|
+
jwt: string;
|
|
300
|
+
operationId: string;
|
|
301
|
+
/** Exact current revision of the authenticated User. */
|
|
302
|
+
expectedUserRevision: number;
|
|
303
|
+
capabilities: data.TBreakGlassEligibleGlobalCapability[];
|
|
304
|
+
justificationCode: data.TBreakGlassJustificationCode;
|
|
305
|
+
/** Requested active lifetime, from 60 through 1800 seconds. */
|
|
306
|
+
activationDurationSeconds: number;
|
|
307
|
+
};
|
|
308
|
+
response: {
|
|
309
|
+
user: dto.IGlobalUserAdminDto;
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/** Approve a pending break-glass request from a different user. */
|
|
313
|
+
export interface IReq_ApproveBreakGlassAccess extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ApproveBreakGlassAccess> {
|
|
314
|
+
method: 'approveBreakGlassAccess';
|
|
315
|
+
request: {
|
|
316
|
+
jwt: string;
|
|
317
|
+
operationId: string;
|
|
318
|
+
userId: string;
|
|
319
|
+
/** Exact current revision of the requesting User. */
|
|
320
|
+
expectedUserRevision: number;
|
|
321
|
+
};
|
|
322
|
+
response: {
|
|
323
|
+
user: dto.IGlobalUserAdminDto;
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Close an expired (or deliberately terminated) break-glass grant with a
|
|
328
|
+
* durable post-use review outcome. Calling this before expiry ends access.
|
|
329
|
+
*/
|
|
330
|
+
export interface IReq_ReviewBreakGlassAccess extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ReviewBreakGlassAccess> {
|
|
331
|
+
method: 'reviewBreakGlassAccess';
|
|
332
|
+
request: {
|
|
333
|
+
jwt: string;
|
|
334
|
+
operationId: string;
|
|
335
|
+
userId: string;
|
|
336
|
+
/** Exact current revision of the requesting User. */
|
|
337
|
+
expectedUserRevision: number;
|
|
338
|
+
reviewOutcome: data.TBreakGlassReviewOutcome;
|
|
339
|
+
};
|
|
340
|
+
response: {
|
|
341
|
+
user: dto.IGlobalUserAdminDto;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
291
344
|
/**
|
|
292
345
|
* Platform-wide organization directory with member counts (admin only)
|
|
293
346
|
*/
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/activity.ts
CHANGED
|
@@ -30,6 +30,10 @@ export type TActivityAction =
|
|
|
30
30
|
| 'global_admin_granted'
|
|
31
31
|
| 'global_admin_removed'
|
|
32
32
|
| 'global_capabilities_changed'
|
|
33
|
+
| 'break_glass_requested'
|
|
34
|
+
| 'break_glass_activated'
|
|
35
|
+
| 'break_glass_used'
|
|
36
|
+
| 'break_glass_reviewed'
|
|
33
37
|
| 'account_deletion_requested'
|
|
34
38
|
| 'account_deletion_cancelled'
|
|
35
39
|
| 'account_purged'
|
|
@@ -85,6 +89,7 @@ export type TActivityReasonCode =
|
|
|
85
89
|
export type TActivityTargetType =
|
|
86
90
|
| 'account'
|
|
87
91
|
| 'application_connection'
|
|
92
|
+
| 'break_glass_access'
|
|
88
93
|
| 'mfa_method'
|
|
89
94
|
| 'oidc_authorization'
|
|
90
95
|
| 'oidc_client'
|
package/ts/data/authorization.ts
CHANGED
|
@@ -31,6 +31,21 @@ export const delegableGlobalCapabilities = [
|
|
|
31
31
|
export type TDelegableGlobalCapability =
|
|
32
32
|
(typeof delegableGlobalCapabilities)[number];
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Capabilities that may be activated temporarily through the two-person
|
|
36
|
+
* break-glass protocol. Authority to delete accounts, manage administrators,
|
|
37
|
+
* rotate signing keys, or approve break-glass access is never eligible.
|
|
38
|
+
*/
|
|
39
|
+
export const breakGlassEligibleGlobalCapabilities = [
|
|
40
|
+
'global.oidc-client.manage',
|
|
41
|
+
'global.organization.manage',
|
|
42
|
+
'global.alert.manage',
|
|
43
|
+
'global.user.manage',
|
|
44
|
+
] as const satisfies readonly TGlobalCapability[];
|
|
45
|
+
|
|
46
|
+
export type TBreakGlassEligibleGlobalCapability =
|
|
47
|
+
(typeof breakGlassEligibleGlobalCapabilities)[number];
|
|
48
|
+
|
|
34
49
|
export const tenantCapabilities = [
|
|
35
50
|
'tenant.organization.read',
|
|
36
51
|
'tenant.organization.manage',
|
package/ts/data/user.ts
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import { type IRole } from './role.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
TBreakGlassEligibleGlobalCapability,
|
|
5
|
+
TDelegableGlobalCapability,
|
|
6
|
+
} from './authorization.js';
|
|
7
|
+
|
|
8
|
+
export type TBreakGlassJustificationCode =
|
|
9
|
+
| 'access_recovery'
|
|
10
|
+
| 'security_incident'
|
|
11
|
+
| 'service_outage';
|
|
12
|
+
|
|
13
|
+
export type TBreakGlassReviewOutcome = 'confirmed' | 'escalated';
|
|
14
|
+
|
|
15
|
+
interface IBreakGlassAccessBase {
|
|
16
|
+
operationId: string;
|
|
17
|
+
capabilities: TBreakGlassEligibleGlobalCapability[];
|
|
18
|
+
justificationCode: TBreakGlassJustificationCode;
|
|
19
|
+
requestedAt: number;
|
|
20
|
+
approvalExpiresAt: number;
|
|
21
|
+
activationDurationSeconds: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type TBreakGlassAccess = IBreakGlassAccessBase & (
|
|
25
|
+
| {
|
|
26
|
+
status: 'pending';
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
status: 'active';
|
|
30
|
+
approvedByUserRef: string;
|
|
31
|
+
approvedAt: number;
|
|
32
|
+
activeUntil: number;
|
|
33
|
+
firstUsedAt: number | null;
|
|
34
|
+
}
|
|
35
|
+
| {
|
|
36
|
+
status: 'reviewed';
|
|
37
|
+
approvedByUserRef: string;
|
|
38
|
+
approvedAt: number;
|
|
39
|
+
activeUntil: number;
|
|
40
|
+
firstUsedAt: number | null;
|
|
41
|
+
reviewedByUserRef: string;
|
|
42
|
+
reviewedAt: number;
|
|
43
|
+
reviewOutcome: TBreakGlassReviewOutcome;
|
|
44
|
+
}
|
|
45
|
+
);
|
|
4
46
|
|
|
5
47
|
export interface IUser {
|
|
6
48
|
id: string;
|
|
@@ -42,6 +84,11 @@ export interface IUser {
|
|
|
42
84
|
isGlobalAdmin?: boolean | null;
|
|
43
85
|
/** Sorted, explicit platform capabilities for a non-administrator. */
|
|
44
86
|
globalCapabilities?: TDelegableGlobalCapability[] | null;
|
|
87
|
+
/**
|
|
88
|
+
* Current break-glass request/grant state. Active authority is always
|
|
89
|
+
* time-bounded and a reviewed record is retained until the next request.
|
|
90
|
+
*/
|
|
91
|
+
breakGlassAccess?: TBreakGlassAccess | null;
|
|
45
92
|
/**
|
|
46
93
|
* Links to external identities established via enterprise SSO.
|
|
47
94
|
* One entry per SSO connection the user has signed in through.
|
package/ts/dto/activity.ts
CHANGED
|
@@ -78,6 +78,10 @@ export type TActivityEventDto =
|
|
|
78
78
|
| TActivityEventFor<'global_admin_granted', 'account', null>
|
|
79
79
|
| TActivityEventFor<'global_admin_removed', 'account', null>
|
|
80
80
|
| TActivityEventFor<'global_capabilities_changed', 'account', null>
|
|
81
|
+
| TActivityEventFor<'break_glass_requested', 'break_glass_access', null>
|
|
82
|
+
| TActivityEventFor<'break_glass_activated', 'break_glass_access', null>
|
|
83
|
+
| TActivityEventFor<'break_glass_used', 'break_glass_access', null>
|
|
84
|
+
| TActivityEventFor<'break_glass_reviewed', 'break_glass_access', null>
|
|
81
85
|
| TActivityEventFor<'account_deletion_requested', 'account', null>
|
|
82
86
|
| TActivityEventFor<'account_deletion_cancelled', 'account', null>
|
|
83
87
|
| TActivityEventFor<'account_purged', 'account', null>
|
package/ts/dto/user.ts
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
TBreakGlassEligibleGlobalCapability,
|
|
3
|
+
TDelegableGlobalCapability,
|
|
4
|
+
} from '../data/authorization.js';
|
|
5
|
+
import type {
|
|
6
|
+
TBreakGlassJustificationCode,
|
|
7
|
+
TBreakGlassReviewOutcome,
|
|
8
|
+
} from '../data/user.js';
|
|
9
|
+
|
|
10
|
+
interface IBreakGlassAccessDtoBase {
|
|
11
|
+
operationId: string;
|
|
12
|
+
capabilities: TBreakGlassEligibleGlobalCapability[];
|
|
13
|
+
justificationCode: TBreakGlassJustificationCode;
|
|
14
|
+
requestedAt: number;
|
|
15
|
+
approvalExpiresAt: number;
|
|
16
|
+
activationDurationSeconds: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type TBreakGlassAccessDto = IBreakGlassAccessDtoBase & (
|
|
20
|
+
| { status: 'pending' }
|
|
21
|
+
| {
|
|
22
|
+
status: 'active' | 'expired';
|
|
23
|
+
approvedAt: number;
|
|
24
|
+
activeUntil: number;
|
|
25
|
+
firstUsedAt: number | null;
|
|
26
|
+
}
|
|
27
|
+
| {
|
|
28
|
+
status: 'reviewed';
|
|
29
|
+
approvedAt: number;
|
|
30
|
+
activeUntil: number;
|
|
31
|
+
firstUsedAt: number | null;
|
|
32
|
+
reviewedAt: number;
|
|
33
|
+
reviewOutcome: TBreakGlassReviewOutcome;
|
|
34
|
+
}
|
|
35
|
+
);
|
|
2
36
|
|
|
3
37
|
export interface IUserDataDto {
|
|
4
38
|
name: string;
|
|
@@ -9,6 +43,8 @@ export interface IUserDataDto {
|
|
|
9
43
|
connectedOrgs: string[];
|
|
10
44
|
isGlobalAdmin?: boolean;
|
|
11
45
|
globalCapabilities: TDelegableGlobalCapability[];
|
|
46
|
+
/** Current public-safe break-glass state, without custody references. */
|
|
47
|
+
breakGlassAccess?: TBreakGlassAccessDto | null;
|
|
12
48
|
}
|
|
13
49
|
|
|
14
50
|
export interface IUserDto {
|
|
@@ -44,6 +80,8 @@ export interface IGlobalUserAdminDto {
|
|
|
44
80
|
isGlobalAdmin: boolean;
|
|
45
81
|
/** Sorted direct assignments; empty for global administrators. */
|
|
46
82
|
globalCapabilities: TDelegableGlobalCapability[];
|
|
83
|
+
/** Current public-safe break-glass request/grant/review state. */
|
|
84
|
+
breakGlassAccess: TBreakGlassAccessDto | null;
|
|
47
85
|
/** number of organizations the user belongs to */
|
|
48
86
|
orgCount: number;
|
|
49
87
|
/** epoch ms; derived for accounts created before this field existed */
|
package/ts/request/admin.ts
CHANGED
|
@@ -370,6 +370,74 @@ export interface IReq_SetGlobalCapabilityAssignments
|
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
/**
|
|
374
|
+
* Request narrow, temporary platform authority for the authenticated user.
|
|
375
|
+
* Approval by a distinct administrator is required before authority becomes
|
|
376
|
+
* active.
|
|
377
|
+
*/
|
|
378
|
+
export interface IReq_RequestBreakGlassAccess
|
|
379
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
380
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
381
|
+
IReq_RequestBreakGlassAccess
|
|
382
|
+
> {
|
|
383
|
+
method: 'requestBreakGlassAccess';
|
|
384
|
+
request: {
|
|
385
|
+
jwt: string;
|
|
386
|
+
operationId: string;
|
|
387
|
+
/** Exact current revision of the authenticated User. */
|
|
388
|
+
expectedUserRevision: number;
|
|
389
|
+
capabilities: data.TBreakGlassEligibleGlobalCapability[];
|
|
390
|
+
justificationCode: data.TBreakGlassJustificationCode;
|
|
391
|
+
/** Requested active lifetime, from 60 through 1800 seconds. */
|
|
392
|
+
activationDurationSeconds: number;
|
|
393
|
+
};
|
|
394
|
+
response: {
|
|
395
|
+
user: dto.IGlobalUserAdminDto;
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/** Approve a pending break-glass request from a different user. */
|
|
400
|
+
export interface IReq_ApproveBreakGlassAccess
|
|
401
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
402
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
403
|
+
IReq_ApproveBreakGlassAccess
|
|
404
|
+
> {
|
|
405
|
+
method: 'approveBreakGlassAccess';
|
|
406
|
+
request: {
|
|
407
|
+
jwt: string;
|
|
408
|
+
operationId: string;
|
|
409
|
+
userId: string;
|
|
410
|
+
/** Exact current revision of the requesting User. */
|
|
411
|
+
expectedUserRevision: number;
|
|
412
|
+
};
|
|
413
|
+
response: {
|
|
414
|
+
user: dto.IGlobalUserAdminDto;
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Close an expired (or deliberately terminated) break-glass grant with a
|
|
420
|
+
* durable post-use review outcome. Calling this before expiry ends access.
|
|
421
|
+
*/
|
|
422
|
+
export interface IReq_ReviewBreakGlassAccess
|
|
423
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
424
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
425
|
+
IReq_ReviewBreakGlassAccess
|
|
426
|
+
> {
|
|
427
|
+
method: 'reviewBreakGlassAccess';
|
|
428
|
+
request: {
|
|
429
|
+
jwt: string;
|
|
430
|
+
operationId: string;
|
|
431
|
+
userId: string;
|
|
432
|
+
/** Exact current revision of the requesting User. */
|
|
433
|
+
expectedUserRevision: number;
|
|
434
|
+
reviewOutcome: data.TBreakGlassReviewOutcome;
|
|
435
|
+
};
|
|
436
|
+
response: {
|
|
437
|
+
user: dto.IGlobalUserAdminDto;
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
373
441
|
/**
|
|
374
442
|
* Platform-wide organization directory with member counts (admin only)
|
|
375
443
|
*/
|