@sphereon/ssi-sdk.kms-rest-client 0.36.1-feature.SSISDK.70.integrate.digidentity.56 → 0.36.1-feature.SSISDK.78.41
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 +20 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -31
- package/dist/index.d.ts +52 -31
- package/dist/index.js +20 -85
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/KmsRestClient.ts +42 -55
- package/src/models/SignatureAlgorithm.ts +0 -3
- package/src/types/IKmsRestClient.ts +60 -43
package/dist/index.d.cts
CHANGED
|
@@ -1914,9 +1914,6 @@ 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";
|
|
1920
1917
|
readonly RsaSsaPssSha256Mgf1: "RSA_SSA_PSS_SHA256_MGF1";
|
|
1921
1918
|
readonly RsaSsaPssSha384Mgf1: "RSA_SSA_PSS_SHA384_MGF1";
|
|
1922
1919
|
readonly RsaSsaPssSha512Mgf1: "RSA_SSA_PSS_SHA512_MGF1";
|
|
@@ -3832,7 +3829,7 @@ declare function VerifySimpleSignatureToJSON(json: any): VerifySimpleSignature;
|
|
|
3832
3829
|
declare function VerifySimpleSignatureToJSONTyped(value?: VerifySimpleSignature | null, ignoreDiscriminator?: boolean): any;
|
|
3833
3830
|
|
|
3834
3831
|
interface IKmsRestClient extends IPluginMethodMap {
|
|
3835
|
-
kmsClientGetResolver(args:
|
|
3832
|
+
kmsClientGetResolver(args: kmsClientGetResolverArgs): Promise<Resolver>;
|
|
3836
3833
|
kmsClientListResolvers(args?: KmsClientListResolversArgs): Promise<ListResolversResponse>;
|
|
3837
3834
|
kmsClientResolveKey(args: KmsClientResolveKeyArgs): Promise<ResolvedKeyInfo>;
|
|
3838
3835
|
kmsClientCreateRawSignature(args: KmsClientCreateRawSignatureArgs): Promise<CreateRawSignatureResponse>;
|
|
@@ -3850,44 +3847,68 @@ interface IKmsRestClient extends IPluginMethodMap {
|
|
|
3850
3847
|
kmsClientProviderGetKey(args: KmsClientProviderGetKeyArgs): Promise<GetKeyResponse>;
|
|
3851
3848
|
kmsClientProviderDeleteKey(args: KmsClientProviderDeleteKeyArgs): Promise<boolean>;
|
|
3852
3849
|
}
|
|
3853
|
-
type
|
|
3850
|
+
type KmsClientListResolversArgs = {
|
|
3854
3851
|
baseUrl?: string;
|
|
3855
|
-
tenantId?: string;
|
|
3856
|
-
userId?: string;
|
|
3857
3852
|
};
|
|
3858
|
-
type
|
|
3859
|
-
|
|
3860
|
-
};
|
|
3861
|
-
type ProviderContextArgs = BaseArgs & {
|
|
3862
|
-
providerId: string;
|
|
3863
|
-
};
|
|
3864
|
-
type KmsClientListResolversArgs = BaseArgs;
|
|
3865
|
-
type KmsClientGetResolverArgs = BaseArgs & {
|
|
3853
|
+
type kmsClientGetResolverArgs = {
|
|
3854
|
+
baseUrl?: string;
|
|
3866
3855
|
resolverId: string;
|
|
3867
3856
|
};
|
|
3868
|
-
type KmsClientResolveKeyArgs =
|
|
3857
|
+
type KmsClientResolveKeyArgs = {
|
|
3858
|
+
baseUrl?: string;
|
|
3869
3859
|
resolverId: String;
|
|
3870
3860
|
} & ResolvePublicKey;
|
|
3871
|
-
type KmsClientCreateRawSignatureArgs =
|
|
3872
|
-
|
|
3873
|
-
|
|
3861
|
+
type KmsClientCreateRawSignatureArgs = {
|
|
3862
|
+
baseUrl?: string;
|
|
3863
|
+
} & CreateRawSignature;
|
|
3864
|
+
type KmsClientIsValidRawSignatureArgs = {
|
|
3865
|
+
baseUrl?: string;
|
|
3866
|
+
} & VerifyRawSignature;
|
|
3867
|
+
type KmsClientGetKeyArgs = {
|
|
3868
|
+
baseUrl?: string;
|
|
3874
3869
|
aliasOrKid: string;
|
|
3875
3870
|
};
|
|
3876
|
-
type KmsClientListKeysArgs =
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3871
|
+
type KmsClientListKeysArgs = {
|
|
3872
|
+
baseUrl?: string;
|
|
3873
|
+
providerId?: string;
|
|
3874
|
+
};
|
|
3875
|
+
type KmsClientStoreKeyArgs = {
|
|
3876
|
+
baseUrl?: string;
|
|
3877
|
+
} & StoreKey;
|
|
3878
|
+
type KmsClientGenerateKeyArgs = {
|
|
3879
|
+
baseUrl?: string;
|
|
3880
|
+
} & GenerateKeyGlobal;
|
|
3881
|
+
type KmsClientDeleteKeyArgs = {
|
|
3882
|
+
baseUrl?: string;
|
|
3880
3883
|
aliasOrKid: string;
|
|
3881
3884
|
};
|
|
3882
|
-
type KmsClientGetKeyProviderArgs =
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
type
|
|
3887
|
-
|
|
3885
|
+
type KmsClientGetKeyProviderArgs = {
|
|
3886
|
+
baseUrl?: string;
|
|
3887
|
+
providerId: string;
|
|
3888
|
+
};
|
|
3889
|
+
type KmsClientListKeyProvidersArgs = {
|
|
3890
|
+
baseUrl?: string;
|
|
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;
|
|
3888
3907
|
aliasOrKid: string;
|
|
3889
3908
|
};
|
|
3890
|
-
type KmsClientProviderDeleteKeyArgs =
|
|
3909
|
+
type KmsClientProviderDeleteKeyArgs = {
|
|
3910
|
+
baseUrl?: string;
|
|
3911
|
+
providerId: string;
|
|
3891
3912
|
aliasOrKid: string;
|
|
3892
3913
|
};
|
|
3893
3914
|
type RestClientAuthenticationOpts = {
|
|
@@ -3949,4 +3970,4 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3949
3970
|
private handleHttpError;
|
|
3950
3971
|
}
|
|
3951
3972
|
|
|
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
|
|
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, type kmsClientGetResolverArgs, plugin_schema as schema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1914,9 +1914,6 @@ 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";
|
|
1920
1917
|
readonly RsaSsaPssSha256Mgf1: "RSA_SSA_PSS_SHA256_MGF1";
|
|
1921
1918
|
readonly RsaSsaPssSha384Mgf1: "RSA_SSA_PSS_SHA384_MGF1";
|
|
1922
1919
|
readonly RsaSsaPssSha512Mgf1: "RSA_SSA_PSS_SHA512_MGF1";
|
|
@@ -3832,7 +3829,7 @@ declare function VerifySimpleSignatureToJSON(json: any): VerifySimpleSignature;
|
|
|
3832
3829
|
declare function VerifySimpleSignatureToJSONTyped(value?: VerifySimpleSignature | null, ignoreDiscriminator?: boolean): any;
|
|
3833
3830
|
|
|
3834
3831
|
interface IKmsRestClient extends IPluginMethodMap {
|
|
3835
|
-
kmsClientGetResolver(args:
|
|
3832
|
+
kmsClientGetResolver(args: kmsClientGetResolverArgs): Promise<Resolver>;
|
|
3836
3833
|
kmsClientListResolvers(args?: KmsClientListResolversArgs): Promise<ListResolversResponse>;
|
|
3837
3834
|
kmsClientResolveKey(args: KmsClientResolveKeyArgs): Promise<ResolvedKeyInfo>;
|
|
3838
3835
|
kmsClientCreateRawSignature(args: KmsClientCreateRawSignatureArgs): Promise<CreateRawSignatureResponse>;
|
|
@@ -3850,44 +3847,68 @@ interface IKmsRestClient extends IPluginMethodMap {
|
|
|
3850
3847
|
kmsClientProviderGetKey(args: KmsClientProviderGetKeyArgs): Promise<GetKeyResponse>;
|
|
3851
3848
|
kmsClientProviderDeleteKey(args: KmsClientProviderDeleteKeyArgs): Promise<boolean>;
|
|
3852
3849
|
}
|
|
3853
|
-
type
|
|
3850
|
+
type KmsClientListResolversArgs = {
|
|
3854
3851
|
baseUrl?: string;
|
|
3855
|
-
tenantId?: string;
|
|
3856
|
-
userId?: string;
|
|
3857
3852
|
};
|
|
3858
|
-
type
|
|
3859
|
-
|
|
3860
|
-
};
|
|
3861
|
-
type ProviderContextArgs = BaseArgs & {
|
|
3862
|
-
providerId: string;
|
|
3863
|
-
};
|
|
3864
|
-
type KmsClientListResolversArgs = BaseArgs;
|
|
3865
|
-
type KmsClientGetResolverArgs = BaseArgs & {
|
|
3853
|
+
type kmsClientGetResolverArgs = {
|
|
3854
|
+
baseUrl?: string;
|
|
3866
3855
|
resolverId: string;
|
|
3867
3856
|
};
|
|
3868
|
-
type KmsClientResolveKeyArgs =
|
|
3857
|
+
type KmsClientResolveKeyArgs = {
|
|
3858
|
+
baseUrl?: string;
|
|
3869
3859
|
resolverId: String;
|
|
3870
3860
|
} & ResolvePublicKey;
|
|
3871
|
-
type KmsClientCreateRawSignatureArgs =
|
|
3872
|
-
|
|
3873
|
-
|
|
3861
|
+
type KmsClientCreateRawSignatureArgs = {
|
|
3862
|
+
baseUrl?: string;
|
|
3863
|
+
} & CreateRawSignature;
|
|
3864
|
+
type KmsClientIsValidRawSignatureArgs = {
|
|
3865
|
+
baseUrl?: string;
|
|
3866
|
+
} & VerifyRawSignature;
|
|
3867
|
+
type KmsClientGetKeyArgs = {
|
|
3868
|
+
baseUrl?: string;
|
|
3874
3869
|
aliasOrKid: string;
|
|
3875
3870
|
};
|
|
3876
|
-
type KmsClientListKeysArgs =
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3871
|
+
type KmsClientListKeysArgs = {
|
|
3872
|
+
baseUrl?: string;
|
|
3873
|
+
providerId?: string;
|
|
3874
|
+
};
|
|
3875
|
+
type KmsClientStoreKeyArgs = {
|
|
3876
|
+
baseUrl?: string;
|
|
3877
|
+
} & StoreKey;
|
|
3878
|
+
type KmsClientGenerateKeyArgs = {
|
|
3879
|
+
baseUrl?: string;
|
|
3880
|
+
} & GenerateKeyGlobal;
|
|
3881
|
+
type KmsClientDeleteKeyArgs = {
|
|
3882
|
+
baseUrl?: string;
|
|
3880
3883
|
aliasOrKid: string;
|
|
3881
3884
|
};
|
|
3882
|
-
type KmsClientGetKeyProviderArgs =
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
type
|
|
3887
|
-
|
|
3885
|
+
type KmsClientGetKeyProviderArgs = {
|
|
3886
|
+
baseUrl?: string;
|
|
3887
|
+
providerId: string;
|
|
3888
|
+
};
|
|
3889
|
+
type KmsClientListKeyProvidersArgs = {
|
|
3890
|
+
baseUrl?: string;
|
|
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;
|
|
3888
3907
|
aliasOrKid: string;
|
|
3889
3908
|
};
|
|
3890
|
-
type KmsClientProviderDeleteKeyArgs =
|
|
3909
|
+
type KmsClientProviderDeleteKeyArgs = {
|
|
3910
|
+
baseUrl?: string;
|
|
3911
|
+
providerId: string;
|
|
3891
3912
|
aliasOrKid: string;
|
|
3892
3913
|
};
|
|
3893
3914
|
type RestClientAuthenticationOpts = {
|
|
@@ -3949,4 +3970,4 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3949
3970
|
private handleHttpError;
|
|
3950
3971
|
}
|
|
3951
3972
|
|
|
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
|
|
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, type kmsClientGetResolverArgs, plugin_schema as schema };
|
package/dist/index.js
CHANGED
|
@@ -1665,9 +1665,6 @@ 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",
|
|
1671
1668
|
RsaSsaPssSha256Mgf1: "RSA_SSA_PSS_SHA256_MGF1",
|
|
1672
1669
|
RsaSsaPssSha384Mgf1: "RSA_SSA_PSS_SHA384_MGF1",
|
|
1673
1670
|
RsaSsaPssSha512Mgf1: "RSA_SSA_PSS_SHA512_MGF1"
|
|
@@ -3310,11 +3307,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3310
3307
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3311
3308
|
const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl);
|
|
3312
3309
|
const response = await fetch(url, {
|
|
3313
|
-
method: "GET"
|
|
3314
|
-
headers: await this.createHeaders({
|
|
3315
|
-
tenantId: args.tenantId,
|
|
3316
|
-
userId: args.userId
|
|
3317
|
-
})
|
|
3310
|
+
method: "GET"
|
|
3318
3311
|
});
|
|
3319
3312
|
logger.debug(`get resolver response: ${response}`);
|
|
3320
3313
|
if (!response.ok) {
|
|
@@ -3327,11 +3320,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3327
3320
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3328
3321
|
const url = _KmsRestClient.urlWithBase("/resolvers", baseUrl);
|
|
3329
3322
|
const response = await fetch(url, {
|
|
3330
|
-
method: "GET"
|
|
3331
|
-
headers: await this.createHeaders({
|
|
3332
|
-
tenantId: args?.tenantId,
|
|
3333
|
-
userId: args?.userId
|
|
3334
|
-
})
|
|
3323
|
+
method: "GET"
|
|
3335
3324
|
});
|
|
3336
3325
|
logger.debug(`list resolvers response: ${response}`);
|
|
3337
3326
|
if (!response.ok) {
|
|
@@ -3352,9 +3341,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3352
3341
|
const response = await fetch(url, {
|
|
3353
3342
|
method: "POST",
|
|
3354
3343
|
headers: await this.createHeaders({
|
|
3355
|
-
|
|
3356
|
-
tenantId: args.tenantId,
|
|
3357
|
-
userId: args.userId
|
|
3344
|
+
"Content-Type": "application/json"
|
|
3358
3345
|
}),
|
|
3359
3346
|
body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
|
|
3360
3347
|
});
|
|
@@ -3367,7 +3354,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3367
3354
|
/** {@inheritDoc IKmsRestClient.kmsCreateRawSignature} */
|
|
3368
3355
|
async kmsClientCreateRawSignature(args) {
|
|
3369
3356
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3370
|
-
const url = _KmsRestClient.urlWithBase(`/signatures/raw
|
|
3357
|
+
const url = _KmsRestClient.urlWithBase(`/signatures/raw`, baseUrl);
|
|
3371
3358
|
const body = {
|
|
3372
3359
|
keyInfo: args.keyInfo,
|
|
3373
3360
|
input: args.input
|
|
@@ -3375,9 +3362,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3375
3362
|
const response = await fetch(url, {
|
|
3376
3363
|
method: "POST",
|
|
3377
3364
|
headers: await this.createHeaders({
|
|
3378
|
-
|
|
3379
|
-
tenantId: args.tenantId,
|
|
3380
|
-
userId: args.userId
|
|
3365
|
+
"Content-Type": "application/json"
|
|
3381
3366
|
}),
|
|
3382
3367
|
body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
|
|
3383
3368
|
});
|
|
@@ -3399,9 +3384,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3399
3384
|
const response = await fetch(url, {
|
|
3400
3385
|
method: "POST",
|
|
3401
3386
|
headers: await this.createHeaders({
|
|
3402
|
-
|
|
3403
|
-
tenantId: args.tenantId,
|
|
3404
|
-
userId: args.userId
|
|
3387
|
+
"Content-Type": "application/json"
|
|
3405
3388
|
}),
|
|
3406
3389
|
body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
|
|
3407
3390
|
});
|
|
@@ -3416,11 +3399,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3416
3399
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3417
3400
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3418
3401
|
const response = await fetch(url, {
|
|
3419
|
-
method: "GET"
|
|
3420
|
-
headers: await this.createHeaders({
|
|
3421
|
-
tenantId: args.tenantId,
|
|
3422
|
-
userId: args.userId
|
|
3423
|
-
})
|
|
3402
|
+
method: "GET"
|
|
3424
3403
|
});
|
|
3425
3404
|
logger.debug(`get key response: ${response}`);
|
|
3426
3405
|
if (!response.ok) {
|
|
@@ -3437,11 +3416,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3437
3416
|
}
|
|
3438
3417
|
});
|
|
3439
3418
|
const response = await fetch(url, {
|
|
3440
|
-
method: "GET"
|
|
3441
|
-
headers: await this.createHeaders({
|
|
3442
|
-
tenantId: args?.tenantId,
|
|
3443
|
-
userId: args?.userId
|
|
3444
|
-
})
|
|
3419
|
+
method: "GET"
|
|
3445
3420
|
});
|
|
3446
3421
|
logger.debug(`list keys response: ${response}`);
|
|
3447
3422
|
if (!response.ok) {
|
|
@@ -3460,9 +3435,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3460
3435
|
const response = await fetch(url, {
|
|
3461
3436
|
method: "POST",
|
|
3462
3437
|
headers: await this.createHeaders({
|
|
3463
|
-
|
|
3464
|
-
tenantId: args.tenantId,
|
|
3465
|
-
userId: args.userId
|
|
3438
|
+
"Content-Type": "application/json"
|
|
3466
3439
|
}),
|
|
3467
3440
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3468
3441
|
});
|
|
@@ -3485,9 +3458,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3485
3458
|
const response = await fetch(url, {
|
|
3486
3459
|
method: "POST",
|
|
3487
3460
|
headers: await this.createHeaders({
|
|
3488
|
-
|
|
3489
|
-
tenantId: args.tenantId,
|
|
3490
|
-
userId: args.userId
|
|
3461
|
+
"Content-Type": "application/json"
|
|
3491
3462
|
}),
|
|
3492
3463
|
body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
|
|
3493
3464
|
});
|
|
@@ -3502,11 +3473,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3502
3473
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3503
3474
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3504
3475
|
const response = await fetch(url, {
|
|
3505
|
-
method: "DELETE"
|
|
3506
|
-
headers: await this.createHeaders({
|
|
3507
|
-
tenantId: args.tenantId,
|
|
3508
|
-
userId: args.userId
|
|
3509
|
-
})
|
|
3476
|
+
method: "DELETE"
|
|
3510
3477
|
});
|
|
3511
3478
|
logger.debug(`delete key response: ${response}`);
|
|
3512
3479
|
if (!response.ok) {
|
|
@@ -3519,11 +3486,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3519
3486
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3520
3487
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl);
|
|
3521
3488
|
const response = await fetch(url, {
|
|
3522
|
-
method: "GET"
|
|
3523
|
-
headers: await this.createHeaders({
|
|
3524
|
-
tenantId: args.tenantId,
|
|
3525
|
-
userId: args.userId
|
|
3526
|
-
})
|
|
3489
|
+
method: "GET"
|
|
3527
3490
|
});
|
|
3528
3491
|
logger.debug(`get provider response: ${response}`);
|
|
3529
3492
|
if (!response.ok) {
|
|
@@ -3536,11 +3499,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3536
3499
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3537
3500
|
const url = _KmsRestClient.urlWithBase("/providers", baseUrl);
|
|
3538
3501
|
const response = await fetch(url, {
|
|
3539
|
-
method: "GET"
|
|
3540
|
-
headers: await this.createHeaders({
|
|
3541
|
-
tenantId: args?.tenantId,
|
|
3542
|
-
userId: args?.userId
|
|
3543
|
-
})
|
|
3502
|
+
method: "GET"
|
|
3544
3503
|
});
|
|
3545
3504
|
logger.debug(`list providers response: ${response}`);
|
|
3546
3505
|
if (!response.ok) {
|
|
@@ -3553,11 +3512,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3553
3512
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3554
3513
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
|
|
3555
3514
|
const response = await fetch(url, {
|
|
3556
|
-
method: "GET"
|
|
3557
|
-
headers: await this.createHeaders({
|
|
3558
|
-
tenantId: args.tenantId,
|
|
3559
|
-
userId: args.userId
|
|
3560
|
-
})
|
|
3515
|
+
method: "GET"
|
|
3561
3516
|
});
|
|
3562
3517
|
logger.debug(`list provider keys response: ${response}`);
|
|
3563
3518
|
if (!response.ok) {
|
|
@@ -3576,9 +3531,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3576
3531
|
const response = await fetch(url, {
|
|
3577
3532
|
method: "POST",
|
|
3578
3533
|
headers: await this.createHeaders({
|
|
3579
|
-
|
|
3580
|
-
tenantId: args.tenantId,
|
|
3581
|
-
userId: args.userId
|
|
3534
|
+
"Content-Type": "application/json"
|
|
3582
3535
|
}),
|
|
3583
3536
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3584
3537
|
});
|
|
@@ -3601,9 +3554,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3601
3554
|
const response = await fetch(url, {
|
|
3602
3555
|
method: "POST",
|
|
3603
3556
|
headers: await this.createHeaders({
|
|
3604
|
-
|
|
3605
|
-
tenantId: args.tenantId,
|
|
3606
|
-
userId: args.userId
|
|
3557
|
+
"Content-Type": "application/json"
|
|
3607
3558
|
}),
|
|
3608
3559
|
body: JSON.stringify(GenerateKeyToJSONTyped(body))
|
|
3609
3560
|
});
|
|
@@ -3618,11 +3569,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3618
3569
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3619
3570
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3620
3571
|
const response = await fetch(url, {
|
|
3621
|
-
method: "GET"
|
|
3622
|
-
headers: await this.createHeaders({
|
|
3623
|
-
tenantId: args.tenantId,
|
|
3624
|
-
userId: args.userId
|
|
3625
|
-
})
|
|
3572
|
+
method: "GET"
|
|
3626
3573
|
});
|
|
3627
3574
|
logger.debug(`get provider key response: ${response}`);
|
|
3628
3575
|
if (!response.ok) {
|
|
@@ -3635,11 +3582,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3635
3582
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3636
3583
|
const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3637
3584
|
const response = await fetch(url, {
|
|
3638
|
-
method: "DELETE"
|
|
3639
|
-
headers: await this.createHeaders({
|
|
3640
|
-
tenantId: args.tenantId,
|
|
3641
|
-
userId: args.userId
|
|
3642
|
-
})
|
|
3585
|
+
method: "DELETE"
|
|
3643
3586
|
});
|
|
3644
3587
|
logger.debug(`delete key response: ${response}`);
|
|
3645
3588
|
if (!response.ok) {
|
|
@@ -3655,17 +3598,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3655
3598
|
}
|
|
3656
3599
|
throw new Error("No base url has been provided");
|
|
3657
3600
|
}
|
|
3658
|
-
async createHeaders(
|
|
3601
|
+
async createHeaders(existing) {
|
|
3659
3602
|
const headers = {
|
|
3660
|
-
...
|
|
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
|
-
} : {},
|
|
3603
|
+
...existing,
|
|
3669
3604
|
Accept: "application/json"
|
|
3670
3605
|
};
|
|
3671
3606
|
if (this.authOpts?.enabled === true) {
|