@cubist-labs/cubesigner-sdk 0.3.1 → 0.3.8
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/dist/cjs/package.json +1 -1
- package/dist/cjs/src/api.d.ts +27 -9
- package/dist/cjs/src/api.js +58 -22
- package/dist/cjs/src/client.d.ts +68 -1
- package/dist/cjs/src/client.js +79 -2
- package/dist/cjs/src/error.d.ts +3 -0
- package/dist/cjs/src/error.js +2 -1
- package/dist/cjs/src/key.d.ts +19 -2
- package/dist/cjs/src/key.js +22 -2
- package/dist/cjs/src/mfa.d.ts +6 -3
- package/dist/cjs/src/mfa.js +8 -5
- package/dist/cjs/src/response.d.ts +14 -1
- package/dist/cjs/src/response.js +65 -26
- package/dist/cjs/src/role.d.ts +6 -0
- package/dist/cjs/src/role.js +9 -1
- package/dist/cjs/src/schema.d.ts +238 -43
- package/dist/cjs/src/schema.js +1 -1
- package/dist/cjs/src/schema_types.d.ts +3 -0
- package/dist/cjs/src/schema_types.js +1 -1
- package/dist/cjs/src/session/signer_session_manager.js +3 -3
- package/dist/cjs/src/util.js +3 -2
- package/dist/esm/package.json +1 -1
- package/dist/esm/src/api.d.ts +27 -9
- package/dist/esm/src/api.js +56 -20
- package/dist/esm/src/client.d.ts +68 -1
- package/dist/esm/src/client.js +79 -2
- package/dist/esm/src/error.d.ts +3 -0
- package/dist/esm/src/error.js +2 -1
- package/dist/esm/src/key.d.ts +19 -2
- package/dist/esm/src/key.js +22 -2
- package/dist/esm/src/mfa.d.ts +6 -3
- package/dist/esm/src/mfa.js +8 -5
- package/dist/esm/src/response.d.ts +14 -1
- package/dist/esm/src/response.js +65 -26
- package/dist/esm/src/role.d.ts +6 -0
- package/dist/esm/src/role.js +9 -1
- package/dist/esm/src/schema.d.ts +238 -43
- package/dist/esm/src/schema.js +1 -1
- package/dist/esm/src/schema_types.d.ts +3 -0
- package/dist/esm/src/schema_types.js +1 -1
- package/dist/esm/src/session/signer_session_manager.js +3 -3
- package/dist/esm/src/util.js +3 -2
- package/package.json +1 -1
- package/src/api.ts +66 -19
- package/src/client.ts +94 -2
- package/src/error.ts +4 -0
- package/src/key.ts +31 -2
- package/src/mfa.ts +8 -4
- package/src/response.ts +50 -4
- package/src/role.ts +9 -0
- package/src/schema.ts +496 -43
- package/src/schema_types.ts +3 -0
- package/src/session/signer_session_manager.ts +2 -2
- package/src/util.ts +2 -3
package/src/schema.ts
CHANGED
|
@@ -192,6 +192,15 @@ export interface paths {
|
|
|
192
192
|
*/
|
|
193
193
|
patch: operations["updateKey"];
|
|
194
194
|
};
|
|
195
|
+
"/v0/org/{org_id}/keys/{key_id}/roles": {
|
|
196
|
+
/**
|
|
197
|
+
* List Key Roles
|
|
198
|
+
* @description List Key Roles
|
|
199
|
+
*
|
|
200
|
+
* Get all roles the key is in
|
|
201
|
+
*/
|
|
202
|
+
get: operations["listKeyRoles"];
|
|
203
|
+
};
|
|
195
204
|
"/v0/org/{org_id}/mfa": {
|
|
196
205
|
/**
|
|
197
206
|
* List Pending MFA Requests
|
|
@@ -211,46 +220,52 @@ export interface paths {
|
|
|
211
220
|
*/
|
|
212
221
|
get: operations["mfaGet"];
|
|
213
222
|
/**
|
|
214
|
-
* Approve MFA Request
|
|
215
|
-
* @description Approve MFA Request
|
|
223
|
+
* Approve or Reject MFA Request
|
|
224
|
+
* @description Approve or Reject MFA Request
|
|
225
|
+
*
|
|
226
|
+
* Approve or reject request after logging in with CubeSigner.
|
|
216
227
|
*
|
|
217
|
-
*
|
|
228
|
+
* If approving, adds the currently-logged user as an approver
|
|
218
229
|
* of a pending MFA request of the [Status::RequiredApprovers] kind. If the required number of
|
|
219
230
|
* approvers is reached, the MFA request is approved; the confirmation receipt can be used to
|
|
220
231
|
* resume the original HTTP request.
|
|
232
|
+
*
|
|
233
|
+
* If rejecting, immediately deletes the pending MFA request.
|
|
221
234
|
*/
|
|
222
|
-
patch: operations["
|
|
235
|
+
patch: operations["mfaVoteCs"];
|
|
223
236
|
};
|
|
224
237
|
"/v0/org/{org_id}/mfa/{mfa_id}/fido": {
|
|
225
238
|
/**
|
|
226
|
-
* Initiate
|
|
227
|
-
* @description Initiate
|
|
239
|
+
* Initiate a FIDO MFA Approval/Rejection
|
|
240
|
+
* @description Initiate a FIDO MFA Approval/Rejection
|
|
228
241
|
*
|
|
229
|
-
* Initiates the approval process of an MFA Request using FIDO.
|
|
242
|
+
* Initiates the approval/rejection process of an MFA Request using FIDO.
|
|
230
243
|
*/
|
|
231
|
-
post: operations["
|
|
244
|
+
post: operations["mfaFidoInit"];
|
|
232
245
|
/**
|
|
233
|
-
* Finalize a FIDO MFA Approval
|
|
234
|
-
* @description Finalize a FIDO MFA Approval
|
|
235
|
-
*
|
|
236
|
-
* Adds an approver to a pending MFA request.
|
|
246
|
+
* Finalize a FIDO MFA Approval/Rejection
|
|
247
|
+
* @description Finalize a FIDO MFA Approval/Rejection
|
|
237
248
|
*
|
|
249
|
+
* If approving, adds an approver to a pending MFA request.
|
|
238
250
|
* If the required number of approvers is reached, the MFA request is approved;
|
|
239
251
|
* the confirmation receipt can be used to resume the original HTTP request.
|
|
252
|
+
*
|
|
253
|
+
* If rejecting, immediately deletes the pending MFA request.
|
|
240
254
|
*/
|
|
241
|
-
patch: operations["
|
|
255
|
+
patch: operations["mfaVoteFidoComplete"];
|
|
242
256
|
};
|
|
243
257
|
"/v0/org/{org_id}/mfa/{mfa_id}/totp": {
|
|
244
258
|
/**
|
|
245
|
-
* Approve a TOTP MFA Request
|
|
246
|
-
* @description Approve a TOTP MFA Request
|
|
259
|
+
* Approve/Reject a TOTP MFA Request
|
|
260
|
+
* @description Approve/Reject a TOTP MFA Request
|
|
247
261
|
*
|
|
248
|
-
*
|
|
262
|
+
* If approving, adds the current user as approver to a pending MFA request by
|
|
263
|
+
* providing TOTP code. If the required number of approvers is reached, the MFA request is
|
|
264
|
+
* approved; the confirmation receipt can be used to resume the original HTTP request.
|
|
249
265
|
*
|
|
250
|
-
* If
|
|
251
|
-
* the confirmation receipt can be used to resume the original HTTP request.
|
|
266
|
+
* If rejecting, immediately deletes the pending MFA request.
|
|
252
267
|
*/
|
|
253
|
-
patch: operations["
|
|
268
|
+
patch: operations["mfaVoteTotp"];
|
|
254
269
|
};
|
|
255
270
|
"/v0/org/{org_id}/oidc": {
|
|
256
271
|
/**
|
|
@@ -395,6 +410,16 @@ export interface paths {
|
|
|
395
410
|
*/
|
|
396
411
|
get: operations["listRoleUsers"];
|
|
397
412
|
};
|
|
413
|
+
"/v0/org/{org_id}/roles/{role_id}/users/{user_id}": {
|
|
414
|
+
/**
|
|
415
|
+
* Remove User
|
|
416
|
+
* @description Remove User
|
|
417
|
+
*
|
|
418
|
+
* Removes an existing user from an existing role.
|
|
419
|
+
* Only users in the role or org owners can remove users from a role.
|
|
420
|
+
*/
|
|
421
|
+
delete: operations["removeUserFromRole"];
|
|
422
|
+
};
|
|
398
423
|
"/v0/org/{org_id}/session": {
|
|
399
424
|
/**
|
|
400
425
|
* List sessions
|
|
@@ -750,6 +775,8 @@ export interface components {
|
|
|
750
775
|
session?: components["schemas"]["NewSessionResponse"] | null;
|
|
751
776
|
};
|
|
752
777
|
};
|
|
778
|
+
/** @enum {string} */
|
|
779
|
+
AcceptedValueCode: "MfaRequired";
|
|
753
780
|
AddKeysToRoleRequest: {
|
|
754
781
|
/**
|
|
755
782
|
* @description A list of keys to add to a role
|
|
@@ -795,6 +822,11 @@ export interface components {
|
|
|
795
822
|
identity: components["schemas"]["OIDCIdentity"];
|
|
796
823
|
/** @description Optional login MFA policy */
|
|
797
824
|
mfa_policy?: unknown;
|
|
825
|
+
/**
|
|
826
|
+
* @description Optional user full name
|
|
827
|
+
* @example Alice Wonderland
|
|
828
|
+
*/
|
|
829
|
+
name?: string | null;
|
|
798
830
|
role: components["schemas"]["MemberRole"];
|
|
799
831
|
};
|
|
800
832
|
AddThirdPartyUserResponse: {
|
|
@@ -956,6 +988,90 @@ export interface components {
|
|
|
956
988
|
};
|
|
957
989
|
/** @description Wrapper around a zeroizing 32-byte fixed-size array */
|
|
958
990
|
B32: string;
|
|
991
|
+
/** @enum {string} */
|
|
992
|
+
BadRequestErrorCode:
|
|
993
|
+
| "GenericBadRequest"
|
|
994
|
+
| "InvalidBody"
|
|
995
|
+
| "InvalidMfaReceipt"
|
|
996
|
+
| "InvalidMfaPolicyCount"
|
|
997
|
+
| "InvalidMfaPolicyNumAuthFactors"
|
|
998
|
+
| "InvalidMfaPolicyNumAllowedApprovers"
|
|
999
|
+
| "InvalidMfaPolicyRedundantRule"
|
|
1000
|
+
| "InvalidCreateKeyCount"
|
|
1001
|
+
| "OrgInviteExistingUser"
|
|
1002
|
+
| "OrgNameTaken"
|
|
1003
|
+
| "RoleNameTaken"
|
|
1004
|
+
| "AddKeyToRoleCountTooHigh"
|
|
1005
|
+
| "InvalidKeyId"
|
|
1006
|
+
| "InvalidKeyMetadataLength"
|
|
1007
|
+
| "InvalidKeyMetadata"
|
|
1008
|
+
| "InvalidKeyMaterialId"
|
|
1009
|
+
| "KeyNotFound"
|
|
1010
|
+
| "UserExportDerivedKey"
|
|
1011
|
+
| "UserExportPublicKeyInvalid"
|
|
1012
|
+
| "UserExportInProgress"
|
|
1013
|
+
| "RoleNotFound"
|
|
1014
|
+
| "InvalidMfaReceiptOrgIdMissing"
|
|
1015
|
+
| "InvalidMfaReceiptInvalidOrgId"
|
|
1016
|
+
| "MfaRequestNotFound"
|
|
1017
|
+
| "InvalidKeyType"
|
|
1018
|
+
| "InvalidKeyMaterial"
|
|
1019
|
+
| "InvalidHexValue"
|
|
1020
|
+
| "InvalidBase32Value"
|
|
1021
|
+
| "InvalidBase58Value"
|
|
1022
|
+
| "InvalidForkVersionLength"
|
|
1023
|
+
| "InvalidEthAddress"
|
|
1024
|
+
| "InvalidStellarAddress"
|
|
1025
|
+
| "InvalidOrgNameOrId"
|
|
1026
|
+
| "InvalidStakeDeposit"
|
|
1027
|
+
| "InvalidBlobSignRequest"
|
|
1028
|
+
| "InvalidSolanaSignRequest"
|
|
1029
|
+
| "InvalidEip712SignRequest"
|
|
1030
|
+
| "InvalidEvmSignRequest"
|
|
1031
|
+
| "InvalidEth2SignRequest"
|
|
1032
|
+
| "InvalidDeriveKeyRequest"
|
|
1033
|
+
| "InvalidStakingAmount"
|
|
1034
|
+
| "CustomStakingAmountNotAllowedForWrapperContract"
|
|
1035
|
+
| "InvalidUnstakeRequest"
|
|
1036
|
+
| "InvalidCreateUserRequest"
|
|
1037
|
+
| "UserAlreadyExists"
|
|
1038
|
+
| "UserNotFound"
|
|
1039
|
+
| "PolicyRuleKeyMismatch"
|
|
1040
|
+
| "EmptyScopes"
|
|
1041
|
+
| "InvalidScopesForRoleSession"
|
|
1042
|
+
| "InvalidLifetime"
|
|
1043
|
+
| "NoSingleKeyForUser"
|
|
1044
|
+
| "InvalidOrgPolicyRule"
|
|
1045
|
+
| "SourceIpAllowlistEmpty"
|
|
1046
|
+
| "InvalidOrgPolicyRepeatedRule"
|
|
1047
|
+
| "AvaSignHashError"
|
|
1048
|
+
| "AvaSignError"
|
|
1049
|
+
| "BtcSegwitHashError"
|
|
1050
|
+
| "BtcSignError"
|
|
1051
|
+
| "Eip712SignError"
|
|
1052
|
+
| "InvalidMemberRoleInUserAdd"
|
|
1053
|
+
| "ThirdPartyUserAlreadyExists"
|
|
1054
|
+
| "ThirdPartyUserNotFound"
|
|
1055
|
+
| "DeleteOidcUserError"
|
|
1056
|
+
| "SessionRoleMismatch"
|
|
1057
|
+
| "InvalidOidcToken"
|
|
1058
|
+
| "OidcIssuerUnsupported"
|
|
1059
|
+
| "OidcIssuerNotAllowed"
|
|
1060
|
+
| "OidcIssuerNoApplicableJwk"
|
|
1061
|
+
| "FidoCredentialMissing"
|
|
1062
|
+
| "FidoKeyAlreadyRegistered"
|
|
1063
|
+
| "FidoKeySignCountTooLow"
|
|
1064
|
+
| "FidoVerificationFailed"
|
|
1065
|
+
| "FidoChallengeMfaMismatch"
|
|
1066
|
+
| "UnsupportedLegacyCognitoSession"
|
|
1067
|
+
| "InvalidIdentityProof"
|
|
1068
|
+
| "PaginationDataExpired"
|
|
1069
|
+
| "ExistingKeysViolateExclusiveKeyAccess"
|
|
1070
|
+
| "ExportDelayTooShort"
|
|
1071
|
+
| "ExportWindowTooLong"
|
|
1072
|
+
| "InvalidTotpFailureLimit"
|
|
1073
|
+
| "InvalidEip191SignRequest"
|
|
1074
|
+
| "CannotResendUserInvitation";
|
|
959
1075
|
/**
|
|
960
1076
|
* @example {
|
|
961
1077
|
* "message_base64": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTYK"
|
|
@@ -1162,6 +1278,8 @@ export interface components {
|
|
|
1162
1278
|
configured_mfa: components["schemas"]["ConfiguredMfa"][];
|
|
1163
1279
|
/** @description Set once the user successfully logs into CubeSigner */
|
|
1164
1280
|
initialized: boolean;
|
|
1281
|
+
/** @description Optional human name for the user */
|
|
1282
|
+
name?: string | null;
|
|
1165
1283
|
/** @description CubeSigner's user identifier */
|
|
1166
1284
|
user_id: string;
|
|
1167
1285
|
};
|
|
@@ -1340,6 +1458,7 @@ export interface components {
|
|
|
1340
1458
|
/** @description The structure of ErrorResponse must match the response template that AWS uses */
|
|
1341
1459
|
ErrorResponse: {
|
|
1342
1460
|
accepted?: components["schemas"]["AcceptedValue"] | null;
|
|
1461
|
+
error_code: components["schemas"]["SignerErrorCode"];
|
|
1343
1462
|
/** @description Error message */
|
|
1344
1463
|
message: string;
|
|
1345
1464
|
/** @description Optional request identifier */
|
|
@@ -1417,6 +1536,26 @@ export interface components {
|
|
|
1417
1536
|
*/
|
|
1418
1537
|
signature: string;
|
|
1419
1538
|
};
|
|
1539
|
+
/** @enum {string} */
|
|
1540
|
+
EvmTxDepositErrorCode:
|
|
1541
|
+
| "EvmTxDepositReceiverMismatch"
|
|
1542
|
+
| "EvmTxDepositEmptyData"
|
|
1543
|
+
| "EvmTxDepositEmptyChainId"
|
|
1544
|
+
| "EvmTxDepositEmptyReceiver"
|
|
1545
|
+
| "EvmTxDepositUnexpectedValue"
|
|
1546
|
+
| "EvmTxDepositUnexpectedDataLength"
|
|
1547
|
+
| "EvmTxDepositNoAbi"
|
|
1548
|
+
| "EvmTxDepositNoDepositFunction"
|
|
1549
|
+
| "EvmTxDepositUnexpectedFunctionName"
|
|
1550
|
+
| "EvmTxDepositUnexpectedValidatorKey"
|
|
1551
|
+
| "EvmTxDepositInvalidValidatorKey"
|
|
1552
|
+
| "EvmTxDepositMissingDepositArg"
|
|
1553
|
+
| "EvmTxDepositWrongDepositArgType"
|
|
1554
|
+
| "EvmTxDepositWrongValidatorArgValue"
|
|
1555
|
+
| "EvmTxDepositValidatorKeyNotInRole"
|
|
1556
|
+
| "EvmTxDepositUnexpectedWithdrawalCredentials"
|
|
1557
|
+
| "EvmTxDepositUnresolvedRole"
|
|
1558
|
+
| "EvmTxDepositInvalidDepositEncoding";
|
|
1420
1559
|
/** @description Sent from the client to the server to answer a fido challenge */
|
|
1421
1560
|
FidoAssertAnswer: {
|
|
1422
1561
|
/** @description The ID of the challenge that was returned from the POST endpoint */
|
|
@@ -1453,6 +1592,64 @@ export interface components {
|
|
|
1453
1592
|
*/
|
|
1454
1593
|
name: string;
|
|
1455
1594
|
};
|
|
1595
|
+
/** @enum {string} */
|
|
1596
|
+
ForbiddenErrorCode:
|
|
1597
|
+
| "FidoRequiredToRemoveTotp"
|
|
1598
|
+
| "MfaChallengeExpired"
|
|
1599
|
+
| "ChainIdNotAllowed"
|
|
1600
|
+
| "InvalidOrg"
|
|
1601
|
+
| "SessionForWrongOrg"
|
|
1602
|
+
| "OrgDisabled"
|
|
1603
|
+
| "OrgNotFound"
|
|
1604
|
+
| "OrgWithoutOwner"
|
|
1605
|
+
| "OrphanedUser"
|
|
1606
|
+
| "OidcUserNotFound"
|
|
1607
|
+
| "UserNotInOrg"
|
|
1608
|
+
| "UserNotOrgOwner"
|
|
1609
|
+
| "UserNotKeyOwner"
|
|
1610
|
+
| "InvalidRole"
|
|
1611
|
+
| "DisabledRole"
|
|
1612
|
+
| "KeyDisabled"
|
|
1613
|
+
| "RoleNotInOrg"
|
|
1614
|
+
| "KeyNotInRole"
|
|
1615
|
+
| "KeyNotInOrg"
|
|
1616
|
+
| "UserExportRequestNotInOrg"
|
|
1617
|
+
| "UserExportRequestInvalid"
|
|
1618
|
+
| "UserNotOriginalKeyOwner"
|
|
1619
|
+
| "UserNotInRole"
|
|
1620
|
+
| "MustBeFullMember"
|
|
1621
|
+
| "SessionExpired"
|
|
1622
|
+
| "SessionRevoked"
|
|
1623
|
+
| "ExpectedUserSession"
|
|
1624
|
+
| "SessionRoleChanged"
|
|
1625
|
+
| "ScopedNameNotFound"
|
|
1626
|
+
| "SessionInvalidEpochToken"
|
|
1627
|
+
| "SessionInvalidRefreshToken"
|
|
1628
|
+
| "SessionRefreshTokenExpired"
|
|
1629
|
+
| "InvalidAuthHeader"
|
|
1630
|
+
| "SessionNotFound"
|
|
1631
|
+
| "InvalidArn"
|
|
1632
|
+
| "SessionInvalidAuthToken"
|
|
1633
|
+
| "SessionAuthTokenExpired"
|
|
1634
|
+
| "SessionPossiblyStolenToken"
|
|
1635
|
+
| "MfaDisallowedIdentity"
|
|
1636
|
+
| "MfaDisallowedApprover"
|
|
1637
|
+
| "MfaTypeNotAllowed"
|
|
1638
|
+
| "MfaNotApprovedYet"
|
|
1639
|
+
| "MfaConfirmationCodeMismatch"
|
|
1640
|
+
| "MfaHttpRequestMismatch"
|
|
1641
|
+
| "MfaApprovalFromUserSession"
|
|
1642
|
+
| "MfaRemoveBelowMin"
|
|
1643
|
+
| "TotpAlreadyConfigured"
|
|
1644
|
+
| "TotpConfigurationChanged"
|
|
1645
|
+
| "MfaTotpBadConfiguration"
|
|
1646
|
+
| "MfaTotpBadCode"
|
|
1647
|
+
| "MfaTotpRateLimit"
|
|
1648
|
+
| "ImproperSessionScope"
|
|
1649
|
+
| "FullSessionRequired"
|
|
1650
|
+
| "SessionWithoutAnyScopeUnder"
|
|
1651
|
+
| "UserRoleUnprivileged"
|
|
1652
|
+
| "MfaNotConfigured";
|
|
1456
1653
|
/**
|
|
1457
1654
|
* @description Specifies a fork of the `BeaconChain`, to prevent replay attacks.
|
|
1458
1655
|
* The schema of `Fork` is defined in the [Beacon chain
|
|
@@ -1617,6 +1814,60 @@ export interface components {
|
|
|
1617
1814
|
*/
|
|
1618
1815
|
salt: string;
|
|
1619
1816
|
};
|
|
1817
|
+
/** @enum {string} */
|
|
1818
|
+
InternalErrorCode:
|
|
1819
|
+
| "SystemTimeError"
|
|
1820
|
+
| "ReqwestError"
|
|
1821
|
+
| "DbQueryError"
|
|
1822
|
+
| "DbGetError"
|
|
1823
|
+
| "DbDeleteError"
|
|
1824
|
+
| "DbPutError"
|
|
1825
|
+
| "DbUpdateError"
|
|
1826
|
+
| "SerdeError"
|
|
1827
|
+
| "TestAndSetError"
|
|
1828
|
+
| "DbGetItemsError"
|
|
1829
|
+
| "DbWriteError"
|
|
1830
|
+
| "CubistSignerError"
|
|
1831
|
+
| "CwPutMetricDataError"
|
|
1832
|
+
| "KmsGenerateRandomError"
|
|
1833
|
+
| "MalformedTotpBytes"
|
|
1834
|
+
| "KmsGenerateRandomNoResponseError"
|
|
1835
|
+
| "CreateKeyError"
|
|
1836
|
+
| "ParseDerivationPathError"
|
|
1837
|
+
| "SplitSignerError"
|
|
1838
|
+
| "CreateImportKeyError"
|
|
1839
|
+
| "CognitoDeleteUserError"
|
|
1840
|
+
| "CognitoListUsersError"
|
|
1841
|
+
| "CognitoGetUserError"
|
|
1842
|
+
| "MissingUserEmail"
|
|
1843
|
+
| "CognitoResendUserInvitation"
|
|
1844
|
+
| "CognitoSetUserPasswordError"
|
|
1845
|
+
| "GenericInternalError"
|
|
1846
|
+
| "OidcAuthWithoutOrg"
|
|
1847
|
+
| "MissingKeyMetadata"
|
|
1848
|
+
| "KmsKeyWithoutId"
|
|
1849
|
+
| "KmsEnableKeyError"
|
|
1850
|
+
| "KmsDisableKeyError"
|
|
1851
|
+
| "SerializeEncryptedExportKeyError"
|
|
1852
|
+
| "DeserializeEncryptedExportKeyError"
|
|
1853
|
+
| "ReEncryptUserExport"
|
|
1854
|
+
| "S3UploadError"
|
|
1855
|
+
| "S3DownloadError"
|
|
1856
|
+
| "ManagedStateMissing"
|
|
1857
|
+
| "InternalHeaderMissing"
|
|
1858
|
+
| "InvalidInternalHeaderValue"
|
|
1859
|
+
| "RequestLocalStateAlreadySet"
|
|
1860
|
+
| "OidcOrgMismatch"
|
|
1861
|
+
| "OrphanedRoleKeyId"
|
|
1862
|
+
| "OidcIssuerJwkEndpointUnavailable"
|
|
1863
|
+
| "OidcIssuerInvalidJwk"
|
|
1864
|
+
| "InvalidPkForMaterialId"
|
|
1865
|
+
| "UncheckedOrg"
|
|
1866
|
+
| "AvaSignCredsMissing"
|
|
1867
|
+
| "AvaSignSignatureMissing"
|
|
1868
|
+
| "ExpectedRoleSession"
|
|
1869
|
+
| "InvalidThirdPartyIdentity"
|
|
1870
|
+
| "CognitoGetUser";
|
|
1620
1871
|
InviteRequest: {
|
|
1621
1872
|
/**
|
|
1622
1873
|
* @description The user's email address
|
|
@@ -1775,6 +2026,11 @@ export interface components {
|
|
|
1775
2026
|
* ]
|
|
1776
2027
|
*/
|
|
1777
2028
|
policy?: Record<string, never>[];
|
|
2029
|
+
/**
|
|
2030
|
+
* @description Role ID
|
|
2031
|
+
* @example Role#e427c28a-9c5b-49cc-a257-878aea58a22c
|
|
2032
|
+
*/
|
|
2033
|
+
role_id: string;
|
|
1778
2034
|
};
|
|
1779
2035
|
KeyInfo: {
|
|
1780
2036
|
derivation_info?: components["schemas"]["KeyDerivationInfo"] | null;
|
|
@@ -1894,6 +2150,8 @@ export interface components {
|
|
|
1894
2150
|
},
|
|
1895
2151
|
]
|
|
1896
2152
|
>;
|
|
2153
|
+
/** @enum {string} */
|
|
2154
|
+
MfaVote: "approve" | "reject";
|
|
1897
2155
|
/**
|
|
1898
2156
|
* @description Network name ('mainnet', 'prater', 'goerli')
|
|
1899
2157
|
* @example goerli
|
|
@@ -1915,14 +2173,21 @@ export interface components {
|
|
|
1915
2173
|
*/
|
|
1916
2174
|
token: string;
|
|
1917
2175
|
};
|
|
2176
|
+
/** @enum {string} */
|
|
2177
|
+
NotFoundErrorCode:
|
|
2178
|
+
| "UriSegmentMissing"
|
|
2179
|
+
| "UriSegmentInvalid"
|
|
2180
|
+
| "TotpNotConfigured"
|
|
2181
|
+
| "FidoKeyNotFound"
|
|
2182
|
+
| "FidoChallengeNotFound"
|
|
2183
|
+
| "TotpChallengeNotFound"
|
|
2184
|
+
| "UserExportRequestNotFound"
|
|
2185
|
+
| "UserExportCiphertextNotFound";
|
|
1918
2186
|
/**
|
|
1919
2187
|
* @description Represents a globally unique OIDC-authorized user by expressing the full "path" to a user. That is:
|
|
1920
2188
|
*
|
|
1921
2189
|
* (iss) (sub)
|
|
1922
2190
|
* Issuer -> Subresource
|
|
1923
|
-
*
|
|
1924
|
-
* We include a non-standard third-tier `disambiguator` which allows us to map
|
|
1925
|
-
* a single OIDC user to multiple `User`s in CubeSigner
|
|
1926
2191
|
*/
|
|
1927
2192
|
OIDCIdentity: {
|
|
1928
2193
|
/**
|
|
@@ -2043,6 +2308,21 @@ export interface components {
|
|
|
2043
2308
|
*/
|
|
2044
2309
|
"page.start"?: string | null;
|
|
2045
2310
|
};
|
|
2311
|
+
/**
|
|
2312
|
+
* @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
|
|
2313
|
+
* value (which can the user pass back to use as a url query parameter to continue pagination).
|
|
2314
|
+
*/
|
|
2315
|
+
PaginatedListKeyRolesResponse: {
|
|
2316
|
+
/** @description All roles the key is in */
|
|
2317
|
+
roles: components["schemas"]["KeyInRoleInfo"][];
|
|
2318
|
+
} & {
|
|
2319
|
+
/**
|
|
2320
|
+
* @description If set, the content of `response` does not contain the entire result set.
|
|
2321
|
+
* To fetch the next page of the result set, call the same endpoint
|
|
2322
|
+
* but specify this value as the 'page.start' query parameter.
|
|
2323
|
+
*/
|
|
2324
|
+
last_evaluated_key?: string | null;
|
|
2325
|
+
};
|
|
2046
2326
|
/**
|
|
2047
2327
|
* @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
|
|
2048
2328
|
* value (which can the user pass back to use as a url query parameter to continue pagination).
|
|
@@ -2131,6 +2411,42 @@ export interface components {
|
|
|
2131
2411
|
*/
|
|
2132
2412
|
last_evaluated_key?: string | null;
|
|
2133
2413
|
};
|
|
2414
|
+
PolicyErrorCode:
|
|
2415
|
+
| components["schemas"]["PolicyErrorOwnCodes"]
|
|
2416
|
+
| components["schemas"]["EvmTxDepositErrorCode"];
|
|
2417
|
+
/** @enum {string} */
|
|
2418
|
+
PolicyErrorOwnCodes:
|
|
2419
|
+
| "EvmTxReceiverMismatch"
|
|
2420
|
+
| "EvmTxSenderMismatch"
|
|
2421
|
+
| "PolicyDisjunctionError"
|
|
2422
|
+
| "PolicyNegationError"
|
|
2423
|
+
| "Eth2ExceededMaxUnstake"
|
|
2424
|
+
| "Eth2ConcurrentUnstaking"
|
|
2425
|
+
| "NotInIpv4Allowlist"
|
|
2426
|
+
| "NotInOriginAllowlist"
|
|
2427
|
+
| "InvalidSourceIp"
|
|
2428
|
+
| "RawSigningNotAllowed"
|
|
2429
|
+
| "Eip712SigningNotAllowed"
|
|
2430
|
+
| "OidcSourceNotAllowed"
|
|
2431
|
+
| "NoOidcAuthSourcesDefined"
|
|
2432
|
+
| "AddKeyToRoleDisallowed"
|
|
2433
|
+
| "KeysAlreadyInRole"
|
|
2434
|
+
| "KeyInMultipleRoles"
|
|
2435
|
+
| "KeyAccessError"
|
|
2436
|
+
| "Eip191SigningNotAllowed";
|
|
2437
|
+
PreconditionErrorCode:
|
|
2438
|
+
| components["schemas"]["PreconditionErrorOwnCodes"]
|
|
2439
|
+
| components["schemas"]["PolicyErrorCode"];
|
|
2440
|
+
/** @enum {string} */
|
|
2441
|
+
PreconditionErrorOwnCodes:
|
|
2442
|
+
| "Eth2ProposerSlotTooLow"
|
|
2443
|
+
| "Eth2AttestationSourceEpochTooLow"
|
|
2444
|
+
| "Eth2AttestationTargetEpochTooLow"
|
|
2445
|
+
| "Eth2ConcurrentBlockSigning"
|
|
2446
|
+
| "Eth2ConcurrentAttestationSigning"
|
|
2447
|
+
| "Eth2MultiDepositToNonGeneratedKey"
|
|
2448
|
+
| "Eth2MultiDepositUnknownInitialDeposit"
|
|
2449
|
+
| "Eth2MultiDepositWithdrawalAddressMismatch";
|
|
2134
2450
|
/**
|
|
2135
2451
|
* @description This type represents a wire-encodable form of the PublicKeyCredential interface
|
|
2136
2452
|
* Clients may need to manually encode into this format to communicate with the server
|
|
@@ -2554,6 +2870,17 @@ export interface components {
|
|
|
2554
2870
|
/** @description The list of sessions */
|
|
2555
2871
|
sessions: components["schemas"]["SessionInfo"][];
|
|
2556
2872
|
};
|
|
2873
|
+
SignerErrorCode:
|
|
2874
|
+
| components["schemas"]["SignerErrorOwnCodes"]
|
|
2875
|
+
| components["schemas"]["AcceptedValueCode"]
|
|
2876
|
+
| components["schemas"]["BadRequestErrorCode"]
|
|
2877
|
+
| components["schemas"]["NotFoundErrorCode"]
|
|
2878
|
+
| components["schemas"]["ForbiddenErrorCode"]
|
|
2879
|
+
| components["schemas"]["UnauthorizedErrorCode"]
|
|
2880
|
+
| components["schemas"]["PreconditionErrorCode"]
|
|
2881
|
+
| components["schemas"]["InternalErrorCode"];
|
|
2882
|
+
/** @enum {string} */
|
|
2883
|
+
SignerErrorOwnCodes: "UnhandledError" | "ProxyStartError" | "EnclaveError";
|
|
2557
2884
|
/**
|
|
2558
2885
|
* @example {
|
|
2559
2886
|
* "message_base64": "AQABA8OKVzLEjststN4xXr39kLKHT8d58eQY1QEs6MeXwEFBrxTAlULX1troLbWxuAXQqgbQofGi6z8fJi7KAAIf7YMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJK0tn39k28s+X86W47EvbRRKnYBVQ8Q/l2m1EbfT7+vAQICAAEMAgAAAGQAAAAAAAAA"
|
|
@@ -2659,6 +2986,12 @@ export interface components {
|
|
|
2659
2986
|
/** @description The name of the issuer; defaults to "Cubist". */
|
|
2660
2987
|
issuer?: string | null;
|
|
2661
2988
|
};
|
|
2989
|
+
/** @enum {string} */
|
|
2990
|
+
UnauthorizedErrorCode:
|
|
2991
|
+
| "ClaimsHeaderMissing"
|
|
2992
|
+
| "ClaimsParseError"
|
|
2993
|
+
| "OidcIdentityHeaderMissing"
|
|
2994
|
+
| "OidcIdentityParseError";
|
|
2662
2995
|
/** @description Options that should be set only for local devnet testing. */
|
|
2663
2996
|
UnsafeConf: {
|
|
2664
2997
|
/**
|
|
@@ -2974,12 +3307,20 @@ export interface components {
|
|
|
2974
3307
|
user_id: string;
|
|
2975
3308
|
};
|
|
2976
3309
|
UserInfo: {
|
|
2977
|
-
/**
|
|
3310
|
+
/**
|
|
3311
|
+
* @description Optional email
|
|
3312
|
+
* @example alice@example.com
|
|
3313
|
+
*/
|
|
2978
3314
|
email: string;
|
|
2979
3315
|
/** @description All multi-factor authentication methods configured for this user */
|
|
2980
3316
|
mfa: components["schemas"]["ConfiguredMfa"][];
|
|
2981
3317
|
/** @description MFA policy, applies before logging in and other sensitive operations */
|
|
2982
3318
|
mfa_policy?: unknown;
|
|
3319
|
+
/**
|
|
3320
|
+
* @description Optional name
|
|
3321
|
+
* @example Alice
|
|
3322
|
+
*/
|
|
3323
|
+
name?: string | null;
|
|
2983
3324
|
/**
|
|
2984
3325
|
* @description All organizations the user belongs to
|
|
2985
3326
|
* @example [
|
|
@@ -3405,6 +3746,21 @@ export interface components {
|
|
|
3405
3746
|
};
|
|
3406
3747
|
};
|
|
3407
3748
|
};
|
|
3749
|
+
PaginatedListKeyRolesResponse: {
|
|
3750
|
+
content: {
|
|
3751
|
+
"application/json": {
|
|
3752
|
+
/** @description All roles the key is in */
|
|
3753
|
+
roles: components["schemas"]["KeyInRoleInfo"][];
|
|
3754
|
+
} & {
|
|
3755
|
+
/**
|
|
3756
|
+
* @description If set, the content of `response` does not contain the entire result set.
|
|
3757
|
+
* To fetch the next page of the result set, call the same endpoint
|
|
3758
|
+
* but specify this value as the 'page.start' query parameter.
|
|
3759
|
+
*/
|
|
3760
|
+
last_evaluated_key?: string | null;
|
|
3761
|
+
};
|
|
3762
|
+
};
|
|
3763
|
+
};
|
|
3408
3764
|
PaginatedListKeysResponse: {
|
|
3409
3765
|
content: {
|
|
3410
3766
|
"application/json": {
|
|
@@ -3722,12 +4078,20 @@ export interface components {
|
|
|
3722
4078
|
UserInfo: {
|
|
3723
4079
|
content: {
|
|
3724
4080
|
"application/json": {
|
|
3725
|
-
/**
|
|
4081
|
+
/**
|
|
4082
|
+
* @description Optional email
|
|
4083
|
+
* @example alice@example.com
|
|
4084
|
+
*/
|
|
3726
4085
|
email: string;
|
|
3727
4086
|
/** @description All multi-factor authentication methods configured for this user */
|
|
3728
4087
|
mfa: components["schemas"]["ConfiguredMfa"][];
|
|
3729
4088
|
/** @description MFA policy, applies before logging in and other sensitive operations */
|
|
3730
4089
|
mfa_policy?: unknown;
|
|
4090
|
+
/**
|
|
4091
|
+
* @description Optional name
|
|
4092
|
+
* @example Alice
|
|
4093
|
+
*/
|
|
4094
|
+
name?: string | null;
|
|
3731
4095
|
/**
|
|
3732
4096
|
* @description All organizations the user belongs to
|
|
3733
4097
|
* @example [
|
|
@@ -4362,6 +4726,51 @@ export interface operations {
|
|
|
4362
4726
|
};
|
|
4363
4727
|
};
|
|
4364
4728
|
};
|
|
4729
|
+
/**
|
|
4730
|
+
* List Key Roles
|
|
4731
|
+
* @description List Key Roles
|
|
4732
|
+
*
|
|
4733
|
+
* Get all roles the key is in
|
|
4734
|
+
*/
|
|
4735
|
+
listKeyRoles: {
|
|
4736
|
+
parameters: {
|
|
4737
|
+
query?: {
|
|
4738
|
+
/**
|
|
4739
|
+
* @description Max number of items to return per page.
|
|
4740
|
+
*
|
|
4741
|
+
* If the actual number of returned items may be less that this, even if there exist more
|
|
4742
|
+
* data in the result set. To reliably determine if more data is left in the result set,
|
|
4743
|
+
* inspect the [UnencryptedLastEvalKey] value in the response object.
|
|
4744
|
+
*/
|
|
4745
|
+
"page.size"?: number;
|
|
4746
|
+
/**
|
|
4747
|
+
* @description The start of the page. Omit to start from the beginning; otherwise, only specify a
|
|
4748
|
+
* the exact value previously returned as 'last_evaluated_key' from the same endpoint.
|
|
4749
|
+
*/
|
|
4750
|
+
"page.start"?: components["schemas"]["LastEvalKey"] | null;
|
|
4751
|
+
};
|
|
4752
|
+
path: {
|
|
4753
|
+
/**
|
|
4754
|
+
* @description Name or ID of the desired Org
|
|
4755
|
+
* @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
4756
|
+
*/
|
|
4757
|
+
org_id: string;
|
|
4758
|
+
/**
|
|
4759
|
+
* @description ID of the desired Key
|
|
4760
|
+
* @example Key#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
4761
|
+
*/
|
|
4762
|
+
key_id: string;
|
|
4763
|
+
};
|
|
4764
|
+
};
|
|
4765
|
+
responses: {
|
|
4766
|
+
200: components["responses"]["PaginatedListKeyRolesResponse"];
|
|
4767
|
+
default: {
|
|
4768
|
+
content: {
|
|
4769
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
4770
|
+
};
|
|
4771
|
+
};
|
|
4772
|
+
};
|
|
4773
|
+
};
|
|
4365
4774
|
/**
|
|
4366
4775
|
* List Pending MFA Requests
|
|
4367
4776
|
* @description List Pending MFA Requests
|
|
@@ -4419,16 +4828,23 @@ export interface operations {
|
|
|
4419
4828
|
};
|
|
4420
4829
|
};
|
|
4421
4830
|
/**
|
|
4422
|
-
* Approve MFA Request
|
|
4423
|
-
* @description Approve MFA Request
|
|
4831
|
+
* Approve or Reject MFA Request
|
|
4832
|
+
* @description Approve or Reject MFA Request
|
|
4424
4833
|
*
|
|
4425
|
-
* Approve request after logging in with CubeSigner.
|
|
4834
|
+
* Approve or reject request after logging in with CubeSigner.
|
|
4835
|
+
*
|
|
4836
|
+
* If approving, adds the currently-logged user as an approver
|
|
4426
4837
|
* of a pending MFA request of the [Status::RequiredApprovers] kind. If the required number of
|
|
4427
4838
|
* approvers is reached, the MFA request is approved; the confirmation receipt can be used to
|
|
4428
4839
|
* resume the original HTTP request.
|
|
4840
|
+
*
|
|
4841
|
+
* If rejecting, immediately deletes the pending MFA request.
|
|
4429
4842
|
*/
|
|
4430
|
-
|
|
4843
|
+
mfaVoteCs: {
|
|
4431
4844
|
parameters: {
|
|
4845
|
+
query?: {
|
|
4846
|
+
mfa_vote?: components["schemas"]["MfaVote"] | null;
|
|
4847
|
+
};
|
|
4432
4848
|
path: {
|
|
4433
4849
|
/**
|
|
4434
4850
|
* @description Name or ID of the desired Org
|
|
@@ -4452,12 +4868,12 @@ export interface operations {
|
|
|
4452
4868
|
};
|
|
4453
4869
|
};
|
|
4454
4870
|
/**
|
|
4455
|
-
* Initiate
|
|
4456
|
-
* @description Initiate
|
|
4871
|
+
* Initiate a FIDO MFA Approval/Rejection
|
|
4872
|
+
* @description Initiate a FIDO MFA Approval/Rejection
|
|
4457
4873
|
*
|
|
4458
|
-
* Initiates the approval process of an MFA Request using FIDO.
|
|
4874
|
+
* Initiates the approval/rejection process of an MFA Request using FIDO.
|
|
4459
4875
|
*/
|
|
4460
|
-
|
|
4876
|
+
mfaFidoInit: {
|
|
4461
4877
|
parameters: {
|
|
4462
4878
|
path: {
|
|
4463
4879
|
/**
|
|
@@ -4482,16 +4898,20 @@ export interface operations {
|
|
|
4482
4898
|
};
|
|
4483
4899
|
};
|
|
4484
4900
|
/**
|
|
4485
|
-
* Finalize a FIDO MFA Approval
|
|
4486
|
-
* @description Finalize a FIDO MFA Approval
|
|
4487
|
-
*
|
|
4488
|
-
* Adds an approver to a pending MFA request.
|
|
4901
|
+
* Finalize a FIDO MFA Approval/Rejection
|
|
4902
|
+
* @description Finalize a FIDO MFA Approval/Rejection
|
|
4489
4903
|
*
|
|
4904
|
+
* If approving, adds an approver to a pending MFA request.
|
|
4490
4905
|
* If the required number of approvers is reached, the MFA request is approved;
|
|
4491
4906
|
* the confirmation receipt can be used to resume the original HTTP request.
|
|
4907
|
+
*
|
|
4908
|
+
* If rejecting, immediately deletes the pending MFA request.
|
|
4492
4909
|
*/
|
|
4493
|
-
|
|
4910
|
+
mfaVoteFidoComplete: {
|
|
4494
4911
|
parameters: {
|
|
4912
|
+
query?: {
|
|
4913
|
+
mfa_vote?: components["schemas"]["MfaVote"] | null;
|
|
4914
|
+
};
|
|
4495
4915
|
path: {
|
|
4496
4916
|
/**
|
|
4497
4917
|
* @description Name or ID of the desired Org
|
|
@@ -4520,16 +4940,20 @@ export interface operations {
|
|
|
4520
4940
|
};
|
|
4521
4941
|
};
|
|
4522
4942
|
/**
|
|
4523
|
-
* Approve a TOTP MFA Request
|
|
4524
|
-
* @description Approve a TOTP MFA Request
|
|
4943
|
+
* Approve/Reject a TOTP MFA Request
|
|
4944
|
+
* @description Approve/Reject a TOTP MFA Request
|
|
4525
4945
|
*
|
|
4526
|
-
*
|
|
4946
|
+
* If approving, adds the current user as approver to a pending MFA request by
|
|
4947
|
+
* providing TOTP code. If the required number of approvers is reached, the MFA request is
|
|
4948
|
+
* approved; the confirmation receipt can be used to resume the original HTTP request.
|
|
4527
4949
|
*
|
|
4528
|
-
* If
|
|
4529
|
-
* the confirmation receipt can be used to resume the original HTTP request.
|
|
4950
|
+
* If rejecting, immediately deletes the pending MFA request.
|
|
4530
4951
|
*/
|
|
4531
|
-
|
|
4952
|
+
mfaVoteTotp: {
|
|
4532
4953
|
parameters: {
|
|
4954
|
+
query?: {
|
|
4955
|
+
mfa_vote?: components["schemas"]["MfaVote"] | null;
|
|
4956
|
+
};
|
|
4533
4957
|
path: {
|
|
4534
4958
|
/**
|
|
4535
4959
|
* @description Name or ID of the desired Org
|
|
@@ -5082,6 +5506,35 @@ export interface operations {
|
|
|
5082
5506
|
};
|
|
5083
5507
|
};
|
|
5084
5508
|
};
|
|
5509
|
+
/**
|
|
5510
|
+
* Remove User
|
|
5511
|
+
* @description Remove User
|
|
5512
|
+
*
|
|
5513
|
+
* Removes an existing user from an existing role.
|
|
5514
|
+
* Only users in the role or org owners can remove users from a role.
|
|
5515
|
+
*/
|
|
5516
|
+
removeUserFromRole: {
|
|
5517
|
+
parameters: {
|
|
5518
|
+
path: {
|
|
5519
|
+
/**
|
|
5520
|
+
* @description Name or ID of the desired Org
|
|
5521
|
+
* @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
5522
|
+
*/
|
|
5523
|
+
org_id: string;
|
|
5524
|
+
/**
|
|
5525
|
+
* @description Name or ID of the desired Role
|
|
5526
|
+
* @example Role#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
5527
|
+
*/
|
|
5528
|
+
role_id: string;
|
|
5529
|
+
/**
|
|
5530
|
+
* @description ID of the desired User
|
|
5531
|
+
* @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
5532
|
+
*/
|
|
5533
|
+
user_id: string;
|
|
5534
|
+
};
|
|
5535
|
+
};
|
|
5536
|
+
responses: {};
|
|
5537
|
+
};
|
|
5085
5538
|
/**
|
|
5086
5539
|
* List sessions
|
|
5087
5540
|
* @description List sessions
|