@sphereon/ssi-sdk.kms-rest-client 0.36.1-feature.SSISDK.82.and.SSISDK.70.37 → 0.36.1-next.11
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 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -28
- package/dist/index.d.ts +52 -28
- package/dist/index.js +20 -82
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/KmsRestClient.ts +42 -55
- package/src/types/IKmsRestClient.ts +60 -43
package/dist/index.d.cts
CHANGED
|
@@ -3829,7 +3829,7 @@ declare function VerifySimpleSignatureToJSON(json: any): VerifySimpleSignature;
|
|
|
3829
3829
|
declare function VerifySimpleSignatureToJSONTyped(value?: VerifySimpleSignature | null, ignoreDiscriminator?: boolean): any;
|
|
3830
3830
|
|
|
3831
3831
|
interface IKmsRestClient extends IPluginMethodMap {
|
|
3832
|
-
kmsClientGetResolver(args:
|
|
3832
|
+
kmsClientGetResolver(args: kmsClientGetResolverArgs): Promise<Resolver>;
|
|
3833
3833
|
kmsClientListResolvers(args?: KmsClientListResolversArgs): Promise<ListResolversResponse>;
|
|
3834
3834
|
kmsClientResolveKey(args: KmsClientResolveKeyArgs): Promise<ResolvedKeyInfo>;
|
|
3835
3835
|
kmsClientCreateRawSignature(args: KmsClientCreateRawSignatureArgs): Promise<CreateRawSignatureResponse>;
|
|
@@ -3847,44 +3847,68 @@ interface IKmsRestClient extends IPluginMethodMap {
|
|
|
3847
3847
|
kmsClientProviderGetKey(args: KmsClientProviderGetKeyArgs): Promise<GetKeyResponse>;
|
|
3848
3848
|
kmsClientProviderDeleteKey(args: KmsClientProviderDeleteKeyArgs): Promise<boolean>;
|
|
3849
3849
|
}
|
|
3850
|
-
type
|
|
3850
|
+
type KmsClientListResolversArgs = {
|
|
3851
3851
|
baseUrl?: string;
|
|
3852
|
-
tenantId?: string;
|
|
3853
|
-
userId?: string;
|
|
3854
3852
|
};
|
|
3855
|
-
type
|
|
3856
|
-
|
|
3857
|
-
};
|
|
3858
|
-
type ProviderContextArgs = BaseArgs & {
|
|
3859
|
-
providerId: string;
|
|
3860
|
-
};
|
|
3861
|
-
type KmsClientListResolversArgs = BaseArgs;
|
|
3862
|
-
type KmsClientGetResolverArgs = BaseArgs & {
|
|
3853
|
+
type kmsClientGetResolverArgs = {
|
|
3854
|
+
baseUrl?: string;
|
|
3863
3855
|
resolverId: string;
|
|
3864
3856
|
};
|
|
3865
|
-
type KmsClientResolveKeyArgs =
|
|
3857
|
+
type KmsClientResolveKeyArgs = {
|
|
3858
|
+
baseUrl?: string;
|
|
3866
3859
|
resolverId: String;
|
|
3867
3860
|
} & ResolvePublicKey;
|
|
3868
|
-
type KmsClientCreateRawSignatureArgs =
|
|
3869
|
-
|
|
3870
|
-
|
|
3861
|
+
type KmsClientCreateRawSignatureArgs = {
|
|
3862
|
+
baseUrl?: string;
|
|
3863
|
+
} & CreateRawSignature;
|
|
3864
|
+
type KmsClientIsValidRawSignatureArgs = {
|
|
3865
|
+
baseUrl?: string;
|
|
3866
|
+
} & VerifyRawSignature;
|
|
3867
|
+
type KmsClientGetKeyArgs = {
|
|
3868
|
+
baseUrl?: string;
|
|
3871
3869
|
aliasOrKid: string;
|
|
3872
3870
|
};
|
|
3873
|
-
type KmsClientListKeysArgs =
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
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;
|
|
3877
3883
|
aliasOrKid: string;
|
|
3878
3884
|
};
|
|
3879
|
-
type KmsClientGetKeyProviderArgs =
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
type
|
|
3884
|
-
|
|
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;
|
|
3885
3907
|
aliasOrKid: string;
|
|
3886
3908
|
};
|
|
3887
|
-
type KmsClientProviderDeleteKeyArgs =
|
|
3909
|
+
type KmsClientProviderDeleteKeyArgs = {
|
|
3910
|
+
baseUrl?: string;
|
|
3911
|
+
providerId: string;
|
|
3888
3912
|
aliasOrKid: string;
|
|
3889
3913
|
};
|
|
3890
3914
|
type RestClientAuthenticationOpts = {
|
|
@@ -3946,4 +3970,4 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3946
3970
|
private handleHttpError;
|
|
3947
3971
|
}
|
|
3948
3972
|
|
|
3949
|
-
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
|
@@ -3829,7 +3829,7 @@ declare function VerifySimpleSignatureToJSON(json: any): VerifySimpleSignature;
|
|
|
3829
3829
|
declare function VerifySimpleSignatureToJSONTyped(value?: VerifySimpleSignature | null, ignoreDiscriminator?: boolean): any;
|
|
3830
3830
|
|
|
3831
3831
|
interface IKmsRestClient extends IPluginMethodMap {
|
|
3832
|
-
kmsClientGetResolver(args:
|
|
3832
|
+
kmsClientGetResolver(args: kmsClientGetResolverArgs): Promise<Resolver>;
|
|
3833
3833
|
kmsClientListResolvers(args?: KmsClientListResolversArgs): Promise<ListResolversResponse>;
|
|
3834
3834
|
kmsClientResolveKey(args: KmsClientResolveKeyArgs): Promise<ResolvedKeyInfo>;
|
|
3835
3835
|
kmsClientCreateRawSignature(args: KmsClientCreateRawSignatureArgs): Promise<CreateRawSignatureResponse>;
|
|
@@ -3847,44 +3847,68 @@ interface IKmsRestClient extends IPluginMethodMap {
|
|
|
3847
3847
|
kmsClientProviderGetKey(args: KmsClientProviderGetKeyArgs): Promise<GetKeyResponse>;
|
|
3848
3848
|
kmsClientProviderDeleteKey(args: KmsClientProviderDeleteKeyArgs): Promise<boolean>;
|
|
3849
3849
|
}
|
|
3850
|
-
type
|
|
3850
|
+
type KmsClientListResolversArgs = {
|
|
3851
3851
|
baseUrl?: string;
|
|
3852
|
-
tenantId?: string;
|
|
3853
|
-
userId?: string;
|
|
3854
3852
|
};
|
|
3855
|
-
type
|
|
3856
|
-
|
|
3857
|
-
};
|
|
3858
|
-
type ProviderContextArgs = BaseArgs & {
|
|
3859
|
-
providerId: string;
|
|
3860
|
-
};
|
|
3861
|
-
type KmsClientListResolversArgs = BaseArgs;
|
|
3862
|
-
type KmsClientGetResolverArgs = BaseArgs & {
|
|
3853
|
+
type kmsClientGetResolverArgs = {
|
|
3854
|
+
baseUrl?: string;
|
|
3863
3855
|
resolverId: string;
|
|
3864
3856
|
};
|
|
3865
|
-
type KmsClientResolveKeyArgs =
|
|
3857
|
+
type KmsClientResolveKeyArgs = {
|
|
3858
|
+
baseUrl?: string;
|
|
3866
3859
|
resolverId: String;
|
|
3867
3860
|
} & ResolvePublicKey;
|
|
3868
|
-
type KmsClientCreateRawSignatureArgs =
|
|
3869
|
-
|
|
3870
|
-
|
|
3861
|
+
type KmsClientCreateRawSignatureArgs = {
|
|
3862
|
+
baseUrl?: string;
|
|
3863
|
+
} & CreateRawSignature;
|
|
3864
|
+
type KmsClientIsValidRawSignatureArgs = {
|
|
3865
|
+
baseUrl?: string;
|
|
3866
|
+
} & VerifyRawSignature;
|
|
3867
|
+
type KmsClientGetKeyArgs = {
|
|
3868
|
+
baseUrl?: string;
|
|
3871
3869
|
aliasOrKid: string;
|
|
3872
3870
|
};
|
|
3873
|
-
type KmsClientListKeysArgs =
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
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;
|
|
3877
3883
|
aliasOrKid: string;
|
|
3878
3884
|
};
|
|
3879
|
-
type KmsClientGetKeyProviderArgs =
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
type
|
|
3884
|
-
|
|
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;
|
|
3885
3907
|
aliasOrKid: string;
|
|
3886
3908
|
};
|
|
3887
|
-
type KmsClientProviderDeleteKeyArgs =
|
|
3909
|
+
type KmsClientProviderDeleteKeyArgs = {
|
|
3910
|
+
baseUrl?: string;
|
|
3911
|
+
providerId: string;
|
|
3888
3912
|
aliasOrKid: string;
|
|
3889
3913
|
};
|
|
3890
3914
|
type RestClientAuthenticationOpts = {
|
|
@@ -3946,4 +3970,4 @@ declare class KmsRestClient implements IAgentPlugin {
|
|
|
3946
3970
|
private handleHttpError;
|
|
3947
3971
|
}
|
|
3948
3972
|
|
|
3949
|
-
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
|
@@ -3307,11 +3307,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3307
3307
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3308
3308
|
const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl);
|
|
3309
3309
|
const response = await fetch(url, {
|
|
3310
|
-
method: "GET"
|
|
3311
|
-
headers: await this.createHeaders({
|
|
3312
|
-
tenantId: args.tenantId,
|
|
3313
|
-
userId: args.userId
|
|
3314
|
-
})
|
|
3310
|
+
method: "GET"
|
|
3315
3311
|
});
|
|
3316
3312
|
logger.debug(`get resolver response: ${response}`);
|
|
3317
3313
|
if (!response.ok) {
|
|
@@ -3324,11 +3320,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3324
3320
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3325
3321
|
const url = _KmsRestClient.urlWithBase("/resolvers", baseUrl);
|
|
3326
3322
|
const response = await fetch(url, {
|
|
3327
|
-
method: "GET"
|
|
3328
|
-
headers: await this.createHeaders({
|
|
3329
|
-
tenantId: args?.tenantId,
|
|
3330
|
-
userId: args?.userId
|
|
3331
|
-
})
|
|
3323
|
+
method: "GET"
|
|
3332
3324
|
});
|
|
3333
3325
|
logger.debug(`list resolvers response: ${response}`);
|
|
3334
3326
|
if (!response.ok) {
|
|
@@ -3349,9 +3341,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3349
3341
|
const response = await fetch(url, {
|
|
3350
3342
|
method: "POST",
|
|
3351
3343
|
headers: await this.createHeaders({
|
|
3352
|
-
|
|
3353
|
-
tenantId: args.tenantId,
|
|
3354
|
-
userId: args.userId
|
|
3344
|
+
"Content-Type": "application/json"
|
|
3355
3345
|
}),
|
|
3356
3346
|
body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
|
|
3357
3347
|
});
|
|
@@ -3364,7 +3354,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3364
3354
|
/** {@inheritDoc IKmsRestClient.kmsCreateRawSignature} */
|
|
3365
3355
|
async kmsClientCreateRawSignature(args) {
|
|
3366
3356
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3367
|
-
const url = _KmsRestClient.urlWithBase(`/signatures/raw
|
|
3357
|
+
const url = _KmsRestClient.urlWithBase(`/signatures/raw`, baseUrl);
|
|
3368
3358
|
const body = {
|
|
3369
3359
|
keyInfo: args.keyInfo,
|
|
3370
3360
|
input: args.input
|
|
@@ -3372,9 +3362,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3372
3362
|
const response = await fetch(url, {
|
|
3373
3363
|
method: "POST",
|
|
3374
3364
|
headers: await this.createHeaders({
|
|
3375
|
-
|
|
3376
|
-
tenantId: args.tenantId,
|
|
3377
|
-
userId: args.userId
|
|
3365
|
+
"Content-Type": "application/json"
|
|
3378
3366
|
}),
|
|
3379
3367
|
body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
|
|
3380
3368
|
});
|
|
@@ -3396,9 +3384,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3396
3384
|
const response = await fetch(url, {
|
|
3397
3385
|
method: "POST",
|
|
3398
3386
|
headers: await this.createHeaders({
|
|
3399
|
-
|
|
3400
|
-
tenantId: args.tenantId,
|
|
3401
|
-
userId: args.userId
|
|
3387
|
+
"Content-Type": "application/json"
|
|
3402
3388
|
}),
|
|
3403
3389
|
body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
|
|
3404
3390
|
});
|
|
@@ -3413,11 +3399,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3413
3399
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3414
3400
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3415
3401
|
const response = await fetch(url, {
|
|
3416
|
-
method: "GET"
|
|
3417
|
-
headers: await this.createHeaders({
|
|
3418
|
-
tenantId: args.tenantId,
|
|
3419
|
-
userId: args.userId
|
|
3420
|
-
})
|
|
3402
|
+
method: "GET"
|
|
3421
3403
|
});
|
|
3422
3404
|
logger.debug(`get key response: ${response}`);
|
|
3423
3405
|
if (!response.ok) {
|
|
@@ -3434,11 +3416,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3434
3416
|
}
|
|
3435
3417
|
});
|
|
3436
3418
|
const response = await fetch(url, {
|
|
3437
|
-
method: "GET"
|
|
3438
|
-
headers: await this.createHeaders({
|
|
3439
|
-
tenantId: args?.tenantId,
|
|
3440
|
-
userId: args?.userId
|
|
3441
|
-
})
|
|
3419
|
+
method: "GET"
|
|
3442
3420
|
});
|
|
3443
3421
|
logger.debug(`list keys response: ${response}`);
|
|
3444
3422
|
if (!response.ok) {
|
|
@@ -3457,9 +3435,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3457
3435
|
const response = await fetch(url, {
|
|
3458
3436
|
method: "POST",
|
|
3459
3437
|
headers: await this.createHeaders({
|
|
3460
|
-
|
|
3461
|
-
tenantId: args.tenantId,
|
|
3462
|
-
userId: args.userId
|
|
3438
|
+
"Content-Type": "application/json"
|
|
3463
3439
|
}),
|
|
3464
3440
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3465
3441
|
});
|
|
@@ -3482,9 +3458,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3482
3458
|
const response = await fetch(url, {
|
|
3483
3459
|
method: "POST",
|
|
3484
3460
|
headers: await this.createHeaders({
|
|
3485
|
-
|
|
3486
|
-
tenantId: args.tenantId,
|
|
3487
|
-
userId: args.userId
|
|
3461
|
+
"Content-Type": "application/json"
|
|
3488
3462
|
}),
|
|
3489
3463
|
body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
|
|
3490
3464
|
});
|
|
@@ -3499,11 +3473,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3499
3473
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3500
3474
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3501
3475
|
const response = await fetch(url, {
|
|
3502
|
-
method: "DELETE"
|
|
3503
|
-
headers: await this.createHeaders({
|
|
3504
|
-
tenantId: args.tenantId,
|
|
3505
|
-
userId: args.userId
|
|
3506
|
-
})
|
|
3476
|
+
method: "DELETE"
|
|
3507
3477
|
});
|
|
3508
3478
|
logger.debug(`delete key response: ${response}`);
|
|
3509
3479
|
if (!response.ok) {
|
|
@@ -3516,11 +3486,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3516
3486
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3517
3487
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl);
|
|
3518
3488
|
const response = await fetch(url, {
|
|
3519
|
-
method: "GET"
|
|
3520
|
-
headers: await this.createHeaders({
|
|
3521
|
-
tenantId: args.tenantId,
|
|
3522
|
-
userId: args.userId
|
|
3523
|
-
})
|
|
3489
|
+
method: "GET"
|
|
3524
3490
|
});
|
|
3525
3491
|
logger.debug(`get provider response: ${response}`);
|
|
3526
3492
|
if (!response.ok) {
|
|
@@ -3533,11 +3499,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3533
3499
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3534
3500
|
const url = _KmsRestClient.urlWithBase("/providers", baseUrl);
|
|
3535
3501
|
const response = await fetch(url, {
|
|
3536
|
-
method: "GET"
|
|
3537
|
-
headers: await this.createHeaders({
|
|
3538
|
-
tenantId: args?.tenantId,
|
|
3539
|
-
userId: args?.userId
|
|
3540
|
-
})
|
|
3502
|
+
method: "GET"
|
|
3541
3503
|
});
|
|
3542
3504
|
logger.debug(`list providers response: ${response}`);
|
|
3543
3505
|
if (!response.ok) {
|
|
@@ -3550,11 +3512,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3550
3512
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3551
3513
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
|
|
3552
3514
|
const response = await fetch(url, {
|
|
3553
|
-
method: "GET"
|
|
3554
|
-
headers: await this.createHeaders({
|
|
3555
|
-
tenantId: args.tenantId,
|
|
3556
|
-
userId: args.userId
|
|
3557
|
-
})
|
|
3515
|
+
method: "GET"
|
|
3558
3516
|
});
|
|
3559
3517
|
logger.debug(`list provider keys response: ${response}`);
|
|
3560
3518
|
if (!response.ok) {
|
|
@@ -3573,9 +3531,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3573
3531
|
const response = await fetch(url, {
|
|
3574
3532
|
method: "POST",
|
|
3575
3533
|
headers: await this.createHeaders({
|
|
3576
|
-
|
|
3577
|
-
tenantId: args.tenantId,
|
|
3578
|
-
userId: args.userId
|
|
3534
|
+
"Content-Type": "application/json"
|
|
3579
3535
|
}),
|
|
3580
3536
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3581
3537
|
});
|
|
@@ -3598,9 +3554,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3598
3554
|
const response = await fetch(url, {
|
|
3599
3555
|
method: "POST",
|
|
3600
3556
|
headers: await this.createHeaders({
|
|
3601
|
-
|
|
3602
|
-
tenantId: args.tenantId,
|
|
3603
|
-
userId: args.userId
|
|
3557
|
+
"Content-Type": "application/json"
|
|
3604
3558
|
}),
|
|
3605
3559
|
body: JSON.stringify(GenerateKeyToJSONTyped(body))
|
|
3606
3560
|
});
|
|
@@ -3615,11 +3569,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3615
3569
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3616
3570
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3617
3571
|
const response = await fetch(url, {
|
|
3618
|
-
method: "GET"
|
|
3619
|
-
headers: await this.createHeaders({
|
|
3620
|
-
tenantId: args.tenantId,
|
|
3621
|
-
userId: args.userId
|
|
3622
|
-
})
|
|
3572
|
+
method: "GET"
|
|
3623
3573
|
});
|
|
3624
3574
|
logger.debug(`get provider key response: ${response}`);
|
|
3625
3575
|
if (!response.ok) {
|
|
@@ -3632,11 +3582,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3632
3582
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3633
3583
|
const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3634
3584
|
const response = await fetch(url, {
|
|
3635
|
-
method: "DELETE"
|
|
3636
|
-
headers: await this.createHeaders({
|
|
3637
|
-
tenantId: args.tenantId,
|
|
3638
|
-
userId: args.userId
|
|
3639
|
-
})
|
|
3585
|
+
method: "DELETE"
|
|
3640
3586
|
});
|
|
3641
3587
|
logger.debug(`delete key response: ${response}`);
|
|
3642
3588
|
if (!response.ok) {
|
|
@@ -3652,17 +3598,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3652
3598
|
}
|
|
3653
3599
|
throw new Error("No base url has been provided");
|
|
3654
3600
|
}
|
|
3655
|
-
async createHeaders(
|
|
3601
|
+
async createHeaders(existing) {
|
|
3656
3602
|
const headers = {
|
|
3657
|
-
...
|
|
3658
|
-
"Content-Type": args.contentType
|
|
3659
|
-
} : {},
|
|
3660
|
-
...args?.tenantId ? {
|
|
3661
|
-
"X-Tenant-ID": args.tenantId
|
|
3662
|
-
} : {},
|
|
3663
|
-
...args?.userId ? {
|
|
3664
|
-
"X-User-ID": args.userId
|
|
3665
|
-
} : {},
|
|
3603
|
+
...existing,
|
|
3666
3604
|
Accept: "application/json"
|
|
3667
3605
|
};
|
|
3668
3606
|
if (this.authOpts?.enabled === true) {
|