@sphereon/ssi-sdk.kms-rest-client 0.36.1-next.47 → 0.36.1-next.70
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/index.cjs +85 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -52
- package/dist/index.d.ts +31 -52
- package/dist/index.js +85 -20
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/KmsRestClient.ts +55 -42
- package/src/models/SignatureAlgorithm.ts +3 -0
- package/src/types/IKmsRestClient.ts +43 -60
package/dist/index.d.cts
CHANGED
|
@@ -1914,6 +1914,9 @@ declare const SignatureAlgorithm: {
|
|
|
1914
1914
|
readonly HmacSha256: "HMAC_SHA256";
|
|
1915
1915
|
readonly HmacSha384: "HMAC_SHA384";
|
|
1916
1916
|
readonly HmacSha512: "HMAC_SHA512";
|
|
1917
|
+
readonly RsaSha256: "RSA_SHA256";
|
|
1918
|
+
readonly RsaSha384: "RSA_SHA384";
|
|
1919
|
+
readonly RsaSha512: "RSA_SHA512";
|
|
1917
1920
|
readonly RsaSsaPssSha256Mgf1: "RSA_SSA_PSS_SHA256_MGF1";
|
|
1918
1921
|
readonly RsaSsaPssSha384Mgf1: "RSA_SSA_PSS_SHA384_MGF1";
|
|
1919
1922
|
readonly RsaSsaPssSha512Mgf1: "RSA_SSA_PSS_SHA512_MGF1";
|
|
@@ -3829,7 +3832,7 @@ declare function VerifySimpleSignatureToJSON(json: any): VerifySimpleSignature;
|
|
|
3829
3832
|
declare function VerifySimpleSignatureToJSONTyped(value?: VerifySimpleSignature | null, ignoreDiscriminator?: boolean): any;
|
|
3830
3833
|
|
|
3831
3834
|
interface IKmsRestClient extends IPluginMethodMap {
|
|
3832
|
-
kmsClientGetResolver(args:
|
|
3835
|
+
kmsClientGetResolver(args: KmsClientGetResolverArgs): Promise<Resolver>;
|
|
3833
3836
|
kmsClientListResolvers(args?: KmsClientListResolversArgs): Promise<ListResolversResponse>;
|
|
3834
3837
|
kmsClientResolveKey(args: KmsClientResolveKeyArgs): Promise<ResolvedKeyInfo>;
|
|
3835
3838
|
kmsClientCreateRawSignature(args: KmsClientCreateRawSignatureArgs): Promise<CreateRawSignatureResponse>;
|
|
@@ -3847,68 +3850,44 @@ interface IKmsRestClient extends IPluginMethodMap {
|
|
|
3847
3850
|
kmsClientProviderGetKey(args: KmsClientProviderGetKeyArgs): Promise<GetKeyResponse>;
|
|
3848
3851
|
kmsClientProviderDeleteKey(args: KmsClientProviderDeleteKeyArgs): Promise<boolean>;
|
|
3849
3852
|
}
|
|
3850
|
-
type
|
|
3853
|
+
type BaseArgs = {
|
|
3851
3854
|
baseUrl?: string;
|
|
3855
|
+
tenantId?: string;
|
|
3856
|
+
userId?: string;
|
|
3852
3857
|
};
|
|
3853
|
-
type
|
|
3854
|
-
|
|
3858
|
+
type OptionalProviderContextArgs = BaseArgs & {
|
|
3859
|
+
providerId?: string;
|
|
3860
|
+
};
|
|
3861
|
+
type ProviderContextArgs = BaseArgs & {
|
|
3862
|
+
providerId: string;
|
|
3863
|
+
};
|
|
3864
|
+
type KmsClientListResolversArgs = BaseArgs;
|
|
3865
|
+
type KmsClientGetResolverArgs = BaseArgs & {
|
|
3855
3866
|
resolverId: string;
|
|
3856
3867
|
};
|
|
3857
|
-
type KmsClientResolveKeyArgs = {
|
|
3858
|
-
baseUrl?: string;
|
|
3868
|
+
type KmsClientResolveKeyArgs = BaseArgs & {
|
|
3859
3869
|
resolverId: String;
|
|
3860
3870
|
} & ResolvePublicKey;
|
|
3861
|
-
type KmsClientCreateRawSignatureArgs =
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
type KmsClientIsValidRawSignatureArgs = {
|
|
3865
|
-
baseUrl?: string;
|
|
3866
|
-
} & VerifyRawSignature;
|
|
3867
|
-
type KmsClientGetKeyArgs = {
|
|
3868
|
-
baseUrl?: string;
|
|
3871
|
+
type KmsClientCreateRawSignatureArgs = BaseArgs & CreateRawSignature;
|
|
3872
|
+
type KmsClientIsValidRawSignatureArgs = BaseArgs & VerifyRawSignature;
|
|
3873
|
+
type KmsClientGetKeyArgs = BaseArgs & OptionalProviderContextArgs & {
|
|
3869
3874
|
aliasOrKid: string;
|
|
3870
3875
|
};
|
|
3871
|
-
type KmsClientListKeysArgs =
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
type KmsClientStoreKeyArgs = {
|
|
3876
|
-
baseUrl?: string;
|
|
3877
|
-
} & StoreKey;
|
|
3878
|
-
type KmsClientGenerateKeyArgs = {
|
|
3879
|
-
baseUrl?: string;
|
|
3880
|
-
} & GenerateKeyGlobal;
|
|
3881
|
-
type KmsClientDeleteKeyArgs = {
|
|
3882
|
-
baseUrl?: string;
|
|
3876
|
+
type KmsClientListKeysArgs = BaseArgs & OptionalProviderContextArgs;
|
|
3877
|
+
type KmsClientStoreKeyArgs = BaseArgs & StoreKey;
|
|
3878
|
+
type KmsClientGenerateKeyArgs = BaseArgs & OptionalProviderContextArgs & GenerateKeyGlobal;
|
|
3879
|
+
type KmsClientDeleteKeyArgs = BaseArgs & OptionalProviderContextArgs & {
|
|
3883
3880
|
aliasOrKid: string;
|
|
3884
3881
|
};
|
|
3885
|
-
type KmsClientGetKeyProviderArgs =
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
type
|
|
3890
|
-
|
|
3891
|
-
};
|
|
3892
|
-
type KmsClientProviderListKeysArgs = {
|
|
3893
|
-
baseUrl?: string;
|
|
3894
|
-
providerId: string;
|
|
3895
|
-
};
|
|
3896
|
-
type KmsClientProviderStoreKeyArgs = {
|
|
3897
|
-
baseUrl?: string;
|
|
3898
|
-
providerId: string;
|
|
3899
|
-
} & StoreKey;
|
|
3900
|
-
type KmsClientProviderGenerateKeyArgs = {
|
|
3901
|
-
baseUrl?: string;
|
|
3902
|
-
providerId: string;
|
|
3903
|
-
} & GenerateKey;
|
|
3904
|
-
type KmsClientProviderGetKeyArgs = {
|
|
3905
|
-
baseUrl?: string;
|
|
3906
|
-
providerId: string;
|
|
3882
|
+
type KmsClientGetKeyProviderArgs = BaseArgs & ProviderContextArgs;
|
|
3883
|
+
type KmsClientListKeyProvidersArgs = BaseArgs;
|
|
3884
|
+
type KmsClientProviderListKeysArgs = BaseArgs & ProviderContextArgs;
|
|
3885
|
+
type KmsClientProviderStoreKeyArgs = BaseArgs & ProviderContextArgs & StoreKey;
|
|
3886
|
+
type KmsClientProviderGenerateKeyArgs = BaseArgs & ProviderContextArgs & GenerateKey;
|
|
3887
|
+
type KmsClientProviderGetKeyArgs = BaseArgs & ProviderContextArgs & {
|
|
3907
3888
|
aliasOrKid: string;
|
|
3908
3889
|
};
|
|
3909
|
-
type KmsClientProviderDeleteKeyArgs = {
|
|
3910
|
-
baseUrl?: string;
|
|
3911
|
-
providerId: string;
|
|
3890
|
+
type KmsClientProviderDeleteKeyArgs = BaseArgs & ProviderContextArgs & {
|
|
3912
3891
|
aliasOrKid: string;
|
|
3913
3892
|
};
|
|
3914
3893
|
type RestClientAuthenticationOpts = {
|
|
@@ -3970,4 +3949,4 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3970
3949
|
private handleHttpError;
|
|
3971
3950
|
}
|
|
3972
3951
|
|
|
3973
|
-
export { type AwsAssumeRoleCredentials, AwsAssumeRoleCredentialsFromJSON, AwsAssumeRoleCredentialsFromJSONTyped, AwsAssumeRoleCredentialsToJSON, AwsAssumeRoleCredentialsToJSONTyped, type AwsClientConfiguration, AwsClientConfigurationFromJSON, AwsClientConfigurationFromJSONTyped, AwsClientConfigurationToJSON, AwsClientConfigurationToJSONTyped, type AwsKmsSetting, AwsKmsSettingFromJSON, AwsKmsSettingFromJSONTyped, AwsKmsSettingToJSON, AwsKmsSettingToJSONTyped, type AwsStaticCredentials, AwsStaticCredentialsFromJSON, AwsStaticCredentialsFromJSONTyped, AwsStaticCredentialsToJSON, AwsStaticCredentialsToJSONTyped, type AwsWebIdentityTokenCredentials, AwsWebIdentityTokenCredentialsFromJSON, AwsWebIdentityTokenCredentialsFromJSONTyped, AwsWebIdentityTokenCredentialsToJSON, AwsWebIdentityTokenCredentialsToJSONTyped, type AzureClientSecretCredentialOpts, AzureClientSecretCredentialOptsFromJSON, AzureClientSecretCredentialOptsFromJSONTyped, AzureClientSecretCredentialOptsToJSON, AzureClientSecretCredentialOptsToJSONTyped, type AzureCredentialOpts, AzureCredentialOptsFromJSON, AzureCredentialOptsFromJSONTyped, AzureCredentialOptsToJSON, AzureCredentialOptsToJSONTyped, type AzureKeyVaultSetting, AzureKeyVaultSettingFromJSON, AzureKeyVaultSettingFromJSONTyped, AzureKeyVaultSettingToJSON, AzureKeyVaultSettingToJSONTyped, type CoseKey, CoseKeyFromJSON, CoseKeyFromJSONTyped, type CoseKeyPair, CoseKeyPairFromJSON, CoseKeyPairFromJSONTyped, CoseKeyPairToJSON, CoseKeyPairToJSONTyped, CoseKeyToJSON, CoseKeyToJSONTyped, CoseKeyType, CoseKeyTypeFromJSON, CoseKeyTypeFromJSONTyped, CoseKeyTypeToJSON, CoseKeyTypeToJSONTyped, type CreateKeyProvider, CreateKeyProviderFromJSON, CreateKeyProviderFromJSONTyped, CreateKeyProviderToJSON, CreateKeyProviderToJSONTyped, type CreateRawSignature, CreateRawSignatureFromJSON, CreateRawSignatureFromJSONTyped, type CreateRawSignatureResponse, CreateRawSignatureResponseFromJSON, CreateRawSignatureResponseFromJSONTyped, CreateRawSignatureResponseToJSON, CreateRawSignatureResponseToJSONTyped, CreateRawSignatureToJSON, CreateRawSignatureToJSONTyped, type CreateSimpleSignature, CreateSimpleSignatureFromJSON, CreateSimpleSignatureFromJSONTyped, CreateSimpleSignatureToJSON, CreateSimpleSignatureToJSONTyped, CryptoAlg, CryptoAlgFromJSON, CryptoAlgFromJSONTyped, CryptoAlgToJSON, CryptoAlgToJSONTyped, Curve, CurveFromJSON, CurveFromJSONTyped, CurveToJSON, CurveToJSONTyped, DigestAlg, DigestAlgFromJSON, DigestAlgFromJSONTyped, DigestAlgToJSON, DigestAlgToJSONTyped, type ErrorResponse, ErrorResponseFromJSON, ErrorResponseFromJSONTyped, ErrorResponseToJSON, ErrorResponseToJSONTyped, type GenerateKey, GenerateKeyFromJSON, GenerateKeyFromJSONTyped, type GenerateKeyGlobal, GenerateKeyGlobalFromJSON, GenerateKeyGlobalFromJSONTyped, GenerateKeyGlobalToJSON, GenerateKeyGlobalToJSONTyped, type GenerateKeyResponse, GenerateKeyResponseFromJSON, GenerateKeyResponseFromJSONTyped, GenerateKeyResponseToJSON, GenerateKeyResponseToJSONTyped, GenerateKeyToJSON, GenerateKeyToJSONTyped, type GetKeyResponse, GetKeyResponseFromJSON, GetKeyResponseFromJSONTyped, GetKeyResponseToJSON, GetKeyResponseToJSONTyped, type IKmsRestClient, type IRequiredContext, IdentifierMethod, IdentifierMethodFromJSON, IdentifierMethodFromJSONTyped, IdentifierMethodToJSON, IdentifierMethodToJSONTyped, type JoseKeyPair, JoseKeyPairFromJSON, JoseKeyPairFromJSONTyped, JoseKeyPairToJSON, JoseKeyPairToJSONTyped, type Jwk, JwkFromJSON, JwkFromJSONTyped, JwkKeyType, JwkKeyTypeFromJSON, JwkKeyTypeFromJSONTyped, JwkKeyTypeToJSON, JwkKeyTypeToJSONTyped, JwkToJSON, JwkToJSONTyped, JwkUse, JwkUseFromJSON, JwkUseFromJSONTyped, JwkUseToJSON, JwkUseToJSONTyped, KeyEncoding, KeyEncodingFromJSON, KeyEncodingFromJSONTyped, KeyEncodingToJSON, KeyEncodingToJSONTyped, type KeyInfo, KeyInfoFromJSON, KeyInfoFromJSONTyped, KeyInfoToJSON, KeyInfoToJSONTyped, KeyOperations, KeyOperationsFromJSON, KeyOperationsFromJSONTyped, KeyOperationsToJSON, KeyOperationsToJSONTyped, type KeyProvider, KeyProviderFromJSON, KeyProviderFromJSONTyped, type KeyProviderResponse, KeyProviderResponseFromJSON, KeyProviderResponseFromJSONTyped, KeyProviderResponseToJSON, KeyProviderResponseToJSONTyped, KeyProviderToJSON, KeyProviderToJSONTyped, KeyProviderType, KeyProviderTypeFromJSON, KeyProviderTypeFromJSONTyped, KeyProviderTypeToJSON, KeyProviderTypeToJSONTyped, type KeyResolver, KeyResolverFromJSON, KeyResolverFromJSONTyped, KeyResolverToJSON, KeyResolverToJSONTyped, KeyType, KeyTypeFromJSON, KeyTypeFromJSONTyped, KeyTypeToJSON, KeyTypeToJSONTyped, KeyVisibility, KeyVisibilityFromJSON, KeyVisibilityFromJSONTyped, KeyVisibilityToJSON, KeyVisibilityToJSONTyped, type KmsClientCreateRawSignatureArgs, type KmsClientDeleteKeyArgs, type KmsClientGenerateKeyArgs, type KmsClientGetKeyArgs, type KmsClientGetKeyProviderArgs, type KmsClientIsValidRawSignatureArgs, type KmsClientListKeyProvidersArgs, type KmsClientListKeysArgs, type KmsClientListResolversArgs, type KmsClientProviderDeleteKeyArgs, type KmsClientProviderGenerateKeyArgs, type KmsClientProviderGetKeyArgs, type KmsClientProviderListKeysArgs, type KmsClientProviderStoreKeyArgs, type KmsClientResolveKeyArgs, type KmsClientStoreKeyArgs, KmsRestClient, type KmsRestClientArgs, type ListKeyProvidersResponse, ListKeyProvidersResponseFromJSON, ListKeyProvidersResponseFromJSONTyped, ListKeyProvidersResponseToJSON, ListKeyProvidersResponseToJSONTyped, type ListKeysResponse, ListKeysResponseFromJSON, ListKeysResponseFromJSONTyped, ListKeysResponseToJSON, ListKeysResponseToJSONTyped, type ListResolversResponse, ListResolversResponseFromJSON, ListResolversResponseFromJSONTyped, ListResolversResponseToJSON, ListResolversResponseToJSONTyped, LookupMode, LookupModeFromJSON, LookupModeFromJSONTyped, LookupModeToJSON, LookupModeToJSONTyped, type ManagedKeyInfo, ManagedKeyInfoFromJSON, ManagedKeyInfoFromJSONTyped, ManagedKeyInfoToJSON, ManagedKeyInfoToJSONTyped, type ManagedKeyPair, ManagedKeyPairFromJSON, ManagedKeyPairFromJSONTyped, ManagedKeyPairToJSON, ManagedKeyPairToJSONTyped, MaskGenFunction, MaskGenFunctionFromJSON, MaskGenFunctionFromJSONTyped, MaskGenFunctionToJSON, MaskGenFunctionToJSONTyped, type ProviderCapabilities, ProviderCapabilitiesFromJSON, ProviderCapabilitiesFromJSONTyped, ProviderCapabilitiesToJSON, ProviderCapabilitiesToJSONTyped, type ResolvePublicKey, ResolvePublicKeyFromJSON, ResolvePublicKeyFromJSONTyped, ResolvePublicKeyToJSON, ResolvePublicKeyToJSONTyped, type ResolvedKeyInfo, ResolvedKeyInfoFromJSON, ResolvedKeyInfoFromJSONTyped, ResolvedKeyInfoToJSON, ResolvedKeyInfoToJSONTyped, type Resolver, ResolverFromJSON, ResolverFromJSONTyped, ResolverToJSON, ResolverToJSONTyped, type RestClientAuthenticationOpts, type SignInput, SignInputFromJSON, SignInputFromJSONTyped, SignInputModeEnum, SignInputToJSON, SignInputToJSONTyped, type SignOutput, SignOutputFromJSON, SignOutputFromJSONTyped, SignOutputToJSON, SignOutputToJSONTyped, type Signature, SignatureAlgorithm, SignatureAlgorithmFromJSON, SignatureAlgorithmFromJSONTyped, SignatureAlgorithmToJSON, SignatureAlgorithmToJSONTyped, SignatureFromJSON, SignatureFromJSONTyped, SignatureToJSON, SignatureToJSONTyped, type StoreKey, StoreKeyFromJSON, StoreKeyFromJSONTyped, type StoreKeyResponse, StoreKeyResponseFromJSON, StoreKeyResponseFromJSONTyped, StoreKeyResponseToJSON, StoreKeyResponseToJSONTyped, StoreKeyToJSON, StoreKeyToJSONTyped, type UpdateKeyProvider, UpdateKeyProviderFromJSON, UpdateKeyProviderFromJSONTyped, UpdateKeyProviderToJSON, UpdateKeyProviderToJSONTyped, type VerifyRawSignature, VerifyRawSignatureFromJSON, VerifyRawSignatureFromJSONTyped, type VerifyRawSignatureResponse, VerifyRawSignatureResponseFromJSON, VerifyRawSignatureResponseFromJSONTyped, VerifyRawSignatureResponseToJSON, VerifyRawSignatureResponseToJSONTyped, VerifyRawSignatureToJSON, VerifyRawSignatureToJSONTyped, type VerifySimpleSignature, VerifySimpleSignatureFromJSON, VerifySimpleSignatureFromJSONTyped, VerifySimpleSignatureToJSON, VerifySimpleSignatureToJSONTyped, instanceOfAwsAssumeRoleCredentials, instanceOfAwsClientConfiguration, instanceOfAwsKmsSetting, instanceOfAwsStaticCredentials, instanceOfAwsWebIdentityTokenCredentials, instanceOfAzureClientSecretCredentialOpts, instanceOfAzureCredentialOpts, instanceOfAzureKeyVaultSetting, instanceOfCoseKey, instanceOfCoseKeyPair, instanceOfCoseKeyType, instanceOfCreateKeyProvider, instanceOfCreateRawSignature, instanceOfCreateRawSignatureResponse, instanceOfCreateSimpleSignature, instanceOfCryptoAlg, instanceOfCurve, instanceOfDigestAlg, instanceOfErrorResponse, instanceOfGenerateKey, instanceOfGenerateKeyGlobal, instanceOfGenerateKeyResponse, instanceOfGetKeyResponse, instanceOfIdentifierMethod, instanceOfJoseKeyPair, instanceOfJwk, instanceOfJwkKeyType, instanceOfJwkUse, instanceOfKeyEncoding, instanceOfKeyInfo, instanceOfKeyOperations, instanceOfKeyProvider, instanceOfKeyProviderResponse, instanceOfKeyProviderType, instanceOfKeyResolver, instanceOfKeyType, instanceOfKeyVisibility, instanceOfListKeyProvidersResponse, instanceOfListKeysResponse, instanceOfListResolversResponse, instanceOfLookupMode, instanceOfManagedKeyInfo, instanceOfManagedKeyPair, instanceOfMaskGenFunction, instanceOfProviderCapabilities, instanceOfResolvePublicKey, instanceOfResolvedKeyInfo, instanceOfResolver, instanceOfSignInput, instanceOfSignOutput, instanceOfSignature, instanceOfSignatureAlgorithm, instanceOfStoreKey, instanceOfStoreKeyResponse, instanceOfUpdateKeyProvider, instanceOfVerifyRawSignature, instanceOfVerifyRawSignatureResponse, instanceOfVerifySimpleSignature,
|
|
3952
|
+
export { type AwsAssumeRoleCredentials, AwsAssumeRoleCredentialsFromJSON, AwsAssumeRoleCredentialsFromJSONTyped, AwsAssumeRoleCredentialsToJSON, AwsAssumeRoleCredentialsToJSONTyped, type AwsClientConfiguration, AwsClientConfigurationFromJSON, AwsClientConfigurationFromJSONTyped, AwsClientConfigurationToJSON, AwsClientConfigurationToJSONTyped, type AwsKmsSetting, AwsKmsSettingFromJSON, AwsKmsSettingFromJSONTyped, AwsKmsSettingToJSON, AwsKmsSettingToJSONTyped, type AwsStaticCredentials, AwsStaticCredentialsFromJSON, AwsStaticCredentialsFromJSONTyped, AwsStaticCredentialsToJSON, AwsStaticCredentialsToJSONTyped, type AwsWebIdentityTokenCredentials, AwsWebIdentityTokenCredentialsFromJSON, AwsWebIdentityTokenCredentialsFromJSONTyped, AwsWebIdentityTokenCredentialsToJSON, AwsWebIdentityTokenCredentialsToJSONTyped, type AzureClientSecretCredentialOpts, AzureClientSecretCredentialOptsFromJSON, AzureClientSecretCredentialOptsFromJSONTyped, AzureClientSecretCredentialOptsToJSON, AzureClientSecretCredentialOptsToJSONTyped, type AzureCredentialOpts, AzureCredentialOptsFromJSON, AzureCredentialOptsFromJSONTyped, AzureCredentialOptsToJSON, AzureCredentialOptsToJSONTyped, type AzureKeyVaultSetting, AzureKeyVaultSettingFromJSON, AzureKeyVaultSettingFromJSONTyped, AzureKeyVaultSettingToJSON, AzureKeyVaultSettingToJSONTyped, type BaseArgs, type CoseKey, CoseKeyFromJSON, CoseKeyFromJSONTyped, type CoseKeyPair, CoseKeyPairFromJSON, CoseKeyPairFromJSONTyped, CoseKeyPairToJSON, CoseKeyPairToJSONTyped, CoseKeyToJSON, CoseKeyToJSONTyped, CoseKeyType, CoseKeyTypeFromJSON, CoseKeyTypeFromJSONTyped, CoseKeyTypeToJSON, CoseKeyTypeToJSONTyped, type CreateKeyProvider, CreateKeyProviderFromJSON, CreateKeyProviderFromJSONTyped, CreateKeyProviderToJSON, CreateKeyProviderToJSONTyped, type CreateRawSignature, CreateRawSignatureFromJSON, CreateRawSignatureFromJSONTyped, type CreateRawSignatureResponse, CreateRawSignatureResponseFromJSON, CreateRawSignatureResponseFromJSONTyped, CreateRawSignatureResponseToJSON, CreateRawSignatureResponseToJSONTyped, CreateRawSignatureToJSON, CreateRawSignatureToJSONTyped, type CreateSimpleSignature, CreateSimpleSignatureFromJSON, CreateSimpleSignatureFromJSONTyped, CreateSimpleSignatureToJSON, CreateSimpleSignatureToJSONTyped, CryptoAlg, CryptoAlgFromJSON, CryptoAlgFromJSONTyped, CryptoAlgToJSON, CryptoAlgToJSONTyped, Curve, CurveFromJSON, CurveFromJSONTyped, CurveToJSON, CurveToJSONTyped, DigestAlg, DigestAlgFromJSON, DigestAlgFromJSONTyped, DigestAlgToJSON, DigestAlgToJSONTyped, type ErrorResponse, ErrorResponseFromJSON, ErrorResponseFromJSONTyped, ErrorResponseToJSON, ErrorResponseToJSONTyped, type GenerateKey, GenerateKeyFromJSON, GenerateKeyFromJSONTyped, type GenerateKeyGlobal, GenerateKeyGlobalFromJSON, GenerateKeyGlobalFromJSONTyped, GenerateKeyGlobalToJSON, GenerateKeyGlobalToJSONTyped, type GenerateKeyResponse, GenerateKeyResponseFromJSON, GenerateKeyResponseFromJSONTyped, GenerateKeyResponseToJSON, GenerateKeyResponseToJSONTyped, GenerateKeyToJSON, GenerateKeyToJSONTyped, type GetKeyResponse, GetKeyResponseFromJSON, GetKeyResponseFromJSONTyped, GetKeyResponseToJSON, GetKeyResponseToJSONTyped, type IKmsRestClient, type IRequiredContext, IdentifierMethod, IdentifierMethodFromJSON, IdentifierMethodFromJSONTyped, IdentifierMethodToJSON, IdentifierMethodToJSONTyped, type JoseKeyPair, JoseKeyPairFromJSON, JoseKeyPairFromJSONTyped, JoseKeyPairToJSON, JoseKeyPairToJSONTyped, type Jwk, JwkFromJSON, JwkFromJSONTyped, JwkKeyType, JwkKeyTypeFromJSON, JwkKeyTypeFromJSONTyped, JwkKeyTypeToJSON, JwkKeyTypeToJSONTyped, JwkToJSON, JwkToJSONTyped, JwkUse, JwkUseFromJSON, JwkUseFromJSONTyped, JwkUseToJSON, JwkUseToJSONTyped, KeyEncoding, KeyEncodingFromJSON, KeyEncodingFromJSONTyped, KeyEncodingToJSON, KeyEncodingToJSONTyped, type KeyInfo, KeyInfoFromJSON, KeyInfoFromJSONTyped, KeyInfoToJSON, KeyInfoToJSONTyped, KeyOperations, KeyOperationsFromJSON, KeyOperationsFromJSONTyped, KeyOperationsToJSON, KeyOperationsToJSONTyped, type KeyProvider, KeyProviderFromJSON, KeyProviderFromJSONTyped, type KeyProviderResponse, KeyProviderResponseFromJSON, KeyProviderResponseFromJSONTyped, KeyProviderResponseToJSON, KeyProviderResponseToJSONTyped, KeyProviderToJSON, KeyProviderToJSONTyped, KeyProviderType, KeyProviderTypeFromJSON, KeyProviderTypeFromJSONTyped, KeyProviderTypeToJSON, KeyProviderTypeToJSONTyped, type KeyResolver, KeyResolverFromJSON, KeyResolverFromJSONTyped, KeyResolverToJSON, KeyResolverToJSONTyped, KeyType, KeyTypeFromJSON, KeyTypeFromJSONTyped, KeyTypeToJSON, KeyTypeToJSONTyped, KeyVisibility, KeyVisibilityFromJSON, KeyVisibilityFromJSONTyped, KeyVisibilityToJSON, KeyVisibilityToJSONTyped, type KmsClientCreateRawSignatureArgs, type KmsClientDeleteKeyArgs, type KmsClientGenerateKeyArgs, type KmsClientGetKeyArgs, type KmsClientGetKeyProviderArgs, type KmsClientGetResolverArgs, type KmsClientIsValidRawSignatureArgs, type KmsClientListKeyProvidersArgs, type KmsClientListKeysArgs, type KmsClientListResolversArgs, type KmsClientProviderDeleteKeyArgs, type KmsClientProviderGenerateKeyArgs, type KmsClientProviderGetKeyArgs, type KmsClientProviderListKeysArgs, type KmsClientProviderStoreKeyArgs, type KmsClientResolveKeyArgs, type KmsClientStoreKeyArgs, KmsRestClient, type KmsRestClientArgs, type ListKeyProvidersResponse, ListKeyProvidersResponseFromJSON, ListKeyProvidersResponseFromJSONTyped, ListKeyProvidersResponseToJSON, ListKeyProvidersResponseToJSONTyped, type ListKeysResponse, ListKeysResponseFromJSON, ListKeysResponseFromJSONTyped, ListKeysResponseToJSON, ListKeysResponseToJSONTyped, type ListResolversResponse, ListResolversResponseFromJSON, ListResolversResponseFromJSONTyped, ListResolversResponseToJSON, ListResolversResponseToJSONTyped, LookupMode, LookupModeFromJSON, LookupModeFromJSONTyped, LookupModeToJSON, LookupModeToJSONTyped, type ManagedKeyInfo, ManagedKeyInfoFromJSON, ManagedKeyInfoFromJSONTyped, ManagedKeyInfoToJSON, ManagedKeyInfoToJSONTyped, type ManagedKeyPair, ManagedKeyPairFromJSON, ManagedKeyPairFromJSONTyped, ManagedKeyPairToJSON, ManagedKeyPairToJSONTyped, MaskGenFunction, MaskGenFunctionFromJSON, MaskGenFunctionFromJSONTyped, MaskGenFunctionToJSON, MaskGenFunctionToJSONTyped, type OptionalProviderContextArgs, type ProviderCapabilities, ProviderCapabilitiesFromJSON, ProviderCapabilitiesFromJSONTyped, ProviderCapabilitiesToJSON, ProviderCapabilitiesToJSONTyped, type ProviderContextArgs, type ResolvePublicKey, ResolvePublicKeyFromJSON, ResolvePublicKeyFromJSONTyped, ResolvePublicKeyToJSON, ResolvePublicKeyToJSONTyped, type ResolvedKeyInfo, ResolvedKeyInfoFromJSON, ResolvedKeyInfoFromJSONTyped, ResolvedKeyInfoToJSON, ResolvedKeyInfoToJSONTyped, type Resolver, ResolverFromJSON, ResolverFromJSONTyped, ResolverToJSON, ResolverToJSONTyped, type RestClientAuthenticationOpts, type SignInput, SignInputFromJSON, SignInputFromJSONTyped, SignInputModeEnum, SignInputToJSON, SignInputToJSONTyped, type SignOutput, SignOutputFromJSON, SignOutputFromJSONTyped, SignOutputToJSON, SignOutputToJSONTyped, type Signature, SignatureAlgorithm, SignatureAlgorithmFromJSON, SignatureAlgorithmFromJSONTyped, SignatureAlgorithmToJSON, SignatureAlgorithmToJSONTyped, SignatureFromJSON, SignatureFromJSONTyped, SignatureToJSON, SignatureToJSONTyped, type StoreKey, StoreKeyFromJSON, StoreKeyFromJSONTyped, type StoreKeyResponse, StoreKeyResponseFromJSON, StoreKeyResponseFromJSONTyped, StoreKeyResponseToJSON, StoreKeyResponseToJSONTyped, StoreKeyToJSON, StoreKeyToJSONTyped, type UpdateKeyProvider, UpdateKeyProviderFromJSON, UpdateKeyProviderFromJSONTyped, UpdateKeyProviderToJSON, UpdateKeyProviderToJSONTyped, type VerifyRawSignature, VerifyRawSignatureFromJSON, VerifyRawSignatureFromJSONTyped, type VerifyRawSignatureResponse, VerifyRawSignatureResponseFromJSON, VerifyRawSignatureResponseFromJSONTyped, VerifyRawSignatureResponseToJSON, VerifyRawSignatureResponseToJSONTyped, VerifyRawSignatureToJSON, VerifyRawSignatureToJSONTyped, type VerifySimpleSignature, VerifySimpleSignatureFromJSON, VerifySimpleSignatureFromJSONTyped, VerifySimpleSignatureToJSON, VerifySimpleSignatureToJSONTyped, instanceOfAwsAssumeRoleCredentials, instanceOfAwsClientConfiguration, instanceOfAwsKmsSetting, instanceOfAwsStaticCredentials, instanceOfAwsWebIdentityTokenCredentials, instanceOfAzureClientSecretCredentialOpts, instanceOfAzureCredentialOpts, instanceOfAzureKeyVaultSetting, instanceOfCoseKey, instanceOfCoseKeyPair, instanceOfCoseKeyType, instanceOfCreateKeyProvider, instanceOfCreateRawSignature, instanceOfCreateRawSignatureResponse, instanceOfCreateSimpleSignature, instanceOfCryptoAlg, instanceOfCurve, instanceOfDigestAlg, instanceOfErrorResponse, instanceOfGenerateKey, instanceOfGenerateKeyGlobal, instanceOfGenerateKeyResponse, instanceOfGetKeyResponse, instanceOfIdentifierMethod, instanceOfJoseKeyPair, instanceOfJwk, instanceOfJwkKeyType, instanceOfJwkUse, instanceOfKeyEncoding, instanceOfKeyInfo, instanceOfKeyOperations, instanceOfKeyProvider, instanceOfKeyProviderResponse, instanceOfKeyProviderType, instanceOfKeyResolver, instanceOfKeyType, instanceOfKeyVisibility, instanceOfListKeyProvidersResponse, instanceOfListKeysResponse, instanceOfListResolversResponse, instanceOfLookupMode, instanceOfManagedKeyInfo, instanceOfManagedKeyPair, instanceOfMaskGenFunction, instanceOfProviderCapabilities, instanceOfResolvePublicKey, instanceOfResolvedKeyInfo, instanceOfResolver, instanceOfSignInput, instanceOfSignOutput, instanceOfSignature, instanceOfSignatureAlgorithm, instanceOfStoreKey, instanceOfStoreKeyResponse, instanceOfUpdateKeyProvider, instanceOfVerifyRawSignature, instanceOfVerifyRawSignatureResponse, instanceOfVerifySimpleSignature, plugin_schema as schema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1914,6 +1914,9 @@ declare const SignatureAlgorithm: {
|
|
|
1914
1914
|
readonly HmacSha256: "HMAC_SHA256";
|
|
1915
1915
|
readonly HmacSha384: "HMAC_SHA384";
|
|
1916
1916
|
readonly HmacSha512: "HMAC_SHA512";
|
|
1917
|
+
readonly RsaSha256: "RSA_SHA256";
|
|
1918
|
+
readonly RsaSha384: "RSA_SHA384";
|
|
1919
|
+
readonly RsaSha512: "RSA_SHA512";
|
|
1917
1920
|
readonly RsaSsaPssSha256Mgf1: "RSA_SSA_PSS_SHA256_MGF1";
|
|
1918
1921
|
readonly RsaSsaPssSha384Mgf1: "RSA_SSA_PSS_SHA384_MGF1";
|
|
1919
1922
|
readonly RsaSsaPssSha512Mgf1: "RSA_SSA_PSS_SHA512_MGF1";
|
|
@@ -3829,7 +3832,7 @@ declare function VerifySimpleSignatureToJSON(json: any): VerifySimpleSignature;
|
|
|
3829
3832
|
declare function VerifySimpleSignatureToJSONTyped(value?: VerifySimpleSignature | null, ignoreDiscriminator?: boolean): any;
|
|
3830
3833
|
|
|
3831
3834
|
interface IKmsRestClient extends IPluginMethodMap {
|
|
3832
|
-
kmsClientGetResolver(args:
|
|
3835
|
+
kmsClientGetResolver(args: KmsClientGetResolverArgs): Promise<Resolver>;
|
|
3833
3836
|
kmsClientListResolvers(args?: KmsClientListResolversArgs): Promise<ListResolversResponse>;
|
|
3834
3837
|
kmsClientResolveKey(args: KmsClientResolveKeyArgs): Promise<ResolvedKeyInfo>;
|
|
3835
3838
|
kmsClientCreateRawSignature(args: KmsClientCreateRawSignatureArgs): Promise<CreateRawSignatureResponse>;
|
|
@@ -3847,68 +3850,44 @@ interface IKmsRestClient extends IPluginMethodMap {
|
|
|
3847
3850
|
kmsClientProviderGetKey(args: KmsClientProviderGetKeyArgs): Promise<GetKeyResponse>;
|
|
3848
3851
|
kmsClientProviderDeleteKey(args: KmsClientProviderDeleteKeyArgs): Promise<boolean>;
|
|
3849
3852
|
}
|
|
3850
|
-
type
|
|
3853
|
+
type BaseArgs = {
|
|
3851
3854
|
baseUrl?: string;
|
|
3855
|
+
tenantId?: string;
|
|
3856
|
+
userId?: string;
|
|
3852
3857
|
};
|
|
3853
|
-
type
|
|
3854
|
-
|
|
3858
|
+
type OptionalProviderContextArgs = BaseArgs & {
|
|
3859
|
+
providerId?: string;
|
|
3860
|
+
};
|
|
3861
|
+
type ProviderContextArgs = BaseArgs & {
|
|
3862
|
+
providerId: string;
|
|
3863
|
+
};
|
|
3864
|
+
type KmsClientListResolversArgs = BaseArgs;
|
|
3865
|
+
type KmsClientGetResolverArgs = BaseArgs & {
|
|
3855
3866
|
resolverId: string;
|
|
3856
3867
|
};
|
|
3857
|
-
type KmsClientResolveKeyArgs = {
|
|
3858
|
-
baseUrl?: string;
|
|
3868
|
+
type KmsClientResolveKeyArgs = BaseArgs & {
|
|
3859
3869
|
resolverId: String;
|
|
3860
3870
|
} & ResolvePublicKey;
|
|
3861
|
-
type KmsClientCreateRawSignatureArgs =
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
type KmsClientIsValidRawSignatureArgs = {
|
|
3865
|
-
baseUrl?: string;
|
|
3866
|
-
} & VerifyRawSignature;
|
|
3867
|
-
type KmsClientGetKeyArgs = {
|
|
3868
|
-
baseUrl?: string;
|
|
3871
|
+
type KmsClientCreateRawSignatureArgs = BaseArgs & CreateRawSignature;
|
|
3872
|
+
type KmsClientIsValidRawSignatureArgs = BaseArgs & VerifyRawSignature;
|
|
3873
|
+
type KmsClientGetKeyArgs = BaseArgs & OptionalProviderContextArgs & {
|
|
3869
3874
|
aliasOrKid: string;
|
|
3870
3875
|
};
|
|
3871
|
-
type KmsClientListKeysArgs =
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
type KmsClientStoreKeyArgs = {
|
|
3876
|
-
baseUrl?: string;
|
|
3877
|
-
} & StoreKey;
|
|
3878
|
-
type KmsClientGenerateKeyArgs = {
|
|
3879
|
-
baseUrl?: string;
|
|
3880
|
-
} & GenerateKeyGlobal;
|
|
3881
|
-
type KmsClientDeleteKeyArgs = {
|
|
3882
|
-
baseUrl?: string;
|
|
3876
|
+
type KmsClientListKeysArgs = BaseArgs & OptionalProviderContextArgs;
|
|
3877
|
+
type KmsClientStoreKeyArgs = BaseArgs & StoreKey;
|
|
3878
|
+
type KmsClientGenerateKeyArgs = BaseArgs & OptionalProviderContextArgs & GenerateKeyGlobal;
|
|
3879
|
+
type KmsClientDeleteKeyArgs = BaseArgs & OptionalProviderContextArgs & {
|
|
3883
3880
|
aliasOrKid: string;
|
|
3884
3881
|
};
|
|
3885
|
-
type KmsClientGetKeyProviderArgs =
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
type
|
|
3890
|
-
|
|
3891
|
-
};
|
|
3892
|
-
type KmsClientProviderListKeysArgs = {
|
|
3893
|
-
baseUrl?: string;
|
|
3894
|
-
providerId: string;
|
|
3895
|
-
};
|
|
3896
|
-
type KmsClientProviderStoreKeyArgs = {
|
|
3897
|
-
baseUrl?: string;
|
|
3898
|
-
providerId: string;
|
|
3899
|
-
} & StoreKey;
|
|
3900
|
-
type KmsClientProviderGenerateKeyArgs = {
|
|
3901
|
-
baseUrl?: string;
|
|
3902
|
-
providerId: string;
|
|
3903
|
-
} & GenerateKey;
|
|
3904
|
-
type KmsClientProviderGetKeyArgs = {
|
|
3905
|
-
baseUrl?: string;
|
|
3906
|
-
providerId: string;
|
|
3882
|
+
type KmsClientGetKeyProviderArgs = BaseArgs & ProviderContextArgs;
|
|
3883
|
+
type KmsClientListKeyProvidersArgs = BaseArgs;
|
|
3884
|
+
type KmsClientProviderListKeysArgs = BaseArgs & ProviderContextArgs;
|
|
3885
|
+
type KmsClientProviderStoreKeyArgs = BaseArgs & ProviderContextArgs & StoreKey;
|
|
3886
|
+
type KmsClientProviderGenerateKeyArgs = BaseArgs & ProviderContextArgs & GenerateKey;
|
|
3887
|
+
type KmsClientProviderGetKeyArgs = BaseArgs & ProviderContextArgs & {
|
|
3907
3888
|
aliasOrKid: string;
|
|
3908
3889
|
};
|
|
3909
|
-
type KmsClientProviderDeleteKeyArgs = {
|
|
3910
|
-
baseUrl?: string;
|
|
3911
|
-
providerId: string;
|
|
3890
|
+
type KmsClientProviderDeleteKeyArgs = BaseArgs & ProviderContextArgs & {
|
|
3912
3891
|
aliasOrKid: string;
|
|
3913
3892
|
};
|
|
3914
3893
|
type RestClientAuthenticationOpts = {
|
|
@@ -3970,4 +3949,4 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3970
3949
|
private handleHttpError;
|
|
3971
3950
|
}
|
|
3972
3951
|
|
|
3973
|
-
export { type AwsAssumeRoleCredentials, AwsAssumeRoleCredentialsFromJSON, AwsAssumeRoleCredentialsFromJSONTyped, AwsAssumeRoleCredentialsToJSON, AwsAssumeRoleCredentialsToJSONTyped, type AwsClientConfiguration, AwsClientConfigurationFromJSON, AwsClientConfigurationFromJSONTyped, AwsClientConfigurationToJSON, AwsClientConfigurationToJSONTyped, type AwsKmsSetting, AwsKmsSettingFromJSON, AwsKmsSettingFromJSONTyped, AwsKmsSettingToJSON, AwsKmsSettingToJSONTyped, type AwsStaticCredentials, AwsStaticCredentialsFromJSON, AwsStaticCredentialsFromJSONTyped, AwsStaticCredentialsToJSON, AwsStaticCredentialsToJSONTyped, type AwsWebIdentityTokenCredentials, AwsWebIdentityTokenCredentialsFromJSON, AwsWebIdentityTokenCredentialsFromJSONTyped, AwsWebIdentityTokenCredentialsToJSON, AwsWebIdentityTokenCredentialsToJSONTyped, type AzureClientSecretCredentialOpts, AzureClientSecretCredentialOptsFromJSON, AzureClientSecretCredentialOptsFromJSONTyped, AzureClientSecretCredentialOptsToJSON, AzureClientSecretCredentialOptsToJSONTyped, type AzureCredentialOpts, AzureCredentialOptsFromJSON, AzureCredentialOptsFromJSONTyped, AzureCredentialOptsToJSON, AzureCredentialOptsToJSONTyped, type AzureKeyVaultSetting, AzureKeyVaultSettingFromJSON, AzureKeyVaultSettingFromJSONTyped, AzureKeyVaultSettingToJSON, AzureKeyVaultSettingToJSONTyped, type CoseKey, CoseKeyFromJSON, CoseKeyFromJSONTyped, type CoseKeyPair, CoseKeyPairFromJSON, CoseKeyPairFromJSONTyped, CoseKeyPairToJSON, CoseKeyPairToJSONTyped, CoseKeyToJSON, CoseKeyToJSONTyped, CoseKeyType, CoseKeyTypeFromJSON, CoseKeyTypeFromJSONTyped, CoseKeyTypeToJSON, CoseKeyTypeToJSONTyped, type CreateKeyProvider, CreateKeyProviderFromJSON, CreateKeyProviderFromJSONTyped, CreateKeyProviderToJSON, CreateKeyProviderToJSONTyped, type CreateRawSignature, CreateRawSignatureFromJSON, CreateRawSignatureFromJSONTyped, type CreateRawSignatureResponse, CreateRawSignatureResponseFromJSON, CreateRawSignatureResponseFromJSONTyped, CreateRawSignatureResponseToJSON, CreateRawSignatureResponseToJSONTyped, CreateRawSignatureToJSON, CreateRawSignatureToJSONTyped, type CreateSimpleSignature, CreateSimpleSignatureFromJSON, CreateSimpleSignatureFromJSONTyped, CreateSimpleSignatureToJSON, CreateSimpleSignatureToJSONTyped, CryptoAlg, CryptoAlgFromJSON, CryptoAlgFromJSONTyped, CryptoAlgToJSON, CryptoAlgToJSONTyped, Curve, CurveFromJSON, CurveFromJSONTyped, CurveToJSON, CurveToJSONTyped, DigestAlg, DigestAlgFromJSON, DigestAlgFromJSONTyped, DigestAlgToJSON, DigestAlgToJSONTyped, type ErrorResponse, ErrorResponseFromJSON, ErrorResponseFromJSONTyped, ErrorResponseToJSON, ErrorResponseToJSONTyped, type GenerateKey, GenerateKeyFromJSON, GenerateKeyFromJSONTyped, type GenerateKeyGlobal, GenerateKeyGlobalFromJSON, GenerateKeyGlobalFromJSONTyped, GenerateKeyGlobalToJSON, GenerateKeyGlobalToJSONTyped, type GenerateKeyResponse, GenerateKeyResponseFromJSON, GenerateKeyResponseFromJSONTyped, GenerateKeyResponseToJSON, GenerateKeyResponseToJSONTyped, GenerateKeyToJSON, GenerateKeyToJSONTyped, type GetKeyResponse, GetKeyResponseFromJSON, GetKeyResponseFromJSONTyped, GetKeyResponseToJSON, GetKeyResponseToJSONTyped, type IKmsRestClient, type IRequiredContext, IdentifierMethod, IdentifierMethodFromJSON, IdentifierMethodFromJSONTyped, IdentifierMethodToJSON, IdentifierMethodToJSONTyped, type JoseKeyPair, JoseKeyPairFromJSON, JoseKeyPairFromJSONTyped, JoseKeyPairToJSON, JoseKeyPairToJSONTyped, type Jwk, JwkFromJSON, JwkFromJSONTyped, JwkKeyType, JwkKeyTypeFromJSON, JwkKeyTypeFromJSONTyped, JwkKeyTypeToJSON, JwkKeyTypeToJSONTyped, JwkToJSON, JwkToJSONTyped, JwkUse, JwkUseFromJSON, JwkUseFromJSONTyped, JwkUseToJSON, JwkUseToJSONTyped, KeyEncoding, KeyEncodingFromJSON, KeyEncodingFromJSONTyped, KeyEncodingToJSON, KeyEncodingToJSONTyped, type KeyInfo, KeyInfoFromJSON, KeyInfoFromJSONTyped, KeyInfoToJSON, KeyInfoToJSONTyped, KeyOperations, KeyOperationsFromJSON, KeyOperationsFromJSONTyped, KeyOperationsToJSON, KeyOperationsToJSONTyped, type KeyProvider, KeyProviderFromJSON, KeyProviderFromJSONTyped, type KeyProviderResponse, KeyProviderResponseFromJSON, KeyProviderResponseFromJSONTyped, KeyProviderResponseToJSON, KeyProviderResponseToJSONTyped, KeyProviderToJSON, KeyProviderToJSONTyped, KeyProviderType, KeyProviderTypeFromJSON, KeyProviderTypeFromJSONTyped, KeyProviderTypeToJSON, KeyProviderTypeToJSONTyped, type KeyResolver, KeyResolverFromJSON, KeyResolverFromJSONTyped, KeyResolverToJSON, KeyResolverToJSONTyped, KeyType, KeyTypeFromJSON, KeyTypeFromJSONTyped, KeyTypeToJSON, KeyTypeToJSONTyped, KeyVisibility, KeyVisibilityFromJSON, KeyVisibilityFromJSONTyped, KeyVisibilityToJSON, KeyVisibilityToJSONTyped, type KmsClientCreateRawSignatureArgs, type KmsClientDeleteKeyArgs, type KmsClientGenerateKeyArgs, type KmsClientGetKeyArgs, type KmsClientGetKeyProviderArgs, type KmsClientIsValidRawSignatureArgs, type KmsClientListKeyProvidersArgs, type KmsClientListKeysArgs, type KmsClientListResolversArgs, type KmsClientProviderDeleteKeyArgs, type KmsClientProviderGenerateKeyArgs, type KmsClientProviderGetKeyArgs, type KmsClientProviderListKeysArgs, type KmsClientProviderStoreKeyArgs, type KmsClientResolveKeyArgs, type KmsClientStoreKeyArgs, KmsRestClient, type KmsRestClientArgs, type ListKeyProvidersResponse, ListKeyProvidersResponseFromJSON, ListKeyProvidersResponseFromJSONTyped, ListKeyProvidersResponseToJSON, ListKeyProvidersResponseToJSONTyped, type ListKeysResponse, ListKeysResponseFromJSON, ListKeysResponseFromJSONTyped, ListKeysResponseToJSON, ListKeysResponseToJSONTyped, type ListResolversResponse, ListResolversResponseFromJSON, ListResolversResponseFromJSONTyped, ListResolversResponseToJSON, ListResolversResponseToJSONTyped, LookupMode, LookupModeFromJSON, LookupModeFromJSONTyped, LookupModeToJSON, LookupModeToJSONTyped, type ManagedKeyInfo, ManagedKeyInfoFromJSON, ManagedKeyInfoFromJSONTyped, ManagedKeyInfoToJSON, ManagedKeyInfoToJSONTyped, type ManagedKeyPair, ManagedKeyPairFromJSON, ManagedKeyPairFromJSONTyped, ManagedKeyPairToJSON, ManagedKeyPairToJSONTyped, MaskGenFunction, MaskGenFunctionFromJSON, MaskGenFunctionFromJSONTyped, MaskGenFunctionToJSON, MaskGenFunctionToJSONTyped, type ProviderCapabilities, ProviderCapabilitiesFromJSON, ProviderCapabilitiesFromJSONTyped, ProviderCapabilitiesToJSON, ProviderCapabilitiesToJSONTyped, type ResolvePublicKey, ResolvePublicKeyFromJSON, ResolvePublicKeyFromJSONTyped, ResolvePublicKeyToJSON, ResolvePublicKeyToJSONTyped, type ResolvedKeyInfo, ResolvedKeyInfoFromJSON, ResolvedKeyInfoFromJSONTyped, ResolvedKeyInfoToJSON, ResolvedKeyInfoToJSONTyped, type Resolver, ResolverFromJSON, ResolverFromJSONTyped, ResolverToJSON, ResolverToJSONTyped, type RestClientAuthenticationOpts, type SignInput, SignInputFromJSON, SignInputFromJSONTyped, SignInputModeEnum, SignInputToJSON, SignInputToJSONTyped, type SignOutput, SignOutputFromJSON, SignOutputFromJSONTyped, SignOutputToJSON, SignOutputToJSONTyped, type Signature, SignatureAlgorithm, SignatureAlgorithmFromJSON, SignatureAlgorithmFromJSONTyped, SignatureAlgorithmToJSON, SignatureAlgorithmToJSONTyped, SignatureFromJSON, SignatureFromJSONTyped, SignatureToJSON, SignatureToJSONTyped, type StoreKey, StoreKeyFromJSON, StoreKeyFromJSONTyped, type StoreKeyResponse, StoreKeyResponseFromJSON, StoreKeyResponseFromJSONTyped, StoreKeyResponseToJSON, StoreKeyResponseToJSONTyped, StoreKeyToJSON, StoreKeyToJSONTyped, type UpdateKeyProvider, UpdateKeyProviderFromJSON, UpdateKeyProviderFromJSONTyped, UpdateKeyProviderToJSON, UpdateKeyProviderToJSONTyped, type VerifyRawSignature, VerifyRawSignatureFromJSON, VerifyRawSignatureFromJSONTyped, type VerifyRawSignatureResponse, VerifyRawSignatureResponseFromJSON, VerifyRawSignatureResponseFromJSONTyped, VerifyRawSignatureResponseToJSON, VerifyRawSignatureResponseToJSONTyped, VerifyRawSignatureToJSON, VerifyRawSignatureToJSONTyped, type VerifySimpleSignature, VerifySimpleSignatureFromJSON, VerifySimpleSignatureFromJSONTyped, VerifySimpleSignatureToJSON, VerifySimpleSignatureToJSONTyped, instanceOfAwsAssumeRoleCredentials, instanceOfAwsClientConfiguration, instanceOfAwsKmsSetting, instanceOfAwsStaticCredentials, instanceOfAwsWebIdentityTokenCredentials, instanceOfAzureClientSecretCredentialOpts, instanceOfAzureCredentialOpts, instanceOfAzureKeyVaultSetting, instanceOfCoseKey, instanceOfCoseKeyPair, instanceOfCoseKeyType, instanceOfCreateKeyProvider, instanceOfCreateRawSignature, instanceOfCreateRawSignatureResponse, instanceOfCreateSimpleSignature, instanceOfCryptoAlg, instanceOfCurve, instanceOfDigestAlg, instanceOfErrorResponse, instanceOfGenerateKey, instanceOfGenerateKeyGlobal, instanceOfGenerateKeyResponse, instanceOfGetKeyResponse, instanceOfIdentifierMethod, instanceOfJoseKeyPair, instanceOfJwk, instanceOfJwkKeyType, instanceOfJwkUse, instanceOfKeyEncoding, instanceOfKeyInfo, instanceOfKeyOperations, instanceOfKeyProvider, instanceOfKeyProviderResponse, instanceOfKeyProviderType, instanceOfKeyResolver, instanceOfKeyType, instanceOfKeyVisibility, instanceOfListKeyProvidersResponse, instanceOfListKeysResponse, instanceOfListResolversResponse, instanceOfLookupMode, instanceOfManagedKeyInfo, instanceOfManagedKeyPair, instanceOfMaskGenFunction, instanceOfProviderCapabilities, instanceOfResolvePublicKey, instanceOfResolvedKeyInfo, instanceOfResolver, instanceOfSignInput, instanceOfSignOutput, instanceOfSignature, instanceOfSignatureAlgorithm, instanceOfStoreKey, instanceOfStoreKeyResponse, instanceOfUpdateKeyProvider, instanceOfVerifyRawSignature, instanceOfVerifyRawSignatureResponse, instanceOfVerifySimpleSignature,
|
|
3952
|
+
export { type AwsAssumeRoleCredentials, AwsAssumeRoleCredentialsFromJSON, AwsAssumeRoleCredentialsFromJSONTyped, AwsAssumeRoleCredentialsToJSON, AwsAssumeRoleCredentialsToJSONTyped, type AwsClientConfiguration, AwsClientConfigurationFromJSON, AwsClientConfigurationFromJSONTyped, AwsClientConfigurationToJSON, AwsClientConfigurationToJSONTyped, type AwsKmsSetting, AwsKmsSettingFromJSON, AwsKmsSettingFromJSONTyped, AwsKmsSettingToJSON, AwsKmsSettingToJSONTyped, type AwsStaticCredentials, AwsStaticCredentialsFromJSON, AwsStaticCredentialsFromJSONTyped, AwsStaticCredentialsToJSON, AwsStaticCredentialsToJSONTyped, type AwsWebIdentityTokenCredentials, AwsWebIdentityTokenCredentialsFromJSON, AwsWebIdentityTokenCredentialsFromJSONTyped, AwsWebIdentityTokenCredentialsToJSON, AwsWebIdentityTokenCredentialsToJSONTyped, type AzureClientSecretCredentialOpts, AzureClientSecretCredentialOptsFromJSON, AzureClientSecretCredentialOptsFromJSONTyped, AzureClientSecretCredentialOptsToJSON, AzureClientSecretCredentialOptsToJSONTyped, type AzureCredentialOpts, AzureCredentialOptsFromJSON, AzureCredentialOptsFromJSONTyped, AzureCredentialOptsToJSON, AzureCredentialOptsToJSONTyped, type AzureKeyVaultSetting, AzureKeyVaultSettingFromJSON, AzureKeyVaultSettingFromJSONTyped, AzureKeyVaultSettingToJSON, AzureKeyVaultSettingToJSONTyped, type BaseArgs, type CoseKey, CoseKeyFromJSON, CoseKeyFromJSONTyped, type CoseKeyPair, CoseKeyPairFromJSON, CoseKeyPairFromJSONTyped, CoseKeyPairToJSON, CoseKeyPairToJSONTyped, CoseKeyToJSON, CoseKeyToJSONTyped, CoseKeyType, CoseKeyTypeFromJSON, CoseKeyTypeFromJSONTyped, CoseKeyTypeToJSON, CoseKeyTypeToJSONTyped, type CreateKeyProvider, CreateKeyProviderFromJSON, CreateKeyProviderFromJSONTyped, CreateKeyProviderToJSON, CreateKeyProviderToJSONTyped, type CreateRawSignature, CreateRawSignatureFromJSON, CreateRawSignatureFromJSONTyped, type CreateRawSignatureResponse, CreateRawSignatureResponseFromJSON, CreateRawSignatureResponseFromJSONTyped, CreateRawSignatureResponseToJSON, CreateRawSignatureResponseToJSONTyped, CreateRawSignatureToJSON, CreateRawSignatureToJSONTyped, type CreateSimpleSignature, CreateSimpleSignatureFromJSON, CreateSimpleSignatureFromJSONTyped, CreateSimpleSignatureToJSON, CreateSimpleSignatureToJSONTyped, CryptoAlg, CryptoAlgFromJSON, CryptoAlgFromJSONTyped, CryptoAlgToJSON, CryptoAlgToJSONTyped, Curve, CurveFromJSON, CurveFromJSONTyped, CurveToJSON, CurveToJSONTyped, DigestAlg, DigestAlgFromJSON, DigestAlgFromJSONTyped, DigestAlgToJSON, DigestAlgToJSONTyped, type ErrorResponse, ErrorResponseFromJSON, ErrorResponseFromJSONTyped, ErrorResponseToJSON, ErrorResponseToJSONTyped, type GenerateKey, GenerateKeyFromJSON, GenerateKeyFromJSONTyped, type GenerateKeyGlobal, GenerateKeyGlobalFromJSON, GenerateKeyGlobalFromJSONTyped, GenerateKeyGlobalToJSON, GenerateKeyGlobalToJSONTyped, type GenerateKeyResponse, GenerateKeyResponseFromJSON, GenerateKeyResponseFromJSONTyped, GenerateKeyResponseToJSON, GenerateKeyResponseToJSONTyped, GenerateKeyToJSON, GenerateKeyToJSONTyped, type GetKeyResponse, GetKeyResponseFromJSON, GetKeyResponseFromJSONTyped, GetKeyResponseToJSON, GetKeyResponseToJSONTyped, type IKmsRestClient, type IRequiredContext, IdentifierMethod, IdentifierMethodFromJSON, IdentifierMethodFromJSONTyped, IdentifierMethodToJSON, IdentifierMethodToJSONTyped, type JoseKeyPair, JoseKeyPairFromJSON, JoseKeyPairFromJSONTyped, JoseKeyPairToJSON, JoseKeyPairToJSONTyped, type Jwk, JwkFromJSON, JwkFromJSONTyped, JwkKeyType, JwkKeyTypeFromJSON, JwkKeyTypeFromJSONTyped, JwkKeyTypeToJSON, JwkKeyTypeToJSONTyped, JwkToJSON, JwkToJSONTyped, JwkUse, JwkUseFromJSON, JwkUseFromJSONTyped, JwkUseToJSON, JwkUseToJSONTyped, KeyEncoding, KeyEncodingFromJSON, KeyEncodingFromJSONTyped, KeyEncodingToJSON, KeyEncodingToJSONTyped, type KeyInfo, KeyInfoFromJSON, KeyInfoFromJSONTyped, KeyInfoToJSON, KeyInfoToJSONTyped, KeyOperations, KeyOperationsFromJSON, KeyOperationsFromJSONTyped, KeyOperationsToJSON, KeyOperationsToJSONTyped, type KeyProvider, KeyProviderFromJSON, KeyProviderFromJSONTyped, type KeyProviderResponse, KeyProviderResponseFromJSON, KeyProviderResponseFromJSONTyped, KeyProviderResponseToJSON, KeyProviderResponseToJSONTyped, KeyProviderToJSON, KeyProviderToJSONTyped, KeyProviderType, KeyProviderTypeFromJSON, KeyProviderTypeFromJSONTyped, KeyProviderTypeToJSON, KeyProviderTypeToJSONTyped, type KeyResolver, KeyResolverFromJSON, KeyResolverFromJSONTyped, KeyResolverToJSON, KeyResolverToJSONTyped, KeyType, KeyTypeFromJSON, KeyTypeFromJSONTyped, KeyTypeToJSON, KeyTypeToJSONTyped, KeyVisibility, KeyVisibilityFromJSON, KeyVisibilityFromJSONTyped, KeyVisibilityToJSON, KeyVisibilityToJSONTyped, type KmsClientCreateRawSignatureArgs, type KmsClientDeleteKeyArgs, type KmsClientGenerateKeyArgs, type KmsClientGetKeyArgs, type KmsClientGetKeyProviderArgs, type KmsClientGetResolverArgs, type KmsClientIsValidRawSignatureArgs, type KmsClientListKeyProvidersArgs, type KmsClientListKeysArgs, type KmsClientListResolversArgs, type KmsClientProviderDeleteKeyArgs, type KmsClientProviderGenerateKeyArgs, type KmsClientProviderGetKeyArgs, type KmsClientProviderListKeysArgs, type KmsClientProviderStoreKeyArgs, type KmsClientResolveKeyArgs, type KmsClientStoreKeyArgs, KmsRestClient, type KmsRestClientArgs, type ListKeyProvidersResponse, ListKeyProvidersResponseFromJSON, ListKeyProvidersResponseFromJSONTyped, ListKeyProvidersResponseToJSON, ListKeyProvidersResponseToJSONTyped, type ListKeysResponse, ListKeysResponseFromJSON, ListKeysResponseFromJSONTyped, ListKeysResponseToJSON, ListKeysResponseToJSONTyped, type ListResolversResponse, ListResolversResponseFromJSON, ListResolversResponseFromJSONTyped, ListResolversResponseToJSON, ListResolversResponseToJSONTyped, LookupMode, LookupModeFromJSON, LookupModeFromJSONTyped, LookupModeToJSON, LookupModeToJSONTyped, type ManagedKeyInfo, ManagedKeyInfoFromJSON, ManagedKeyInfoFromJSONTyped, ManagedKeyInfoToJSON, ManagedKeyInfoToJSONTyped, type ManagedKeyPair, ManagedKeyPairFromJSON, ManagedKeyPairFromJSONTyped, ManagedKeyPairToJSON, ManagedKeyPairToJSONTyped, MaskGenFunction, MaskGenFunctionFromJSON, MaskGenFunctionFromJSONTyped, MaskGenFunctionToJSON, MaskGenFunctionToJSONTyped, type OptionalProviderContextArgs, type ProviderCapabilities, ProviderCapabilitiesFromJSON, ProviderCapabilitiesFromJSONTyped, ProviderCapabilitiesToJSON, ProviderCapabilitiesToJSONTyped, type ProviderContextArgs, type ResolvePublicKey, ResolvePublicKeyFromJSON, ResolvePublicKeyFromJSONTyped, ResolvePublicKeyToJSON, ResolvePublicKeyToJSONTyped, type ResolvedKeyInfo, ResolvedKeyInfoFromJSON, ResolvedKeyInfoFromJSONTyped, ResolvedKeyInfoToJSON, ResolvedKeyInfoToJSONTyped, type Resolver, ResolverFromJSON, ResolverFromJSONTyped, ResolverToJSON, ResolverToJSONTyped, type RestClientAuthenticationOpts, type SignInput, SignInputFromJSON, SignInputFromJSONTyped, SignInputModeEnum, SignInputToJSON, SignInputToJSONTyped, type SignOutput, SignOutputFromJSON, SignOutputFromJSONTyped, SignOutputToJSON, SignOutputToJSONTyped, type Signature, SignatureAlgorithm, SignatureAlgorithmFromJSON, SignatureAlgorithmFromJSONTyped, SignatureAlgorithmToJSON, SignatureAlgorithmToJSONTyped, SignatureFromJSON, SignatureFromJSONTyped, SignatureToJSON, SignatureToJSONTyped, type StoreKey, StoreKeyFromJSON, StoreKeyFromJSONTyped, type StoreKeyResponse, StoreKeyResponseFromJSON, StoreKeyResponseFromJSONTyped, StoreKeyResponseToJSON, StoreKeyResponseToJSONTyped, StoreKeyToJSON, StoreKeyToJSONTyped, type UpdateKeyProvider, UpdateKeyProviderFromJSON, UpdateKeyProviderFromJSONTyped, UpdateKeyProviderToJSON, UpdateKeyProviderToJSONTyped, type VerifyRawSignature, VerifyRawSignatureFromJSON, VerifyRawSignatureFromJSONTyped, type VerifyRawSignatureResponse, VerifyRawSignatureResponseFromJSON, VerifyRawSignatureResponseFromJSONTyped, VerifyRawSignatureResponseToJSON, VerifyRawSignatureResponseToJSONTyped, VerifyRawSignatureToJSON, VerifyRawSignatureToJSONTyped, type VerifySimpleSignature, VerifySimpleSignatureFromJSON, VerifySimpleSignatureFromJSONTyped, VerifySimpleSignatureToJSON, VerifySimpleSignatureToJSONTyped, instanceOfAwsAssumeRoleCredentials, instanceOfAwsClientConfiguration, instanceOfAwsKmsSetting, instanceOfAwsStaticCredentials, instanceOfAwsWebIdentityTokenCredentials, instanceOfAzureClientSecretCredentialOpts, instanceOfAzureCredentialOpts, instanceOfAzureKeyVaultSetting, instanceOfCoseKey, instanceOfCoseKeyPair, instanceOfCoseKeyType, instanceOfCreateKeyProvider, instanceOfCreateRawSignature, instanceOfCreateRawSignatureResponse, instanceOfCreateSimpleSignature, instanceOfCryptoAlg, instanceOfCurve, instanceOfDigestAlg, instanceOfErrorResponse, instanceOfGenerateKey, instanceOfGenerateKeyGlobal, instanceOfGenerateKeyResponse, instanceOfGetKeyResponse, instanceOfIdentifierMethod, instanceOfJoseKeyPair, instanceOfJwk, instanceOfJwkKeyType, instanceOfJwkUse, instanceOfKeyEncoding, instanceOfKeyInfo, instanceOfKeyOperations, instanceOfKeyProvider, instanceOfKeyProviderResponse, instanceOfKeyProviderType, instanceOfKeyResolver, instanceOfKeyType, instanceOfKeyVisibility, instanceOfListKeyProvidersResponse, instanceOfListKeysResponse, instanceOfListResolversResponse, instanceOfLookupMode, instanceOfManagedKeyInfo, instanceOfManagedKeyPair, instanceOfMaskGenFunction, instanceOfProviderCapabilities, instanceOfResolvePublicKey, instanceOfResolvedKeyInfo, instanceOfResolver, instanceOfSignInput, instanceOfSignOutput, instanceOfSignature, instanceOfSignatureAlgorithm, instanceOfStoreKey, instanceOfStoreKeyResponse, instanceOfUpdateKeyProvider, instanceOfVerifyRawSignature, instanceOfVerifyRawSignatureResponse, instanceOfVerifySimpleSignature, plugin_schema as schema };
|
package/dist/index.js
CHANGED
|
@@ -1665,6 +1665,9 @@ var SignatureAlgorithm = {
|
|
|
1665
1665
|
HmacSha256: "HMAC_SHA256",
|
|
1666
1666
|
HmacSha384: "HMAC_SHA384",
|
|
1667
1667
|
HmacSha512: "HMAC_SHA512",
|
|
1668
|
+
RsaSha256: "RSA_SHA256",
|
|
1669
|
+
RsaSha384: "RSA_SHA384",
|
|
1670
|
+
RsaSha512: "RSA_SHA512",
|
|
1668
1671
|
RsaSsaPssSha256Mgf1: "RSA_SSA_PSS_SHA256_MGF1",
|
|
1669
1672
|
RsaSsaPssSha384Mgf1: "RSA_SSA_PSS_SHA384_MGF1",
|
|
1670
1673
|
RsaSsaPssSha512Mgf1: "RSA_SSA_PSS_SHA512_MGF1"
|
|
@@ -3307,7 +3310,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3307
3310
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3308
3311
|
const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl);
|
|
3309
3312
|
const response = await fetch(url, {
|
|
3310
|
-
method: "GET"
|
|
3313
|
+
method: "GET",
|
|
3314
|
+
headers: await this.createHeaders({
|
|
3315
|
+
tenantId: args.tenantId,
|
|
3316
|
+
userId: args.userId
|
|
3317
|
+
})
|
|
3311
3318
|
});
|
|
3312
3319
|
logger.debug(`get resolver response: ${response}`);
|
|
3313
3320
|
if (!response.ok) {
|
|
@@ -3320,7 +3327,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3320
3327
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3321
3328
|
const url = _KmsRestClient.urlWithBase("/resolvers", baseUrl);
|
|
3322
3329
|
const response = await fetch(url, {
|
|
3323
|
-
method: "GET"
|
|
3330
|
+
method: "GET",
|
|
3331
|
+
headers: await this.createHeaders({
|
|
3332
|
+
tenantId: args?.tenantId,
|
|
3333
|
+
userId: args?.userId
|
|
3334
|
+
})
|
|
3324
3335
|
});
|
|
3325
3336
|
logger.debug(`list resolvers response: ${response}`);
|
|
3326
3337
|
if (!response.ok) {
|
|
@@ -3341,7 +3352,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3341
3352
|
const response = await fetch(url, {
|
|
3342
3353
|
method: "POST",
|
|
3343
3354
|
headers: await this.createHeaders({
|
|
3344
|
-
|
|
3355
|
+
contentType: "application/json",
|
|
3356
|
+
tenantId: args.tenantId,
|
|
3357
|
+
userId: args.userId
|
|
3345
3358
|
}),
|
|
3346
3359
|
body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
|
|
3347
3360
|
});
|
|
@@ -3354,7 +3367,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3354
3367
|
/** {@inheritDoc IKmsRestClient.kmsCreateRawSignature} */
|
|
3355
3368
|
async kmsClientCreateRawSignature(args) {
|
|
3356
3369
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3357
|
-
const url = _KmsRestClient.urlWithBase(`/signatures/raw`, baseUrl);
|
|
3370
|
+
const url = _KmsRestClient.urlWithBase(`/signatures/raw/create`, baseUrl);
|
|
3358
3371
|
const body = {
|
|
3359
3372
|
keyInfo: args.keyInfo,
|
|
3360
3373
|
input: args.input
|
|
@@ -3362,7 +3375,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3362
3375
|
const response = await fetch(url, {
|
|
3363
3376
|
method: "POST",
|
|
3364
3377
|
headers: await this.createHeaders({
|
|
3365
|
-
|
|
3378
|
+
contentType: "application/json",
|
|
3379
|
+
tenantId: args.tenantId,
|
|
3380
|
+
userId: args.userId
|
|
3366
3381
|
}),
|
|
3367
3382
|
body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
|
|
3368
3383
|
});
|
|
@@ -3384,7 +3399,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3384
3399
|
const response = await fetch(url, {
|
|
3385
3400
|
method: "POST",
|
|
3386
3401
|
headers: await this.createHeaders({
|
|
3387
|
-
|
|
3402
|
+
contentType: "application/json",
|
|
3403
|
+
tenantId: args.tenantId,
|
|
3404
|
+
userId: args.userId
|
|
3388
3405
|
}),
|
|
3389
3406
|
body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
|
|
3390
3407
|
});
|
|
@@ -3399,7 +3416,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3399
3416
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3400
3417
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3401
3418
|
const response = await fetch(url, {
|
|
3402
|
-
method: "GET"
|
|
3419
|
+
method: "GET",
|
|
3420
|
+
headers: await this.createHeaders({
|
|
3421
|
+
tenantId: args.tenantId,
|
|
3422
|
+
userId: args.userId
|
|
3423
|
+
})
|
|
3403
3424
|
});
|
|
3404
3425
|
logger.debug(`get key response: ${response}`);
|
|
3405
3426
|
if (!response.ok) {
|
|
@@ -3416,7 +3437,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3416
3437
|
}
|
|
3417
3438
|
});
|
|
3418
3439
|
const response = await fetch(url, {
|
|
3419
|
-
method: "GET"
|
|
3440
|
+
method: "GET",
|
|
3441
|
+
headers: await this.createHeaders({
|
|
3442
|
+
tenantId: args?.tenantId,
|
|
3443
|
+
userId: args?.userId
|
|
3444
|
+
})
|
|
3420
3445
|
});
|
|
3421
3446
|
logger.debug(`list keys response: ${response}`);
|
|
3422
3447
|
if (!response.ok) {
|
|
@@ -3435,7 +3460,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3435
3460
|
const response = await fetch(url, {
|
|
3436
3461
|
method: "POST",
|
|
3437
3462
|
headers: await this.createHeaders({
|
|
3438
|
-
|
|
3463
|
+
contentType: "application/json",
|
|
3464
|
+
tenantId: args.tenantId,
|
|
3465
|
+
userId: args.userId
|
|
3439
3466
|
}),
|
|
3440
3467
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3441
3468
|
});
|
|
@@ -3458,7 +3485,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3458
3485
|
const response = await fetch(url, {
|
|
3459
3486
|
method: "POST",
|
|
3460
3487
|
headers: await this.createHeaders({
|
|
3461
|
-
|
|
3488
|
+
contentType: "application/json",
|
|
3489
|
+
tenantId: args.tenantId,
|
|
3490
|
+
userId: args.userId
|
|
3462
3491
|
}),
|
|
3463
3492
|
body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
|
|
3464
3493
|
});
|
|
@@ -3473,7 +3502,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3473
3502
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3474
3503
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3475
3504
|
const response = await fetch(url, {
|
|
3476
|
-
method: "DELETE"
|
|
3505
|
+
method: "DELETE",
|
|
3506
|
+
headers: await this.createHeaders({
|
|
3507
|
+
tenantId: args.tenantId,
|
|
3508
|
+
userId: args.userId
|
|
3509
|
+
})
|
|
3477
3510
|
});
|
|
3478
3511
|
logger.debug(`delete key response: ${response}`);
|
|
3479
3512
|
if (!response.ok) {
|
|
@@ -3486,7 +3519,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3486
3519
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3487
3520
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl);
|
|
3488
3521
|
const response = await fetch(url, {
|
|
3489
|
-
method: "GET"
|
|
3522
|
+
method: "GET",
|
|
3523
|
+
headers: await this.createHeaders({
|
|
3524
|
+
tenantId: args.tenantId,
|
|
3525
|
+
userId: args.userId
|
|
3526
|
+
})
|
|
3490
3527
|
});
|
|
3491
3528
|
logger.debug(`get provider response: ${response}`);
|
|
3492
3529
|
if (!response.ok) {
|
|
@@ -3499,7 +3536,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3499
3536
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3500
3537
|
const url = _KmsRestClient.urlWithBase("/providers", baseUrl);
|
|
3501
3538
|
const response = await fetch(url, {
|
|
3502
|
-
method: "GET"
|
|
3539
|
+
method: "GET",
|
|
3540
|
+
headers: await this.createHeaders({
|
|
3541
|
+
tenantId: args?.tenantId,
|
|
3542
|
+
userId: args?.userId
|
|
3543
|
+
})
|
|
3503
3544
|
});
|
|
3504
3545
|
logger.debug(`list providers response: ${response}`);
|
|
3505
3546
|
if (!response.ok) {
|
|
@@ -3512,7 +3553,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3512
3553
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3513
3554
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
|
|
3514
3555
|
const response = await fetch(url, {
|
|
3515
|
-
method: "GET"
|
|
3556
|
+
method: "GET",
|
|
3557
|
+
headers: await this.createHeaders({
|
|
3558
|
+
tenantId: args.tenantId,
|
|
3559
|
+
userId: args.userId
|
|
3560
|
+
})
|
|
3516
3561
|
});
|
|
3517
3562
|
logger.debug(`list provider keys response: ${response}`);
|
|
3518
3563
|
if (!response.ok) {
|
|
@@ -3531,7 +3576,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3531
3576
|
const response = await fetch(url, {
|
|
3532
3577
|
method: "POST",
|
|
3533
3578
|
headers: await this.createHeaders({
|
|
3534
|
-
|
|
3579
|
+
contentType: "application/json",
|
|
3580
|
+
tenantId: args.tenantId,
|
|
3581
|
+
userId: args.userId
|
|
3535
3582
|
}),
|
|
3536
3583
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3537
3584
|
});
|
|
@@ -3554,7 +3601,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3554
3601
|
const response = await fetch(url, {
|
|
3555
3602
|
method: "POST",
|
|
3556
3603
|
headers: await this.createHeaders({
|
|
3557
|
-
|
|
3604
|
+
contentType: "application/json",
|
|
3605
|
+
tenantId: args.tenantId,
|
|
3606
|
+
userId: args.userId
|
|
3558
3607
|
}),
|
|
3559
3608
|
body: JSON.stringify(GenerateKeyToJSONTyped(body))
|
|
3560
3609
|
});
|
|
@@ -3569,7 +3618,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3569
3618
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3570
3619
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3571
3620
|
const response = await fetch(url, {
|
|
3572
|
-
method: "GET"
|
|
3621
|
+
method: "GET",
|
|
3622
|
+
headers: await this.createHeaders({
|
|
3623
|
+
tenantId: args.tenantId,
|
|
3624
|
+
userId: args.userId
|
|
3625
|
+
})
|
|
3573
3626
|
});
|
|
3574
3627
|
logger.debug(`get provider key response: ${response}`);
|
|
3575
3628
|
if (!response.ok) {
|
|
@@ -3582,7 +3635,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3582
3635
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3583
3636
|
const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3584
3637
|
const response = await fetch(url, {
|
|
3585
|
-
method: "DELETE"
|
|
3638
|
+
method: "DELETE",
|
|
3639
|
+
headers: await this.createHeaders({
|
|
3640
|
+
tenantId: args.tenantId,
|
|
3641
|
+
userId: args.userId
|
|
3642
|
+
})
|
|
3586
3643
|
});
|
|
3587
3644
|
logger.debug(`delete key response: ${response}`);
|
|
3588
3645
|
if (!response.ok) {
|
|
@@ -3598,9 +3655,17 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3598
3655
|
}
|
|
3599
3656
|
throw new Error("No base url has been provided");
|
|
3600
3657
|
}
|
|
3601
|
-
async createHeaders(
|
|
3658
|
+
async createHeaders(args) {
|
|
3602
3659
|
const headers = {
|
|
3603
|
-
...
|
|
3660
|
+
...args?.contentType ? {
|
|
3661
|
+
"Content-Type": args.contentType
|
|
3662
|
+
} : {},
|
|
3663
|
+
...args?.tenantId ? {
|
|
3664
|
+
"X-Tenant-ID": args.tenantId
|
|
3665
|
+
} : {},
|
|
3666
|
+
...args?.userId ? {
|
|
3667
|
+
"X-User-ID": args.userId
|
|
3668
|
+
} : {},
|
|
3604
3669
|
Accept: "application/json"
|
|
3605
3670
|
};
|
|
3606
3671
|
if (this.authOpts?.enabled === true) {
|