@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.SSISDK.70.integrate.digidentity.311 → 0.34.1-feature.SSISDK.82.linkedVP.325
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 +19 -81
- 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 +19 -81
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/KmsRestClient.ts +41 -54
- package/src/types/IKmsRestClient.ts +61 -44
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
|
@@ -3436,11 +3436,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3436
3436
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3437
3437
|
const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl);
|
|
3438
3438
|
const response = await fetch(url, {
|
|
3439
|
-
method: "GET"
|
|
3440
|
-
headers: await this.createHeaders({
|
|
3441
|
-
tenantId: args.tenantId,
|
|
3442
|
-
userId: args.userId
|
|
3443
|
-
})
|
|
3439
|
+
method: "GET"
|
|
3444
3440
|
});
|
|
3445
3441
|
logger.debug(`get resolver response: ${response}`);
|
|
3446
3442
|
if (!response.ok) {
|
|
@@ -3453,11 +3449,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3453
3449
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3454
3450
|
const url = _KmsRestClient.urlWithBase("/resolvers", baseUrl);
|
|
3455
3451
|
const response = await fetch(url, {
|
|
3456
|
-
method: "GET"
|
|
3457
|
-
headers: await this.createHeaders({
|
|
3458
|
-
tenantId: args?.tenantId,
|
|
3459
|
-
userId: args?.userId
|
|
3460
|
-
})
|
|
3452
|
+
method: "GET"
|
|
3461
3453
|
});
|
|
3462
3454
|
logger.debug(`list resolvers response: ${response}`);
|
|
3463
3455
|
if (!response.ok) {
|
|
@@ -3478,9 +3470,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3478
3470
|
const response = await fetch(url, {
|
|
3479
3471
|
method: "POST",
|
|
3480
3472
|
headers: await this.createHeaders({
|
|
3481
|
-
|
|
3482
|
-
tenantId: args.tenantId,
|
|
3483
|
-
userId: args.userId
|
|
3473
|
+
"Content-Type": "application/json"
|
|
3484
3474
|
}),
|
|
3485
3475
|
body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
|
|
3486
3476
|
});
|
|
@@ -3501,9 +3491,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3501
3491
|
const response = await fetch(url, {
|
|
3502
3492
|
method: "POST",
|
|
3503
3493
|
headers: await this.createHeaders({
|
|
3504
|
-
|
|
3505
|
-
tenantId: args.tenantId,
|
|
3506
|
-
userId: args.userId
|
|
3494
|
+
"Content-Type": "application/json"
|
|
3507
3495
|
}),
|
|
3508
3496
|
body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
|
|
3509
3497
|
});
|
|
@@ -3525,9 +3513,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3525
3513
|
const response = await fetch(url, {
|
|
3526
3514
|
method: "POST",
|
|
3527
3515
|
headers: await this.createHeaders({
|
|
3528
|
-
|
|
3529
|
-
tenantId: args.tenantId,
|
|
3530
|
-
userId: args.userId
|
|
3516
|
+
"Content-Type": "application/json"
|
|
3531
3517
|
}),
|
|
3532
3518
|
body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
|
|
3533
3519
|
});
|
|
@@ -3542,11 +3528,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3542
3528
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3543
3529
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3544
3530
|
const response = await fetch(url, {
|
|
3545
|
-
method: "GET"
|
|
3546
|
-
headers: await this.createHeaders({
|
|
3547
|
-
tenantId: args.tenantId,
|
|
3548
|
-
userId: args.userId
|
|
3549
|
-
})
|
|
3531
|
+
method: "GET"
|
|
3550
3532
|
});
|
|
3551
3533
|
logger.debug(`get key response: ${response}`);
|
|
3552
3534
|
if (!response.ok) {
|
|
@@ -3563,11 +3545,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3563
3545
|
}
|
|
3564
3546
|
});
|
|
3565
3547
|
const response = await fetch(url, {
|
|
3566
|
-
method: "GET"
|
|
3567
|
-
headers: await this.createHeaders({
|
|
3568
|
-
tenantId: args?.tenantId,
|
|
3569
|
-
userId: args?.userId
|
|
3570
|
-
})
|
|
3548
|
+
method: "GET"
|
|
3571
3549
|
});
|
|
3572
3550
|
logger.debug(`list keys response: ${response}`);
|
|
3573
3551
|
if (!response.ok) {
|
|
@@ -3586,9 +3564,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3586
3564
|
const response = await fetch(url, {
|
|
3587
3565
|
method: "POST",
|
|
3588
3566
|
headers: await this.createHeaders({
|
|
3589
|
-
|
|
3590
|
-
tenantId: args.tenantId,
|
|
3591
|
-
userId: args.userId
|
|
3567
|
+
"Content-Type": "application/json"
|
|
3592
3568
|
}),
|
|
3593
3569
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3594
3570
|
});
|
|
@@ -3611,9 +3587,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3611
3587
|
const response = await fetch(url, {
|
|
3612
3588
|
method: "POST",
|
|
3613
3589
|
headers: await this.createHeaders({
|
|
3614
|
-
|
|
3615
|
-
tenantId: args.tenantId,
|
|
3616
|
-
userId: args.userId
|
|
3590
|
+
"Content-Type": "application/json"
|
|
3617
3591
|
}),
|
|
3618
3592
|
body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
|
|
3619
3593
|
});
|
|
@@ -3628,11 +3602,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3628
3602
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3629
3603
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3630
3604
|
const response = await fetch(url, {
|
|
3631
|
-
method: "DELETE"
|
|
3632
|
-
headers: await this.createHeaders({
|
|
3633
|
-
tenantId: args.tenantId,
|
|
3634
|
-
userId: args.userId
|
|
3635
|
-
})
|
|
3605
|
+
method: "DELETE"
|
|
3636
3606
|
});
|
|
3637
3607
|
logger.debug(`delete key response: ${response}`);
|
|
3638
3608
|
if (!response.ok) {
|
|
@@ -3645,11 +3615,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3645
3615
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3646
3616
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl);
|
|
3647
3617
|
const response = await fetch(url, {
|
|
3648
|
-
method: "GET"
|
|
3649
|
-
headers: await this.createHeaders({
|
|
3650
|
-
tenantId: args.tenantId,
|
|
3651
|
-
userId: args.userId
|
|
3652
|
-
})
|
|
3618
|
+
method: "GET"
|
|
3653
3619
|
});
|
|
3654
3620
|
logger.debug(`get provider response: ${response}`);
|
|
3655
3621
|
if (!response.ok) {
|
|
@@ -3662,11 +3628,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3662
3628
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3663
3629
|
const url = _KmsRestClient.urlWithBase("/providers", baseUrl);
|
|
3664
3630
|
const response = await fetch(url, {
|
|
3665
|
-
method: "GET"
|
|
3666
|
-
headers: await this.createHeaders({
|
|
3667
|
-
tenantId: args?.tenantId,
|
|
3668
|
-
userId: args?.userId
|
|
3669
|
-
})
|
|
3631
|
+
method: "GET"
|
|
3670
3632
|
});
|
|
3671
3633
|
logger.debug(`list providers response: ${response}`);
|
|
3672
3634
|
if (!response.ok) {
|
|
@@ -3679,11 +3641,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3679
3641
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3680
3642
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
|
|
3681
3643
|
const response = await fetch(url, {
|
|
3682
|
-
method: "GET"
|
|
3683
|
-
headers: await this.createHeaders({
|
|
3684
|
-
tenantId: args.tenantId,
|
|
3685
|
-
userId: args.userId
|
|
3686
|
-
})
|
|
3644
|
+
method: "GET"
|
|
3687
3645
|
});
|
|
3688
3646
|
logger.debug(`list provider keys response: ${response}`);
|
|
3689
3647
|
if (!response.ok) {
|
|
@@ -3702,9 +3660,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3702
3660
|
const response = await fetch(url, {
|
|
3703
3661
|
method: "POST",
|
|
3704
3662
|
headers: await this.createHeaders({
|
|
3705
|
-
|
|
3706
|
-
tenantId: args.tenantId,
|
|
3707
|
-
userId: args.userId
|
|
3663
|
+
"Content-Type": "application/json"
|
|
3708
3664
|
}),
|
|
3709
3665
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3710
3666
|
});
|
|
@@ -3727,9 +3683,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3727
3683
|
const response = await fetch(url, {
|
|
3728
3684
|
method: "POST",
|
|
3729
3685
|
headers: await this.createHeaders({
|
|
3730
|
-
|
|
3731
|
-
tenantId: args.tenantId,
|
|
3732
|
-
userId: args.userId
|
|
3686
|
+
"Content-Type": "application/json"
|
|
3733
3687
|
}),
|
|
3734
3688
|
body: JSON.stringify(GenerateKeyToJSONTyped(body))
|
|
3735
3689
|
});
|
|
@@ -3744,11 +3698,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3744
3698
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3745
3699
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3746
3700
|
const response = await fetch(url, {
|
|
3747
|
-
method: "GET"
|
|
3748
|
-
headers: await this.createHeaders({
|
|
3749
|
-
tenantId: args.tenantId,
|
|
3750
|
-
userId: args.userId
|
|
3751
|
-
})
|
|
3701
|
+
method: "GET"
|
|
3752
3702
|
});
|
|
3753
3703
|
logger.debug(`get provider key response: ${response}`);
|
|
3754
3704
|
if (!response.ok) {
|
|
@@ -3761,11 +3711,7 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3761
3711
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3762
3712
|
const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3763
3713
|
const response = await fetch(url, {
|
|
3764
|
-
method: "DELETE"
|
|
3765
|
-
headers: await this.createHeaders({
|
|
3766
|
-
tenantId: args.tenantId,
|
|
3767
|
-
userId: args.userId
|
|
3768
|
-
})
|
|
3714
|
+
method: "DELETE"
|
|
3769
3715
|
});
|
|
3770
3716
|
logger.debug(`delete key response: ${response}`);
|
|
3771
3717
|
if (!response.ok) {
|
|
@@ -3781,17 +3727,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3781
3727
|
}
|
|
3782
3728
|
throw new Error("No base url has been provided");
|
|
3783
3729
|
}
|
|
3784
|
-
async createHeaders(
|
|
3730
|
+
async createHeaders(existing) {
|
|
3785
3731
|
const headers = {
|
|
3786
|
-
...
|
|
3787
|
-
"Content-Type": args.contentType
|
|
3788
|
-
} : {},
|
|
3789
|
-
...args?.tenantId ? {
|
|
3790
|
-
"X-Tenant-ID": args.tenantId
|
|
3791
|
-
} : {},
|
|
3792
|
-
...args?.userId ? {
|
|
3793
|
-
"X-User-ID": args.userId
|
|
3794
|
-
} : {},
|
|
3732
|
+
...existing,
|
|
3795
3733
|
Accept: "application/json"
|
|
3796
3734
|
};
|
|
3797
3735
|
if (this.authOpts?.enabled === true) {
|