Commit iniziale
This commit is contained in:
21
node_modules/@azure/keyvault-keys/LICENSE
generated
vendored
Normal file
21
node_modules/@azure/keyvault-keys/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
856
node_modules/@azure/keyvault-keys/README.md
generated
vendored
Normal file
856
node_modules/@azure/keyvault-keys/README.md
generated
vendored
Normal file
@@ -0,0 +1,856 @@
|
||||
# Azure Key Vault Key client library for JavaScript
|
||||
|
||||
Azure Key Vault is a service that allows you to encrypt authentication keys, storage account keys, data encryption keys, .pfx files, and passwords by using secured keys.
|
||||
If you would like to know more about Azure Key Vault, you may want to review: [What is Azure Key Vault?][keyvault]
|
||||
|
||||
Azure Key Vault Managed HSM is a fully-managed, highly-available, single-tenant, standards-compliant cloud service that enables you to safeguard cryptographic keys for your cloud applications using FIPS 140-2 Level 3 validated HSMs. If you would like to know more about Azure Key Vault Managed HSM, you may want to review: [What is Azure Key Vault Managed HSM?][managedhsm]
|
||||
|
||||
The Azure Key Vault key library client supports RSA keys, Elliptic Curve (EC) keys, as well as Symmetric (oct) keys when running against a managed HSM, each with corresponding support in hardware security modules (HSM). It offers operations to create, retrieve, update, delete, purge, backup, restore, and list the keys and its versions.
|
||||
|
||||
Use the client library for Azure Key Vault Keys in your Node.js application to:
|
||||
|
||||
- Create keys using elliptic curve or RSA encryption, optionally backed by Hardware Security Modules (HSM).
|
||||
- Import, Delete, and Update keys.
|
||||
- Get one or more keys and deleted keys, with their attributes.
|
||||
- Recover a deleted key and restore a backed up key.
|
||||
- Get the versions of a key.
|
||||
|
||||
Using the cryptography client available in this library you also have access to:
|
||||
|
||||
- Encrypting
|
||||
- Decrypting
|
||||
- Signing
|
||||
- Verifying
|
||||
- Wrapping keys
|
||||
- Unwrapping keys
|
||||
|
||||
> Note: This package cannot be used in the browser due to Azure Key Vault service limitations, please refer to [this document][cors] for guidance.
|
||||
|
||||
Key links:
|
||||
|
||||
- [Source code][package-gh]
|
||||
- [Package (npm)][package-npm]
|
||||
- [API Reference Documentation][docs]
|
||||
- [Product documentation][docs-service]
|
||||
- [Samples][samples]
|
||||
|
||||
## Getting started
|
||||
|
||||
### Currently supported environments
|
||||
|
||||
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription](https://azure.microsoft.com/free/)
|
||||
- An existing [Azure Key Vault][azure_keyvault]. If you need to create a key vault, you can do so in the Azure Portal by following the steps in [this document][azure_keyvault_portal]. Alternatively, use the Azure CLI by following [these steps][azure_keyvault_cli].
|
||||
- If using Managed HSM, an existing [Azure Key Vault Managed HSM][azure_keyvault_mhsm]. If you need to create a Managed HSM, you can do so using the Azure CLI by following the steps in [this document][azure_keyvault_mhsm_cli].
|
||||
|
||||
### Install the package
|
||||
|
||||
Install the Azure Key Vault Key client library using npm
|
||||
|
||||
`npm install @azure/keyvault-keys`
|
||||
|
||||
### Install the identity library
|
||||
|
||||
Azure Key Vault clients authenticate using the Azure identity library. Install it as well using npm
|
||||
|
||||
`npm install @azure/identity`
|
||||
|
||||
### Configure TypeScript
|
||||
|
||||
TypeScript users need to have Node type definitions installed:
|
||||
|
||||
```bash
|
||||
npm install @types/node
|
||||
```
|
||||
|
||||
You also need to enable `compilerOptions.allowSyntheticDefaultImports` in your tsconfig.json. Note that if you have enabled `compilerOptions.esModuleInterop`, `allowSyntheticDefaultImports` is enabled by default. See [TypeScript's compiler options handbook][tscompileroptions] for more information.
|
||||
|
||||
## Key concepts
|
||||
|
||||
- The **Key client** is the primary interface to interact with the API methods
|
||||
related to keys in the Azure Key Vault API from a JavaScript application.
|
||||
Once initialized, it provides a basic set of methods that can be used to
|
||||
create, read, update and delete keys.
|
||||
- A **Key version** is a version of a key in the Key Vault.
|
||||
Each time a user assigns a value to a unique key name, a new **version**
|
||||
of that key is created. Retrieving a key by a name will always return
|
||||
the latest value assigned, unless a specific version is provided to the
|
||||
query.
|
||||
- **Soft delete** allows Key Vaults to support deletion and purging as two
|
||||
separate steps, so deleted keys are not immediately lost. This only happens if the Key Vault
|
||||
has [soft-delete][softdelete]
|
||||
enabled.
|
||||
- A **Key backup** can be generated from any created key. These backups come as
|
||||
binary data, and can only be used to regenerate a previously deleted key.
|
||||
- The **Cryptography client** is a separate interface that interacts with the
|
||||
keys API methods in the Key Vault API. This client focuses only in the
|
||||
cryptography operations that can be executed using a key that has been
|
||||
already created in the Key Vault. More about this client in the
|
||||
[Cryptography](#cryptography) section.
|
||||
|
||||
## Authenticating with Azure Active Directory
|
||||
|
||||
The Key Vault service relies on Azure Active Directory to authenticate requests to its APIs. The [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) package provides a variety of credential types that your application can use to do this. The [README for `@azure/identity`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity/README.md) provides more details and samples to get you started.
|
||||
|
||||
In order to interact with the Azure Key Vault service, you will need to create an instance of the `KeyClient` class, a **vault url** and a credential object. The examples shown in this document use a credential object named [`DefaultAzureCredential`][default_azure_credential], which is appropriate for most scenarios, including local development and production environments. Additionally, we recommend using a [managed identity][managed_identity] for authentication in production environments.
|
||||
|
||||
You can find more information on different ways of authenticating and their corresponding credential types in the [Azure Identity documentation][azure_identity].
|
||||
|
||||
Here's a quick example. First, import `DefaultAzureCredential` and `KeyClient`:
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
```
|
||||
|
||||
Once these are imported, we can next connect to the Key Vault service:
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
// Build the URL to reach your key vault
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`; // or `https://${vaultName}.managedhsm.azure.net` for managed HSM.
|
||||
|
||||
// Lastly, create our keys client and connect to the service
|
||||
const client = new KeyClient(url, credential);
|
||||
```
|
||||
|
||||
## Specifying the Azure Key Vault service API version
|
||||
|
||||
By default, this package uses the latest Azure Key Vault service version which is `7.2`. You can change the service version being used by setting the option `serviceVersion` in the client constructor as shown below:
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
// Change the Azure Key Vault service API version being used via the `serviceVersion` option
|
||||
const client = new KeyClient(url, credential, {
|
||||
serviceVersion: "7.0", // Or 7.1
|
||||
});
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
The following sections provide code snippets that cover some of the common
|
||||
tasks using Azure Key Vault Keys. The scenarios that are covered here consist of:
|
||||
|
||||
- [Creating a key](#creating-a-key).
|
||||
- [Getting a key](#getting-a-key).
|
||||
- [Creating and updating keys with attributes](#creating-and-updating-keys-with-attributes).
|
||||
- [Deleting a key](#deleting-a-key).
|
||||
- [Iterating lists of keys](#iterating-lists-of-keys).
|
||||
|
||||
### Creating a key
|
||||
|
||||
`createKey` creates a Key to be stored in the Azure Key Vault. If a key with the same name already exists, then a new version of the key is created.
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const result = await client.createKey(keyName, "RSA");
|
||||
console.log("result: ", result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
The second parameter sent to `createKey` is the type of the key. The type of keys that are supported will depend on the SKU and whether you are using an Azure Key Vault or an Azure Managed HSM. For an up-to-date list of supported key types please refer to [About keys][aboutkeys]
|
||||
|
||||
### Getting a key
|
||||
|
||||
The simplest way to read keys back from the vault is to get a key by name. This
|
||||
will retrieve the most recent version of the key. You can optionally get a
|
||||
different version of the key if you specify it as part of the optional
|
||||
parameters.
|
||||
|
||||
`getKey` retrieves a key previous stores in the Key Vault.
|
||||
|
||||
```typescript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const latestKey = await client.getKey(keyName);
|
||||
console.log(`Latest version of the key ${keyName}: `, latestKey);
|
||||
const specificKey = await client.getKey(keyName, { version: latestKey.properties.version! });
|
||||
console.log(`The key ${keyName} at the version ${latestKey.properties.version!}: `, specificKey);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Creating and updating keys with attributes
|
||||
|
||||
The following attributes can also be assigned to any key in a Key Vault:
|
||||
|
||||
- `tags`: Any set of key-values that can be used to search and filter keys.
|
||||
- `keyOps`: An array of the operations that this key will be able to perform (`encrypt`, `decrypt`, `sign`, `verify`, `wrapKey`, `unwrapKey`).
|
||||
- `enabled`: A boolean value that determines whether the key value can be read or not.
|
||||
- `notBefore`: A given date after which the key value can be retrieved.
|
||||
- `expires`: A given date after which the key value cannot be retrieved.
|
||||
|
||||
An object with these attributes can be sent as the third parameter of
|
||||
`createKey`, right after the key's name and value, as follows:
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const result = await client.createKey(keyName, "RSA", {
|
||||
enabled: false,
|
||||
});
|
||||
console.log("result: ", result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
This will create a new version of the same key, which will have the latest
|
||||
provided attributes.
|
||||
|
||||
Attributes can also be updated to an existing key version with
|
||||
`updateKeyProperties`, as follows:
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const result = await client.createKey(keyName, "RSA");
|
||||
await client.updateKeyProperties(keyName, result.properties.version, {
|
||||
enabled: false,
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Deleting a key
|
||||
|
||||
The `beginDeleteKey` method starts the deletion of a key.
|
||||
This process will happen in the background as soon as the necessary resources
|
||||
are available.
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const poller = await client.beginDeleteKey(keyName);
|
||||
await poller.pollUntilDone();
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
If [soft-delete][softdelete]
|
||||
is enabled for the Key Vault, this operation will only label the key as a
|
||||
_deleted_ key. A deleted key can't be updated. They can only be
|
||||
read, recovered or purged.
|
||||
|
||||
```typescript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const poller = await client.beginDeleteKey(keyName);
|
||||
|
||||
// You can use the deleted key immediately:
|
||||
const deletedKey = poller.getResult();
|
||||
|
||||
// The key is being deleted. Only wait for it if you want to restore it or purge it.
|
||||
await poller.pollUntilDone();
|
||||
|
||||
// You can also get the deleted key this way:
|
||||
await client.getDeletedKey(keyName);
|
||||
|
||||
// Deleted keys can also be recovered or purged:
|
||||
|
||||
// recoverDeletedKey also returns a poller, just like beginDeleteKey.
|
||||
const recoverPoller = await client.beginRecoverDeletedKey(keyName);
|
||||
await recoverPoller.pollUntilDone();
|
||||
|
||||
// And here is how to purge a deleted key
|
||||
await client.purgeDeletedKey(keyName);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
Since Keys take some time to get fully deleted, `beginDeleteKey`
|
||||
returns a Poller object that keeps track of the underlying Long Running
|
||||
Operation according to our guidelines:
|
||||
https://azure.github.io/azure-sdk/typescript_design.html#ts-lro
|
||||
|
||||
The received poller will allow you to get the deleted key by calling to `poller.getResult()`.
|
||||
You can also wait until the deletion finishes either by running individual service
|
||||
calls until the key is deleted, or by waiting until the process is done:
|
||||
|
||||
```typescript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const poller = await client.beginDeleteKey(keyName);
|
||||
|
||||
// You can use the deleted key immediately:
|
||||
let deletedKey = poller.getResult();
|
||||
|
||||
// Or you can wait until the key finishes being deleted:
|
||||
deletedKey = await poller.pollUntilDone();
|
||||
console.log(deletedKey);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
Another way to wait until the key is fully deleted is to do individual calls, as follows:
|
||||
|
||||
```typescript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
const { delay } = require("@azure/core-util");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
const poller = await client.beginDeleteKey(keyName);
|
||||
|
||||
while (!poller.isDone()) {
|
||||
await poller.poll();
|
||||
await delay(5000);
|
||||
}
|
||||
|
||||
console.log(`The key ${keyName} is fully deleted`);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Configuring Automatic Key Rotation
|
||||
|
||||
Using the KeyClient, you can configure automatic key rotation for a key by specifying the rotation policy.
|
||||
In addition, KeyClient provides a method to rotate a key on-demand by creating a new version of the given key.
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const url = `https://<YOUR KEYVAULT NAME>.vault.azure.net`;
|
||||
const client = new KeyClient(url, new DefaultAzureCredential());
|
||||
|
||||
async function main() {
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
// Set the key's automated rotation policy to rotate the key 30 days before expiry.
|
||||
const policy = await client.updateKeyRotationPolicy(keyName, {
|
||||
lifetimeActions: [
|
||||
{
|
||||
action: "Rotate",
|
||||
timeBeforeExpiry: "P30D",
|
||||
},
|
||||
],
|
||||
// You may also specify the duration after which any newly rotated key will expire.
|
||||
// In this case, any new key versions will expire after 90 days.
|
||||
expiresIn: "P90D",
|
||||
});
|
||||
|
||||
// You can get the current key rotation policy of a given key by calling the getKeyRotationPolicy method.
|
||||
const currentPolicy = await client.getKeyRotationPolicy(keyName);
|
||||
|
||||
// Finally, you can rotate a key on-demand by creating a new version of the given key.
|
||||
const rotatedKey = await client.rotateKey(keyName);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Iterating lists of keys
|
||||
|
||||
Using the KeyClient, you can retrieve and iterate through all of the
|
||||
keys in an Azure Key Vault, as well as through all of the deleted keys and the
|
||||
versions of a specific key. The following API methods are available:
|
||||
|
||||
- `listPropertiesOfKeys` will list all of your non-deleted keys by their names, only
|
||||
at their latest versions.
|
||||
- `listDeletedKeys` will list all of your deleted keys by their names,
|
||||
only at their latest versions.
|
||||
- `listPropertiesOfKeyVersions` will list all the versions of a key based on a key
|
||||
name.
|
||||
|
||||
Which can be used as follows:
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
for await (let keyProperties of client.listPropertiesOfKeys()) {
|
||||
console.log("Key properties: ", keyProperties);
|
||||
}
|
||||
for await (let deletedKey of client.listDeletedKeys()) {
|
||||
console.log("Deleted: ", deletedKey);
|
||||
}
|
||||
for await (let versionProperties of client.listPropertiesOfKeyVersions(keyName)) {
|
||||
console.log("Version properties: ", versionProperties);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
All of these methods will return **all of the available results** at once. To
|
||||
retrieve them by pages, add `.byPage()` right after invoking the API method you
|
||||
want to use, as follows:
|
||||
|
||||
```javascript
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
const { KeyClient } = require("@azure/keyvault-keys");
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const client = new KeyClient(url, credential);
|
||||
|
||||
const keyName = "MyKeyName";
|
||||
|
||||
async function main() {
|
||||
for await (let page of client.listPropertiesOfKeys().byPage()) {
|
||||
for (let keyProperties of page) {
|
||||
console.log("Key properties: ", keyProperties);
|
||||
}
|
||||
}
|
||||
for await (let page of client.listDeletedKeys().byPage()) {
|
||||
for (let deletedKey of page) {
|
||||
console.log("Deleted key: ", deletedKey);
|
||||
}
|
||||
}
|
||||
for await (let page of client.listPropertiesOfKeyVersions(keyName).byPage()) {
|
||||
for (let versionProperties of page) {
|
||||
console.log("Version: ", versionProperties);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
## Cryptography
|
||||
|
||||
This library also offers a set of cryptographic utilities available through
|
||||
`CryptographyClient`. Similar to the `KeyClient`, `CryptographyClient` will
|
||||
connect to Azure Key Vault with the provided set of credentials. Once
|
||||
connected, `CryptographyClient` can encrypt, decrypt, sign, verify, wrap keys,
|
||||
and unwrap keys.
|
||||
|
||||
We can next connect to the key vault service just as we do with the `KeyClient`.
|
||||
We'll need to copy some settings from the key vault we are
|
||||
connecting to into our environment variables. Once they are in our environment,
|
||||
we can access them with the following code:
|
||||
|
||||
```typescript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
// Create or retrieve a key from the keyvault
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
|
||||
// Lastly, create our cryptography client and connect to the service
|
||||
const cryptographyClient = new CryptographyClient(myKey, credential);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Encrypt
|
||||
|
||||
`encrypt` will encrypt a message.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey.id, credential);
|
||||
|
||||
const encryptResult = await cryptographyClient.encrypt({
|
||||
algorithm: "RSA1_5",
|
||||
plaintext: Buffer.from("My Message"),
|
||||
});
|
||||
console.log("encrypt result: ", encryptResult.result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Decrypt
|
||||
|
||||
`decrypt` will decrypt an encrypted message.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey.id, credential);
|
||||
|
||||
const encryptResult = await cryptographyClient.encrypt({
|
||||
algorithm: "RSA1_5",
|
||||
plaintext: Buffer.from("My Message"),
|
||||
});
|
||||
console.log("encrypt result: ", encryptResult.result);
|
||||
|
||||
const decryptResult = await cryptographyClient.decrypt({
|
||||
algorithm: "RSA1_5",
|
||||
ciphertext: encryptResult.result,
|
||||
});
|
||||
console.log("decrypt result: ", decryptResult.result.toString());
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Sign
|
||||
|
||||
`sign` will cryptographically sign the digest (hash) of a message with a signature.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
import { createHash } from "crypto";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey, credential);
|
||||
|
||||
const signatureValue = "MySignature";
|
||||
let hash = createHash("sha256");
|
||||
|
||||
let digest = hash.update(signatureValue).digest();
|
||||
console.log("digest: ", digest);
|
||||
|
||||
const signResult = await cryptographyClient.sign("RS256", digest);
|
||||
console.log("sign result: ", signResult.result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Sign Data
|
||||
|
||||
`signData` will cryptographically sign a message with a signature.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey, credential);
|
||||
|
||||
const signResult = await cryptographyClient.signData("RS256", Buffer.from("My Message"));
|
||||
console.log("sign result: ", signResult.result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Verify
|
||||
|
||||
`verify` will cryptographically verify that the signed digest was signed with the given signature.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
import { createHash } from "crypto";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey, credential);
|
||||
|
||||
const hash = createHash("sha256");
|
||||
hash.update("My Message");
|
||||
const digest = hash.digest();
|
||||
|
||||
const signResult = await cryptographyClient.sign("RS256", digest);
|
||||
console.log("sign result: ", signResult.result);
|
||||
|
||||
const verifyResult = await cryptographyClient.verify("RS256", digest, signResult.result);
|
||||
console.log("verify result: ", verifyResult.result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Verify Data
|
||||
|
||||
`verifyData` will cryptographically verify that the signed message was signed with the given signature.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey, credential);
|
||||
|
||||
const buffer = Buffer.from("My Message");
|
||||
|
||||
const signResult = await cryptographyClient.signData("RS256", buffer);
|
||||
console.log("sign result: ", signResult.result);
|
||||
|
||||
const verifyResult = await cryptographyClient.verifyData("RS256", buffer, signResult.result);
|
||||
console.log("verify result: ", verifyResult.result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Wrap Key
|
||||
|
||||
`wrapKey` will wrap a key with an encryption layer.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey, credential);
|
||||
|
||||
const wrapResult = await cryptographyClient.wrapKey("RSA-OAEP", Buffer.from("My Key"));
|
||||
console.log("wrap result:", wrapResult.result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
### Unwrap Key
|
||||
|
||||
`unwrapKey` will unwrap a wrapped key.
|
||||
|
||||
```javascript
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
||||
const vaultName = "<YOUR KEYVAULT NAME>";
|
||||
const url = `https://${vaultName}.vault.azure.net`;
|
||||
|
||||
const keysClient = new KeyClient(url, credential);
|
||||
|
||||
async function main() {
|
||||
let myKey = await keysClient.createKey("MyKey", "RSA");
|
||||
const cryptographyClient = new CryptographyClient(myKey, credential);
|
||||
|
||||
const wrapResult = await cryptographyClient.wrapKey("RSA-OAEP", Buffer.from("My Key"));
|
||||
console.log("wrap result:", wrapResult.result);
|
||||
|
||||
const unwrapResult = await cryptographyClient.unwrapKey("RSA-OAEP", wrapResult.result);
|
||||
console.log("unwrap result: ", unwrapResult.result);
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
See our [troubleshooting guide](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-keys/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios.
|
||||
|
||||
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
||||
|
||||
```javascript
|
||||
const { setLogLevel } = require("@azure/logger");
|
||||
|
||||
setLogLevel("info");
|
||||
```
|
||||
|
||||
## Next steps
|
||||
|
||||
You can find more code samples through the following links:
|
||||
|
||||
- [Key Vault Keys Samples (JavaScript)](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-keys/samples/v4/javascript)
|
||||
- [Key Vault Keys Samples (TypeScript)](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-keys/samples/v4/typescript)
|
||||
- [Key Vault Keys Test Cases](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-keys/test/)
|
||||
|
||||
## Contributing
|
||||
|
||||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
|
||||
|
||||
[aboutkeys]: https://docs.microsoft.com/azure/key-vault/keys/about-keys
|
||||
[keyvault]: https://docs.microsoft.com/azure/key-vault/key-vault-overview
|
||||
[managedhsm]: https://docs.microsoft.com/azure/key-vault/managed-hsm/overview
|
||||
[cors]: https://github.com/Azure/azure-sdk-for-js/blob/main/samples/cors/ts/README.md
|
||||
[package-gh]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/keyvault/keyvault-keys
|
||||
[package-npm]: https://www.npmjs.com/package/@azure/keyvault-keys
|
||||
[docs]: https://docs.microsoft.com/javascript/api/@azure/keyvault-keys
|
||||
[docs-service]: https://azure.microsoft.com/services/key-vault/
|
||||
[samples]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-keys/samples
|
||||
[tscompileroptions]: https://www.typescriptlang.org/docs/handbook/compiler-options.html
|
||||
[softdelete]: https://docs.microsoft.com/azure/key-vault/key-vault-ovw-soft-delete
|
||||
[azure_keyvault]: https://docs.microsoft.com/azure/key-vault/general/overview
|
||||
[azure_keyvault_cli]: https://docs.microsoft.com/azure/key-vault/general/quick-create-cli
|
||||
[azure_keyvault_portal]: https://docs.microsoft.com/azure/key-vault/general/quick-create-portal
|
||||
[azure_keyvault_mhsm]: https://docs.microsoft.com/azure/key-vault/managed-hsm/overview
|
||||
[azure_keyvault_mhsm_cli]: https://docs.microsoft.com/azure/key-vault/managed-hsm/quick-create-cli
|
||||
[default_azure_credential]: https://learn.microsoft.com/javascript/api/@azure/identity/defaultazurecredential?view=azure-node-latest
|
||||
[managed_identity]: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview
|
||||
[azure_identity]: https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest
|
||||
|
||||

|
||||
2
node_modules/@azure/keyvault-keys/dist/browser/constants.d.ts
generated
vendored
Normal file
2
node_modules/@azure/keyvault-keys/dist/browser/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const SDK_VERSION: string;
|
||||
//# sourceMappingURL=constants.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/constants.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/constants.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAgB,CAAC"}
|
||||
4
node_modules/@azure/keyvault-keys/dist/browser/constants.js
generated
vendored
Normal file
4
node_modules/@azure/keyvault-keys/dist/browser/constants.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export const SDK_VERSION = "4.9.0";
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/constants.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/constants.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"4.9.0\";\n"]}
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider-browser.d.mts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider-browser.d.mts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"aesCryptographyProvider-browser.d.mts","sourceRoot":"","sources":["../../../src/cryptography/aesCryptographyProvider-browser.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAqC,MAAM,aAAa,CAAC;AAEtF;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,oBAAoB;IAClE,OAAO,IAAI,KAAK;IAKhB,OAAO,IAAI,KAAK;IAMhB;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB,OAAO,IAAI,KAAK;IAMhB,SAAS,IAAI,KAAK;IAMlB,IAAI,IAAI,KAAK;IAMb,QAAQ,IAAI,KAAK;IAMjB,MAAM,IAAI,KAAK;IAMf,UAAU,IAAI,KAAK;CAKpB"}
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider-browser.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider-browser.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"aesCryptographyProvider-browser.mjs","sourceRoot":"","sources":["../../../src/cryptography/aesCryptographyProvider-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAwB,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAClC,OAAO;QACL,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IACD,OAAO;QACL,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO;QACL,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,SAAS;QACP,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,IAAI;QACF,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,UAAU;QACR,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CryptographyProvider, LocalCryptographyUnsupportedError } from \"./models.js\";\n\n/**\n * The browser replacement of the AesCryptographyProvider. Since we do not\n * support local cryptography in the browser this replacement always returns false\n * for `supportsAlgorithm` and `supportsOperation` so that these methods should\n * never be called.\n */\nexport class AesCryptographyProvider implements CryptographyProvider {\n encrypt(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n decrypt(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n\n /**\n * Browser RSA provider does not support any algorithms or operations.\n */\n isSupported(): boolean {\n return false;\n }\n\n wrapKey(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n\n unwrapKey(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n\n sign(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n\n signData(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n\n verify(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n\n verifyData(): never {\n throw new LocalCryptographyUnsupportedError(\n \"AES Local cryptography is not supported in the browser.\",\n );\n }\n}\n"]}
|
||||
22
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider.d.ts
generated
vendored
Normal file
22
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { CryptographyProvider } from "./models.js";
|
||||
/**
|
||||
* The browser replacement of the AesCryptographyProvider. Since we do not
|
||||
* support local cryptography in the browser this replacement always returns false
|
||||
* for `supportsAlgorithm` and `supportsOperation` so that these methods should
|
||||
* never be called.
|
||||
*/
|
||||
export declare class AesCryptographyProvider implements CryptographyProvider {
|
||||
encrypt(): never;
|
||||
decrypt(): never;
|
||||
/**
|
||||
* Browser RSA provider does not support any algorithms or operations.
|
||||
*/
|
||||
isSupported(): boolean;
|
||||
wrapKey(): never;
|
||||
unwrapKey(): never;
|
||||
sign(): never;
|
||||
signData(): never;
|
||||
verify(): never;
|
||||
verifyData(): never;
|
||||
}
|
||||
//# sourceMappingURL=aesCryptographyProvider-browser.d.mts.map
|
||||
42
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider.js
generated
vendored
Normal file
42
node_modules/@azure/keyvault-keys/dist/browser/cryptography/aesCryptographyProvider.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { LocalCryptographyUnsupportedError } from "./models.js";
|
||||
/**
|
||||
* The browser replacement of the AesCryptographyProvider. Since we do not
|
||||
* support local cryptography in the browser this replacement always returns false
|
||||
* for `supportsAlgorithm` and `supportsOperation` so that these methods should
|
||||
* never be called.
|
||||
*/
|
||||
export class AesCryptographyProvider {
|
||||
encrypt() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
decrypt() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
/**
|
||||
* Browser RSA provider does not support any algorithms or operations.
|
||||
*/
|
||||
isSupported() {
|
||||
return false;
|
||||
}
|
||||
wrapKey() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
unwrapKey() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
sign() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
signData() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
verify() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
verifyData() {
|
||||
throw new LocalCryptographyUnsupportedError("AES Local cryptography is not supported in the browser.");
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=aesCryptographyProvider-browser.mjs.map
|
||||
8
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.d.ts
generated
vendored
Normal file
8
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { JsonWebKey } from "../keysModels.js";
|
||||
/**
|
||||
* @internal
|
||||
* Encode a JWK to PEM format. To do so, it internally repackages the JWK as a DER
|
||||
* that is then encoded as a PEM.
|
||||
*/
|
||||
export declare function convertJWKtoPEM(key: JsonWebKey): string;
|
||||
//# sourceMappingURL=conversions.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../../../src/cryptography/conversions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAqF9C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAiBvD"}
|
||||
99
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.js
generated
vendored
Normal file
99
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
/**
|
||||
* @internal
|
||||
* Encodes a length of a packet in DER format
|
||||
*/
|
||||
function encodeLength(length) {
|
||||
if (length <= 127) {
|
||||
return Uint8Array.of(length);
|
||||
}
|
||||
else if (length < 256) {
|
||||
return Uint8Array.of(0x81, length);
|
||||
}
|
||||
else if (length < 65536) {
|
||||
return Uint8Array.of(0x82, length >> 8, length & 0xff);
|
||||
}
|
||||
else {
|
||||
throw new Error("Unsupported length to encode");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
* Encodes a buffer for DER, as sets the id to the given id
|
||||
*/
|
||||
function encodeBuffer(buffer, bufferId) {
|
||||
if (buffer.length === 0) {
|
||||
return buffer;
|
||||
}
|
||||
let result = new Uint8Array(buffer);
|
||||
// If the high bit is set, prepend a 0
|
||||
if (result[0] & 0x80) {
|
||||
const array = new Uint8Array(result.length + 1);
|
||||
array[0] = 0;
|
||||
array.set(result, 1);
|
||||
result = array;
|
||||
}
|
||||
// Prepend the DER header for this buffer
|
||||
const encodedLength = encodeLength(result.length);
|
||||
const totalLength = 1 + encodedLength.length + result.length;
|
||||
const outputBuffer = new Uint8Array(totalLength);
|
||||
outputBuffer[0] = bufferId;
|
||||
outputBuffer.set(encodedLength, 1);
|
||||
outputBuffer.set(result, 1 + encodedLength.length);
|
||||
return outputBuffer;
|
||||
}
|
||||
function makeSequence(encodedParts) {
|
||||
const totalLength = encodedParts.reduce((sum, part) => sum + part.length, 0);
|
||||
const sequence = new Uint8Array(totalLength);
|
||||
for (let i = 0; i < encodedParts.length; i++) {
|
||||
const previousLength = i > 0 ? encodedParts[i - 1].length : 0;
|
||||
sequence.set(encodedParts[i], previousLength);
|
||||
}
|
||||
const full_encoded = encodeBuffer(sequence, 0x30); // SEQUENCE
|
||||
return Buffer.from(full_encoded).toString("base64");
|
||||
}
|
||||
/**
|
||||
* Fill in the PEM with 64 character lines as per RFC:
|
||||
*
|
||||
* "To represent the encapsulated text of a PEM message, the encoding
|
||||
* function's output is delimited into text lines (using local
|
||||
* conventions), with each line except the last containing exactly 64
|
||||
* printable characters and the final line containing 64 or fewer
|
||||
* printable characters."
|
||||
*/
|
||||
function formatBase64Sequence(base64Sequence) {
|
||||
const lines = base64Sequence.match(/.{1,64}/g);
|
||||
let result = "";
|
||||
if (lines) {
|
||||
for (const line of lines) {
|
||||
result += line;
|
||||
result += "\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new Error("Could not create correct PEM");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
* Encode a JWK to PEM format. To do so, it internally repackages the JWK as a DER
|
||||
* that is then encoded as a PEM.
|
||||
*/
|
||||
export function convertJWKtoPEM(key) {
|
||||
let result = "";
|
||||
if (key.n && key.e) {
|
||||
const parts = [key.n, key.e];
|
||||
const encodedParts = parts.map((part) => encodeBuffer(part, 0x2)); // INTEGER
|
||||
const base64Sequence = makeSequence(encodedParts);
|
||||
result += "-----BEGIN RSA PUBLIC KEY-----\n";
|
||||
result += formatBase64Sequence(base64Sequence);
|
||||
result += "-----END RSA PUBLIC KEY-----\n";
|
||||
}
|
||||
if (!result.length) {
|
||||
throw new Error("Unsupported key format for local operations");
|
||||
}
|
||||
return result.slice(0, -1); // Removing the last new line
|
||||
}
|
||||
//# sourceMappingURL=conversions.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/conversions.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto-browser.d.mts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto-browser.d.mts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"crypto-browser.d.mts","sourceRoot":"","sources":["../../../src/cryptography/crypto-browser.mts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAIvF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,KAAK,CAIzE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAIvD"}
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto-browser.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto-browser.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"crypto-browser.mjs","sourceRoot":"","sources":["../../../src/cryptography/crypto-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,UAAkB,EAAE,KAAiB;IACpE,MAAM,IAAI,iCAAiC,CACzC,uDAAuD,CACxD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,UAAkB,EAAE,KAAiB;IAChE,MAAM,IAAI,iCAAiC,CACzC,uDAAuD,CACxD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,MAAM,IAAI,iCAAiC,CACzC,sDAAsD,CACvD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { LocalCryptographyUnsupportedError } from \"./models.js\";\n\n/**\n * @internal\n * Use the platform-local hashing functionality\n */\nexport async function createHash(_algorithm: string, _data: Uint8Array): Promise<Buffer> {\n throw new LocalCryptographyUnsupportedError(\n \"Our libraries don't currently support browser hashing\",\n );\n}\n\n/**\n * @internal\n * Use the platform-local verify functionality\n */\nexport function createVerify(_algorithm: string, _data: Uint8Array): never {\n throw new LocalCryptographyUnsupportedError(\n \"Our libraries don't currently support browser hashing\",\n );\n}\n\n/**\n * @internal\n * Use the platform-local randomBytes functionality\n */\nexport function randomBytes(_length: number): Uint8Array {\n throw new LocalCryptographyUnsupportedError(\n \"Our libraries don't currently support browser crypto\",\n );\n}\n"]}
|
||||
16
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto.d.ts
generated
vendored
Normal file
16
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @internal
|
||||
* Use the platform-local hashing functionality
|
||||
*/
|
||||
export declare function createHash(_algorithm: string, _data: Uint8Array): Promise<Buffer>;
|
||||
/**
|
||||
* @internal
|
||||
* Use the platform-local verify functionality
|
||||
*/
|
||||
export declare function createVerify(_algorithm: string, _data: Uint8Array): never;
|
||||
/**
|
||||
* @internal
|
||||
* Use the platform-local randomBytes functionality
|
||||
*/
|
||||
export declare function randomBytes(_length: number): Uint8Array;
|
||||
//# sourceMappingURL=crypto-browser.d.mts.map
|
||||
25
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto.js
generated
vendored
Normal file
25
node_modules/@azure/keyvault-keys/dist/browser/cryptography/crypto.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { LocalCryptographyUnsupportedError } from "./models.js";
|
||||
/**
|
||||
* @internal
|
||||
* Use the platform-local hashing functionality
|
||||
*/
|
||||
export async function createHash(_algorithm, _data) {
|
||||
throw new LocalCryptographyUnsupportedError("Our libraries don't currently support browser hashing");
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
* Use the platform-local verify functionality
|
||||
*/
|
||||
export function createVerify(_algorithm, _data) {
|
||||
throw new LocalCryptographyUnsupportedError("Our libraries don't currently support browser hashing");
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
* Use the platform-local randomBytes functionality
|
||||
*/
|
||||
export function randomBytes(_length) {
|
||||
throw new LocalCryptographyUnsupportedError("Our libraries don't currently support browser crypto");
|
||||
}
|
||||
//# sourceMappingURL=crypto-browser.mjs.map
|
||||
101
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.d.ts
generated
vendored
Normal file
101
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.d.ts
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
import { OperationOptions } from "@azure/core-client";
|
||||
import { DecryptOptions, DecryptParameters, DecryptResult, EncryptOptions, EncryptParameters, EncryptResult, KeyWrapAlgorithm, SignOptions, SignResult, SignatureAlgorithm, UnwrapKeyOptions, UnwrapResult, VerifyOptions, VerifyResult, WrapKeyOptions, WrapResult } from "../index.js";
|
||||
export declare class LocalCryptographyUnsupportedError extends Error {
|
||||
}
|
||||
/**
|
||||
* The set of operations a {@link CryptographyProvider} supports.
|
||||
*
|
||||
* This corresponds to every single method on the interface so that providers
|
||||
* can declare whether they support this method or not.
|
||||
*
|
||||
* Purposely more granular than {@link KnownKeyOperations} because some providers
|
||||
* support verifyData but not verify.
|
||||
* @internal
|
||||
*/
|
||||
export type CryptographyProviderOperation = "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "sign" | "signData" | "verify" | "verifyData";
|
||||
/**
|
||||
*
|
||||
* Represents an object that can perform cryptography operations.
|
||||
* @internal
|
||||
*/
|
||||
export interface CryptographyProvider {
|
||||
/**
|
||||
* Encrypts the given plaintext with the specified encryption parameters.
|
||||
* @internal
|
||||
*
|
||||
* @param encryptParameters - The encryption parameters, keyed on the encryption algorithm chosen.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
encrypt(encryptParameters: EncryptParameters, options?: EncryptOptions): Promise<EncryptResult>;
|
||||
/**
|
||||
* Decrypts the given ciphertext with the specified decryption parameters.
|
||||
* @internal
|
||||
*
|
||||
* @param decryptParameters - The decryption parameters.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
decrypt(decryptParameters: DecryptParameters, options?: DecryptOptions): Promise<DecryptResult>;
|
||||
/**
|
||||
*
|
||||
* @param algorithm - The algorithm to check support for.
|
||||
* @param operation - The {@link CryptographyProviderOperation} to check support for.
|
||||
*/
|
||||
isSupported(algorithm: string, operation: CryptographyProviderOperation): boolean;
|
||||
/**
|
||||
* Wraps the given key using the specified cryptography algorithm
|
||||
* @internal
|
||||
*
|
||||
* @param algorithm - The encryption algorithm to use to wrap the given key.
|
||||
* @param keyToWrap - The key to wrap.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
wrapKey(algorithm: KeyWrapAlgorithm, keyToWrap: Uint8Array, options?: WrapKeyOptions): Promise<WrapResult>;
|
||||
/**
|
||||
* Unwraps the given wrapped key using the specified cryptography algorithm
|
||||
* @internal
|
||||
*
|
||||
* @param algorithm - The decryption algorithm to use to unwrap the key.
|
||||
* @param encryptedKey - The encrypted key to unwrap.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
unwrapKey(algorithm: KeyWrapAlgorithm, encryptedKey: Uint8Array, options?: UnwrapKeyOptions): Promise<UnwrapResult>;
|
||||
/**
|
||||
* Cryptographically sign the digest of a message
|
||||
* @internal
|
||||
*
|
||||
* @param algorithm - The signing algorithm to use.
|
||||
* @param digest - The digest of the data to sign.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
sign(algorithm: SignatureAlgorithm, digest: Uint8Array, options?: SignOptions): Promise<SignResult>;
|
||||
/**
|
||||
* Cryptographically sign a block of data
|
||||
* @internal
|
||||
*
|
||||
* @param algorithm - The signing algorithm to use.
|
||||
* @param data - The data to sign.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
signData(algorithm: SignatureAlgorithm, data: Uint8Array, options?: SignOptions): Promise<SignResult>;
|
||||
/**
|
||||
* Verify the signed message digest
|
||||
* @internal
|
||||
*
|
||||
* @param algorithm - The signing algorithm to use to verify with.
|
||||
* @param digest - The digest to verify.
|
||||
* @param signature - The signature to verify the digest against.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
verify(algorithm: SignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, options?: VerifyOptions): Promise<VerifyResult>;
|
||||
/**
|
||||
* Verify the signed block of data
|
||||
* @internal
|
||||
*
|
||||
* @param algorithm - The algorithm to use to verify with.
|
||||
* @param data - The signed block of data to verify.
|
||||
* @param signature - The signature to verify the block against.
|
||||
* @param updatedOptions - Additional options.
|
||||
*/
|
||||
verifyData(algorithm: string, data: Uint8Array, signature: Uint8Array, updatedOptions: OperationOptions): Promise<VerifyResult>;
|
||||
}
|
||||
//# sourceMappingURL=models.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/cryptography/models.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,EACd,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,qBAAa,iCAAkC,SAAQ,KAAK;CAAG;AAE/D;;;;;;;;;GASG;AACH,MAAM,MAAM,6BAA6B,GACrC,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,GACX,MAAM,GACN,UAAU,GACV,QAAQ,GACR,YAAY,CAAC;AAEjB;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEhG;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEhG;;;;OAIG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,6BAA6B,GAAG,OAAO,CAAC;IAElF;;;;;;;OAOG;IACH,OAAO,CACL,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,UAAU,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvB;;;;;;;OAOG;IACH,SAAS,CACP,SAAS,EAAE,gBAAgB,EAC3B,YAAY,EAAE,UAAU,EACxB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB;;;;;;;OAOG;IACH,IAAI,CACF,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvB;;;;;;;OAOG;IACH,QAAQ,CACN,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,UAAU,EAChB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvB;;;;;;;;OAQG;IACH,MAAM,CACJ,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,UAAU,EACrB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB;;;;;;;;OAQG;IACH,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,UAAU,EACrB,cAAc,EAAE,gBAAgB,GAC/B,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1B"}
|
||||
5
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.js
generated
vendored
Normal file
5
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
export class LocalCryptographyUnsupportedError extends Error {
|
||||
}
|
||||
//# sourceMappingURL=models.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/models.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/cryptography/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsBlC,MAAM,OAAO,iCAAkC,SAAQ,KAAK;CAAG","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n DecryptOptions,\n DecryptParameters,\n DecryptResult,\n EncryptOptions,\n EncryptParameters,\n EncryptResult,\n KeyWrapAlgorithm,\n SignOptions,\n SignResult,\n SignatureAlgorithm,\n UnwrapKeyOptions,\n UnwrapResult,\n VerifyOptions,\n VerifyResult,\n WrapKeyOptions,\n WrapResult,\n} from \"../index.js\";\n\nexport class LocalCryptographyUnsupportedError extends Error {}\n\n/**\n * The set of operations a {@link CryptographyProvider} supports.\n *\n * This corresponds to every single method on the interface so that providers\n * can declare whether they support this method or not.\n *\n * Purposely more granular than {@link KnownKeyOperations} because some providers\n * support verifyData but not verify.\n * @internal\n */\nexport type CryptographyProviderOperation =\n | \"encrypt\"\n | \"decrypt\"\n | \"wrapKey\"\n | \"unwrapKey\"\n | \"sign\"\n | \"signData\"\n | \"verify\"\n | \"verifyData\";\n\n/**\n *\n * Represents an object that can perform cryptography operations.\n * @internal\n */\nexport interface CryptographyProvider {\n /**\n * Encrypts the given plaintext with the specified encryption parameters.\n * @internal\n *\n * @param encryptParameters - The encryption parameters, keyed on the encryption algorithm chosen.\n * @param options - Additional options.\n */\n encrypt(encryptParameters: EncryptParameters, options?: EncryptOptions): Promise<EncryptResult>;\n\n /**\n * Decrypts the given ciphertext with the specified decryption parameters.\n * @internal\n *\n * @param decryptParameters - The decryption parameters.\n * @param options - Additional options.\n */\n decrypt(decryptParameters: DecryptParameters, options?: DecryptOptions): Promise<DecryptResult>;\n\n /**\n *\n * @param algorithm - The algorithm to check support for.\n * @param operation - The {@link CryptographyProviderOperation} to check support for.\n */\n isSupported(algorithm: string, operation: CryptographyProviderOperation): boolean;\n\n /**\n * Wraps the given key using the specified cryptography algorithm\n * @internal\n *\n * @param algorithm - The encryption algorithm to use to wrap the given key.\n * @param keyToWrap - The key to wrap.\n * @param options - Additional options.\n */\n wrapKey(\n algorithm: KeyWrapAlgorithm,\n keyToWrap: Uint8Array,\n options?: WrapKeyOptions,\n ): Promise<WrapResult>;\n\n /**\n * Unwraps the given wrapped key using the specified cryptography algorithm\n * @internal\n *\n * @param algorithm - The decryption algorithm to use to unwrap the key.\n * @param encryptedKey - The encrypted key to unwrap.\n * @param options - Additional options.\n */\n unwrapKey(\n algorithm: KeyWrapAlgorithm,\n encryptedKey: Uint8Array,\n options?: UnwrapKeyOptions,\n ): Promise<UnwrapResult>;\n\n /**\n * Cryptographically sign the digest of a message\n * @internal\n *\n * @param algorithm - The signing algorithm to use.\n * @param digest - The digest of the data to sign.\n * @param options - Additional options.\n */\n sign(\n algorithm: SignatureAlgorithm,\n digest: Uint8Array,\n options?: SignOptions,\n ): Promise<SignResult>;\n\n /**\n * Cryptographically sign a block of data\n * @internal\n *\n * @param algorithm - The signing algorithm to use.\n * @param data - The data to sign.\n * @param options - Additional options.\n */\n signData(\n algorithm: SignatureAlgorithm,\n data: Uint8Array,\n options?: SignOptions,\n ): Promise<SignResult>;\n\n /**\n * Verify the signed message digest\n * @internal\n *\n * @param algorithm - The signing algorithm to use to verify with.\n * @param digest - The digest to verify.\n * @param signature - The signature to verify the digest against.\n * @param options - Additional options.\n */\n verify(\n algorithm: SignatureAlgorithm,\n digest: Uint8Array,\n signature: Uint8Array,\n options?: VerifyOptions,\n ): Promise<VerifyResult>;\n\n /**\n * Verify the signed block of data\n * @internal\n *\n * @param algorithm - The algorithm to use to verify with.\n * @param data - The signed block of data to verify.\n * @param signature - The signature to verify the block against.\n * @param updatedOptions - Additional options.\n */\n verifyData(\n algorithm: string,\n data: Uint8Array,\n signature: Uint8Array,\n updatedOptions: OperationOptions,\n ): Promise<VerifyResult>;\n}\n"]}
|
||||
58
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.d.ts
generated
vendored
Normal file
58
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
import { TokenCredential } from "@azure/core-auth";
|
||||
import { DecryptOptions, DecryptParameters, DecryptResult, EncryptOptions, EncryptParameters, EncryptResult, KeyWrapAlgorithm, SignOptions, SignResult, UnwrapKeyOptions, VerifyOptions, VerifyResult, WrapKeyOptions, WrapResult } from "../cryptographyClientModels.js";
|
||||
import { UnwrapResult } from "../cryptographyClientModels.js";
|
||||
import { CryptographyClientOptions, GetKeyOptions, KeyVaultKey } from "../keysModels.js";
|
||||
import { CryptographyProvider, CryptographyProviderOperation } from "./models.js";
|
||||
/**
|
||||
* The remote cryptography provider is used to run crypto operations against KeyVault.
|
||||
* @internal
|
||||
*/
|
||||
export declare class RemoteCryptographyProvider implements CryptographyProvider {
|
||||
constructor(key: string | KeyVaultKey, credential: TokenCredential, pipelineOptions?: CryptographyClientOptions);
|
||||
isSupported(_algorithm: string, _operation: CryptographyProviderOperation): boolean;
|
||||
encrypt(encryptParameters: EncryptParameters, options?: EncryptOptions): Promise<EncryptResult>;
|
||||
decrypt(decryptParameters: DecryptParameters, options?: DecryptOptions): Promise<DecryptResult>;
|
||||
wrapKey(algorithm: KeyWrapAlgorithm, keyToWrap: Uint8Array, options?: WrapKeyOptions): Promise<WrapResult>;
|
||||
unwrapKey(algorithm: KeyWrapAlgorithm, encryptedKey: Uint8Array, options?: UnwrapKeyOptions): Promise<UnwrapResult>;
|
||||
sign(algorithm: string, digest: Uint8Array, options?: SignOptions): Promise<SignResult>;
|
||||
verifyData(algorithm: string, data: Uint8Array, signature: Uint8Array, options?: VerifyOptions): Promise<VerifyResult>;
|
||||
verify(algorithm: string, digest: Uint8Array, signature: Uint8Array, options?: VerifyOptions): Promise<VerifyResult>;
|
||||
signData(algorithm: string, data: Uint8Array, options?: SignOptions): Promise<SignResult>;
|
||||
/**
|
||||
* The base URL to the vault.
|
||||
*/
|
||||
readonly vaultUrl: string;
|
||||
/**
|
||||
* The ID of the key used to perform cryptographic operations for the client.
|
||||
*/
|
||||
get keyId(): string | undefined;
|
||||
/**
|
||||
* Gets the {@link KeyVaultKey} used for cryptography operations, fetching it
|
||||
* from KeyVault if necessary.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
getKey(options?: GetKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* A reference to the auto-generated KeyVault HTTP client.
|
||||
*/
|
||||
private client;
|
||||
/**
|
||||
* A reference to the key used for the cryptographic operations.
|
||||
* Based on what was provided to the CryptographyClient constructor,
|
||||
* it can be either a string with the URL of a Key Vault Key, or an already parsed {@link KeyVaultKey}.
|
||||
*/
|
||||
private key;
|
||||
/**
|
||||
* Name of the key the client represents
|
||||
*/
|
||||
private name;
|
||||
/**
|
||||
* Version of the key the client represents
|
||||
*/
|
||||
private version;
|
||||
/**
|
||||
* Attempts to retrieve the ID of the key.
|
||||
*/
|
||||
private getKeyID;
|
||||
}
|
||||
//# sourceMappingURL=remoteCryptographyProvider.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"remoteCryptographyProvider.d.ts","sourceRoot":"","sources":["../../../src/cryptography/remoteCryptographyProvider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,UAAU,EACX,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,WAAW,EAEZ,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAKlF;;;GAGG;AACH,qBAAa,0BAA2B,YAAW,oBAAoB;gBAEnE,GAAG,EAAE,MAAM,GAAG,WAAW,EACzB,UAAU,EAAE,eAAe,EAC3B,eAAe,GAAE,yBAA8B;IAkCjD,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,6BAA6B,GAAG,OAAO;IAInF,OAAO,CACL,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC;IA6BzB,OAAO,CACL,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC;IAyBzB,OAAO,CACL,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,UAAU,EACrB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,UAAU,CAAC;IAuBtB,SAAS,CACP,SAAS,EAAE,gBAAgB,EAC3B,YAAY,EAAE,UAAU,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,YAAY,CAAC;IAuBxB,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAmB3F,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,UAAU,EACrB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC;IAWxB,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,UAAU,EACrB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC;IAsBxB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAmB7F;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IAsBzD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAiB;IAE/B;;;;OAIG;IACH,OAAO,CAAC,GAAG,CAAuB;IAElC;;OAEG;IACH,OAAO,CAAC,IAAI,CAAS;IAErB;;OAEG;IACH,OAAO,CAAC,OAAO,CAAS;IAExB;;OAEG;IACH,OAAO,CAAC,QAAQ;CAUjB"}
|
||||
198
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.js
generated
vendored
Normal file
198
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.js
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { __rest } from "tslib";
|
||||
import { SDK_VERSION } from "../constants.js";
|
||||
import { KeyVaultClient } from "../generated/index.js";
|
||||
import { parseKeyVaultKeyIdentifier } from "../identifier.js";
|
||||
import { LATEST_API_VERSION, } from "../keysModels.js";
|
||||
import { getKeyFromKeyBundle } from "../transformations.js";
|
||||
import { createHash } from "./crypto.js";
|
||||
import { logger } from "../log.js";
|
||||
import { keyVaultAuthenticationPolicy } from "@azure/keyvault-common";
|
||||
import { tracingClient } from "../tracing.js";
|
||||
/**
|
||||
* The remote cryptography provider is used to run crypto operations against KeyVault.
|
||||
* @internal
|
||||
*/
|
||||
export class RemoteCryptographyProvider {
|
||||
constructor(key, credential, pipelineOptions = {}) {
|
||||
var _a;
|
||||
this.client = getOrInitializeClient(credential, pipelineOptions);
|
||||
this.key = key;
|
||||
let keyId;
|
||||
if (typeof key === "string") {
|
||||
keyId = key;
|
||||
}
|
||||
else {
|
||||
keyId = key.id;
|
||||
}
|
||||
try {
|
||||
const parsed = parseKeyVaultKeyIdentifier(keyId);
|
||||
if (parsed.name === "") {
|
||||
throw new Error("Could not find 'name' of key in key URL");
|
||||
}
|
||||
if (!parsed.vaultUrl || parsed.vaultUrl === "") {
|
||||
throw new Error("Could not find 'vaultUrl' of key in key URL");
|
||||
}
|
||||
this.vaultUrl = parsed.vaultUrl;
|
||||
this.name = parsed.name;
|
||||
this.version = (_a = parsed.version) !== null && _a !== void 0 ? _a : "";
|
||||
}
|
||||
catch (err) {
|
||||
logger.error(err);
|
||||
throw new Error(`${keyId} is not a valid Key Vault key ID`);
|
||||
}
|
||||
}
|
||||
// The remote client supports all algorithms and all operations.
|
||||
isSupported(_algorithm, _operation) {
|
||||
return true;
|
||||
}
|
||||
encrypt(encryptParameters, options = {}) {
|
||||
const { algorithm, plaintext } = encryptParameters, params = __rest(encryptParameters, ["algorithm", "plaintext"]);
|
||||
const requestOptions = Object.assign(Object.assign({}, options), params);
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.encrypt", requestOptions, async (updatedOptions) => {
|
||||
const result = await this.client.encrypt(this.vaultUrl, this.name, this.version, algorithm, plaintext, updatedOptions);
|
||||
return {
|
||||
algorithm: encryptParameters.algorithm,
|
||||
result: result.result,
|
||||
keyID: this.getKeyID(),
|
||||
additionalAuthenticatedData: result.additionalAuthenticatedData,
|
||||
authenticationTag: result.authenticationTag,
|
||||
iv: result.iv,
|
||||
};
|
||||
});
|
||||
}
|
||||
decrypt(decryptParameters, options = {}) {
|
||||
const { algorithm, ciphertext } = decryptParameters, params = __rest(decryptParameters, ["algorithm", "ciphertext"]);
|
||||
const requestOptions = Object.assign(Object.assign({}, options), params);
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.decrypt", requestOptions, async (updatedOptions) => {
|
||||
const result = await this.client.decrypt(this.vaultUrl, this.name, this.version, algorithm, ciphertext, updatedOptions);
|
||||
return {
|
||||
result: result.result,
|
||||
keyID: this.getKeyID(),
|
||||
algorithm,
|
||||
};
|
||||
});
|
||||
}
|
||||
wrapKey(algorithm, keyToWrap, options = {}) {
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.wrapKey", options, async (updatedOptions) => {
|
||||
const result = await this.client.wrapKey(this.vaultUrl, this.name, this.version, algorithm, keyToWrap, updatedOptions);
|
||||
return {
|
||||
result: result.result,
|
||||
algorithm,
|
||||
keyID: this.getKeyID(),
|
||||
};
|
||||
});
|
||||
}
|
||||
unwrapKey(algorithm, encryptedKey, options = {}) {
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.unwrapKey", options, async (updatedOptions) => {
|
||||
const result = await this.client.unwrapKey(this.vaultUrl, this.name, this.version, algorithm, encryptedKey, updatedOptions);
|
||||
return {
|
||||
result: result.result,
|
||||
algorithm,
|
||||
keyID: this.getKeyID(),
|
||||
};
|
||||
});
|
||||
}
|
||||
sign(algorithm, digest, options = {}) {
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.sign", options, async (updatedOptions) => {
|
||||
const result = await this.client.sign(this.vaultUrl, this.name, this.version, algorithm, digest, updatedOptions);
|
||||
return { result: result.result, algorithm, keyID: this.getKeyID() };
|
||||
});
|
||||
}
|
||||
verifyData(algorithm, data, signature, options = {}) {
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.verifyData", options, async (updatedOptions) => {
|
||||
const hash = await createHash(algorithm, data);
|
||||
return this.verify(algorithm, hash, signature, updatedOptions);
|
||||
});
|
||||
}
|
||||
verify(algorithm, digest, signature, options = {}) {
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.verify", options, async (updatedOptions) => {
|
||||
const response = await this.client.verify(this.vaultUrl, this.name, this.version, algorithm, digest, signature, updatedOptions);
|
||||
return {
|
||||
result: response.value ? response.value : false,
|
||||
keyID: this.getKeyID(),
|
||||
};
|
||||
});
|
||||
}
|
||||
signData(algorithm, data, options = {}) {
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.signData", options, async (updatedOptions) => {
|
||||
const digest = await createHash(algorithm, data);
|
||||
const result = await this.client.sign(this.vaultUrl, this.name, this.version, algorithm, digest, updatedOptions);
|
||||
return { result: result.result, algorithm, keyID: this.getKeyID() };
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The ID of the key used to perform cryptographic operations for the client.
|
||||
*/
|
||||
get keyId() {
|
||||
return this.getKeyID();
|
||||
}
|
||||
/**
|
||||
* Gets the {@link KeyVaultKey} used for cryptography operations, fetching it
|
||||
* from KeyVault if necessary.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
getKey(options = {}) {
|
||||
return tracingClient.withSpan("RemoteCryptographyProvider.getKey", options, async (updatedOptions) => {
|
||||
if (typeof this.key === "string") {
|
||||
if (!this.name || this.name === "") {
|
||||
throw new Error("getKey requires a key with a name");
|
||||
}
|
||||
const response = await this.client.getKey(this.vaultUrl, this.name, options && options.version ? options.version : this.version ? this.version : "", updatedOptions);
|
||||
this.key = getKeyFromKeyBundle(response);
|
||||
}
|
||||
return this.key;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Attempts to retrieve the ID of the key.
|
||||
*/
|
||||
getKeyID() {
|
||||
let kid;
|
||||
if (typeof this.key !== "string") {
|
||||
kid = this.key.id;
|
||||
}
|
||||
else {
|
||||
kid = this.key;
|
||||
}
|
||||
return kid;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A helper method to either get the passed down generated client or initialize a new one.
|
||||
* An already constructed generated client may be passed down from {@link KeyClient} in which case we should reuse it.
|
||||
*
|
||||
* @internal
|
||||
* @param credential - The credential to use when initializing a new client.
|
||||
* @param options - The options for constructing a client or the underlying client if one already exists.
|
||||
* @returns - A generated client instance
|
||||
*/
|
||||
function getOrInitializeClient(credential, options) {
|
||||
if (options.generatedClient) {
|
||||
return options.generatedClient;
|
||||
}
|
||||
const libInfo = `azsdk-js-keyvault-keys/${SDK_VERSION}`;
|
||||
const userAgentOptions = options.userAgentOptions;
|
||||
options.userAgentOptions = {
|
||||
userAgentPrefix: userAgentOptions && userAgentOptions.userAgentPrefix
|
||||
? `${userAgentOptions.userAgentPrefix} ${libInfo}`
|
||||
: libInfo,
|
||||
};
|
||||
const internalPipelineOptions = Object.assign(Object.assign({}, options), { loggingOptions: {
|
||||
logger: logger.info,
|
||||
allowedHeaderNames: [
|
||||
"x-ms-keyvault-region",
|
||||
"x-ms-keyvault-network-info",
|
||||
"x-ms-keyvault-service-version",
|
||||
],
|
||||
} });
|
||||
const client = new KeyVaultClient(options.serviceVersion || LATEST_API_VERSION, internalPipelineOptions);
|
||||
// The authentication policy must come after the deserialization policy since the deserialization policy
|
||||
// converts 401 responses to an Error, and we don't want to deal with that.
|
||||
client.pipeline.addPolicy(keyVaultAuthenticationPolicy(credential, options), {
|
||||
afterPolicies: ["deserializationPolicy"],
|
||||
});
|
||||
return client;
|
||||
}
|
||||
//# sourceMappingURL=remoteCryptographyProvider.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/remoteCryptographyProvider.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider-browser.d.mts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider-browser.d.mts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"rsaCryptographyProvider-browser.d.mts","sourceRoot":"","sources":["../../../src/cryptography/rsaCryptographyProvider-browser.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAqC,MAAM,aAAa,CAAC;AAEtF;;;;;GAKG;AACH,qBAAa,uBAAwB,YAAW,oBAAoB;IAClE,OAAO,IAAI,KAAK;IAKhB,OAAO,IAAI,KAAK;IAMhB;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB,OAAO,IAAI,KAAK;IAMhB,SAAS,IAAI,KAAK;IAMlB,IAAI,IAAI,KAAK;IAMb,QAAQ,IAAI,KAAK;IAMjB,MAAM,IAAI,KAAK;IAMf,UAAU,IAAI,KAAK;CAKpB"}
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider-browser.mjs.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider-browser.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"rsaCryptographyProvider-browser.mjs","sourceRoot":"","sources":["../../../src/cryptography/rsaCryptographyProvider-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAwB,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAClC,OAAO;QACL,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IACD,OAAO;QACL,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO;QACL,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,SAAS;QACP,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,IAAI;QACF,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,UAAU;QACR,MAAM,IAAI,iCAAiC,CACzC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CryptographyProvider, LocalCryptographyUnsupportedError } from \"./models.js\";\n\n/**\n * The browser replacement of the RsaCryptographyProvider. Since we do not\n * support local cryptography in the browser this replacement always returns false\n * for `supportsAlgorithm` and `supportsOperation` so that these methods should\n * never be called.\n */\nexport class RsaCryptographyProvider implements CryptographyProvider {\n encrypt(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n decrypt(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n\n /**\n * Browser RSA Provider does not support any algorithms or operations.\n */\n isSupported(): boolean {\n return false;\n }\n\n wrapKey(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n\n unwrapKey(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n\n sign(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n\n signData(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n\n verify(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n\n verifyData(): never {\n throw new LocalCryptographyUnsupportedError(\n \"RSA Local cryptography is not supported in the browser.\",\n );\n }\n}\n"]}
|
||||
22
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider.d.ts
generated
vendored
Normal file
22
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { CryptographyProvider } from "./models.js";
|
||||
/**
|
||||
* The browser replacement of the RsaCryptographyProvider. Since we do not
|
||||
* support local cryptography in the browser this replacement always returns false
|
||||
* for `supportsAlgorithm` and `supportsOperation` so that these methods should
|
||||
* never be called.
|
||||
*/
|
||||
export declare class RsaCryptographyProvider implements CryptographyProvider {
|
||||
encrypt(): never;
|
||||
decrypt(): never;
|
||||
/**
|
||||
* Browser RSA Provider does not support any algorithms or operations.
|
||||
*/
|
||||
isSupported(): boolean;
|
||||
wrapKey(): never;
|
||||
unwrapKey(): never;
|
||||
sign(): never;
|
||||
signData(): never;
|
||||
verify(): never;
|
||||
verifyData(): never;
|
||||
}
|
||||
//# sourceMappingURL=rsaCryptographyProvider-browser.d.mts.map
|
||||
42
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider.js
generated
vendored
Normal file
42
node_modules/@azure/keyvault-keys/dist/browser/cryptography/rsaCryptographyProvider.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { LocalCryptographyUnsupportedError } from "./models.js";
|
||||
/**
|
||||
* The browser replacement of the RsaCryptographyProvider. Since we do not
|
||||
* support local cryptography in the browser this replacement always returns false
|
||||
* for `supportsAlgorithm` and `supportsOperation` so that these methods should
|
||||
* never be called.
|
||||
*/
|
||||
export class RsaCryptographyProvider {
|
||||
encrypt() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
decrypt() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
/**
|
||||
* Browser RSA Provider does not support any algorithms or operations.
|
||||
*/
|
||||
isSupported() {
|
||||
return false;
|
||||
}
|
||||
wrapKey() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
unwrapKey() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
sign() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
signData() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
verify() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
verifyData() {
|
||||
throw new LocalCryptographyUnsupportedError("RSA Local cryptography is not supported in the browser.");
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=rsaCryptographyProvider-browser.mjs.map
|
||||
243
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.d.ts
generated
vendored
Normal file
243
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.d.ts
generated
vendored
Normal file
@@ -0,0 +1,243 @@
|
||||
import { TokenCredential } from "@azure/core-auth";
|
||||
import { CryptographyClientOptions, JsonWebKey, KeyVaultKey } from "./keysModels.js";
|
||||
import { DecryptOptions, DecryptParameters, DecryptResult, EncryptOptions, EncryptParameters, EncryptResult, EncryptionAlgorithm, KeyWrapAlgorithm, SignOptions, SignResult, SignatureAlgorithm, UnwrapKeyOptions, UnwrapResult, VerifyOptions, VerifyResult, WrapKeyOptions, WrapResult } from "./cryptographyClientModels.js";
|
||||
/**
|
||||
* A client used to perform cryptographic operations on an Azure Key vault key
|
||||
* or a local {@link JsonWebKey}.
|
||||
*/
|
||||
export declare class CryptographyClient {
|
||||
/**
|
||||
* The key the CryptographyClient currently holds.
|
||||
*/
|
||||
private key;
|
||||
/**
|
||||
* The remote provider, which would be undefined if used in local mode.
|
||||
*/
|
||||
private remoteProvider?;
|
||||
/**
|
||||
* Constructs a new instance of the Cryptography client for the given key
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* import { KeyClient, CryptographyClient } from "@azure/keyvault-keys";
|
||||
* import { DefaultAzureCredential } from "@azure/identity";
|
||||
*
|
||||
* let vaultUrl = `https://<MY KEYVAULT HERE>.vault.azure.net`;
|
||||
* let credentials = new DefaultAzureCredential();
|
||||
*
|
||||
* let keyClient = new KeyClient(vaultUrl, credentials);
|
||||
* let keyVaultKey = await keyClient.getKey("MyKey");
|
||||
*
|
||||
* let client = new CryptographyClient(keyVaultKey.id, credentials);
|
||||
* // or
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* ```
|
||||
* @param key - The key to use during cryptography tasks. You can also pass the identifier of the key i.e its url here.
|
||||
* @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \@azure/identity package to create a credential that suits your needs.
|
||||
* @param pipelineOptions - Pipeline options used to configure Key Vault API requests.
|
||||
* Omit this parameter to use the default pipeline configuration.
|
||||
*/
|
||||
constructor(key: string | KeyVaultKey, credential: TokenCredential, pipelineOptions?: CryptographyClientOptions);
|
||||
/**
|
||||
* Constructs a new instance of the Cryptography client for the given key in local mode.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* import { CryptographyClient } from "@azure/keyvault-keys";
|
||||
*
|
||||
* const jsonWebKey: JsonWebKey = {
|
||||
* // ...
|
||||
* };
|
||||
* const client = new CryptographyClient(jsonWebKey);
|
||||
* ```
|
||||
* @param key - The JsonWebKey to use during cryptography operations.
|
||||
*/
|
||||
constructor(key: JsonWebKey);
|
||||
/**
|
||||
* The base URL to the vault. If a local {@link JsonWebKey} is used vaultUrl will be empty.
|
||||
*/
|
||||
get vaultUrl(): string;
|
||||
/**
|
||||
* The ID of the key used to perform cryptographic operations for the client.
|
||||
*/
|
||||
get keyID(): string | undefined;
|
||||
/**
|
||||
* Encrypts the given plaintext with the specified encryption parameters.
|
||||
* Depending on the algorithm set in the encryption parameters, the set of possible encryption parameters will change.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.encrypt({ algorithm: "RSA1_5", plaintext: Buffer.from("My Message")});
|
||||
* let result = await client.encrypt({ algorithm: "A256GCM", plaintext: Buffer.from("My Message"), additionalAuthenticatedData: Buffer.from("My authenticated data")});
|
||||
* ```
|
||||
* @param encryptParameters - The encryption parameters, keyed on the encryption algorithm chosen.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
encrypt(encryptParameters: EncryptParameters, options?: EncryptOptions): Promise<EncryptResult>;
|
||||
/**
|
||||
* Encrypts the given plaintext with the specified cryptography algorithm
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.encrypt("RSA1_5", Buffer.from("My Message"));
|
||||
* ```
|
||||
* @param algorithm - The algorithm to use.
|
||||
* @param plaintext - The text to encrypt.
|
||||
* @param options - Additional options.
|
||||
* @deprecated Use `encrypt({ algorithm, plaintext }, options)` instead.
|
||||
*/
|
||||
encrypt(algorithm: EncryptionAlgorithm, plaintext: Uint8Array, options?: EncryptOptions): Promise<EncryptResult>;
|
||||
private initializeIV;
|
||||
/**
|
||||
* Standardizes the arguments of multiple overloads into a single shape.
|
||||
* @param args - The encrypt arguments
|
||||
*/
|
||||
private disambiguateEncryptArguments;
|
||||
/**
|
||||
* Decrypts the given ciphertext with the specified decryption parameters.
|
||||
* Depending on the algorithm used in the decryption parameters, the set of possible decryption parameters will change.
|
||||
*
|
||||
* Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using, for example, an HMAC. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.decrypt({ algorithm: "RSA1_5", ciphertext: encryptedBuffer });
|
||||
* let result = await client.decrypt({ algorithm: "A256GCM", iv: ivFromEncryptResult, authenticationTag: tagFromEncryptResult });
|
||||
* ```
|
||||
* @param decryptParameters - The decryption parameters.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
decrypt(decryptParameters: DecryptParameters, options?: DecryptOptions): Promise<DecryptResult>;
|
||||
/**
|
||||
* Decrypts the given ciphertext with the specified cryptography algorithm
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.decrypt("RSA1_5", encryptedBuffer);
|
||||
* ```
|
||||
*
|
||||
* Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using, for example, an HMAC. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
|
||||
*
|
||||
* @param algorithm - The algorithm to use.
|
||||
* @param ciphertext - The text to decrypt.
|
||||
* @param options - Additional options.
|
||||
* @deprecated Use `decrypt({ algorithm, ciphertext }, options)` instead.
|
||||
*/
|
||||
decrypt(algorithm: EncryptionAlgorithm, ciphertext: Uint8Array, options?: DecryptOptions): Promise<DecryptResult>;
|
||||
/**
|
||||
* Standardizes the arguments of multiple overloads into a single shape.
|
||||
* @param args - The decrypt arguments
|
||||
*/
|
||||
private disambiguateDecryptArguments;
|
||||
/**
|
||||
* Wraps the given key using the specified cryptography algorithm
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.wrapKey("RSA1_5", keyToWrap);
|
||||
* ```
|
||||
* @param algorithm - The encryption algorithm to use to wrap the given key.
|
||||
* @param key - The key to wrap.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
wrapKey(algorithm: KeyWrapAlgorithm, key: Uint8Array, options?: WrapKeyOptions): Promise<WrapResult>;
|
||||
/**
|
||||
* Unwraps the given wrapped key using the specified cryptography algorithm
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.unwrapKey("RSA1_5", keyToUnwrap);
|
||||
* ```
|
||||
* @param algorithm - The decryption algorithm to use to unwrap the key.
|
||||
* @param encryptedKey - The encrypted key to unwrap.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
unwrapKey(algorithm: KeyWrapAlgorithm, encryptedKey: Uint8Array, options?: UnwrapKeyOptions): Promise<UnwrapResult>;
|
||||
/**
|
||||
* Cryptographically sign the digest of a message
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.sign("RS256", digest);
|
||||
* ```
|
||||
* @param algorithm - The signing algorithm to use.
|
||||
* @param digest - The digest of the data to sign.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
sign(algorithm: SignatureAlgorithm, digest: Uint8Array, options?: SignOptions): Promise<SignResult>;
|
||||
/**
|
||||
* Verify the signed message digest
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.verify("RS256", signedDigest, signature);
|
||||
* ```
|
||||
* @param algorithm - The signing algorithm to use to verify with.
|
||||
* @param digest - The digest to verify.
|
||||
* @param signature - The signature to verify the digest against.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
verify(algorithm: SignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, options?: VerifyOptions): Promise<VerifyResult>;
|
||||
/**
|
||||
* Cryptographically sign a block of data
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.signData("RS256", message);
|
||||
* ```
|
||||
* @param algorithm - The signing algorithm to use.
|
||||
* @param data - The data to sign.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
signData(algorithm: SignatureAlgorithm, data: Uint8Array, options?: SignOptions): Promise<SignResult>;
|
||||
/**
|
||||
* Verify the signed block of data
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.verifyData("RS256", signedMessage, signature);
|
||||
* ```
|
||||
* @param algorithm - The algorithm to use to verify with.
|
||||
* @param data - The signed block of data to verify.
|
||||
* @param signature - The signature to verify the block against.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
verifyData(algorithm: SignatureAlgorithm, data: Uint8Array, signature: Uint8Array, options?: VerifyOptions): Promise<VerifyResult>;
|
||||
/**
|
||||
* Retrieves the {@link JsonWebKey} from the Key Vault, if possible. Returns undefined if the key could not be retrieved due to insufficient permissions.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.getKeyMaterial();
|
||||
* ```
|
||||
*/
|
||||
private getKeyMaterial;
|
||||
/**
|
||||
* Returns the underlying key used for cryptographic operations.
|
||||
* If needed, attempts to fetch the key from KeyVault and exchanges the ID for the actual key.
|
||||
* @param options - The additional options.
|
||||
*/
|
||||
private fetchKey;
|
||||
private providers?;
|
||||
/**
|
||||
* Gets the provider that support this algorithm and operation.
|
||||
* The available providers are ordered by priority such that the first provider that supports this
|
||||
* operation is the one we should use.
|
||||
* @param operation - The {@link KeyOperation}.
|
||||
* @param algorithm - The algorithm to use.
|
||||
*/
|
||||
private getProvider;
|
||||
private ensureValid;
|
||||
}
|
||||
//# sourceMappingURL=cryptographyClient.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cryptographyClient.d.ts","sourceRoot":"","sources":["../../src/cryptographyClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EACL,yBAAyB,EAEzB,UAAU,EAEV,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,EACd,UAAU,EACX,MAAM,+BAA+B,CAAC;AAUvC;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B;;OAEG;IACH,OAAO,CAAC,GAAG,CAAwB;IAEnC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAC,CAA6B;IAEpD;;;;;;;;;;;;;;;;;;;;;;OAsBG;gBAED,GAAG,EAAE,MAAM,GAAG,WAAW,EACzB,UAAU,EAAE,eAAe,EAC3B,eAAe,CAAC,EAAE,yBAAyB;IAE7C;;;;;;;;;;;;;OAaG;gBACS,GAAG,EAAE,UAAU;IAkC3B;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAQ9B;IAED;;;;;;;;;;;;OAYG;IACI,OAAO,CACZ,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC;IACzB;;;;;;;;;;;;OAYG;IACI,OAAO,CACZ,SAAS,EAAE,mBAAmB,EAC9B,SAAS,EAAE,UAAU,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC;IAsBzB,OAAO,CAAC,YAAY;IAyBpB;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAkBpC;;;;;;;;;;;;;;OAcG;IACU,OAAO,CAClB,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC;IACzB;;;;;;;;;;;;;;;OAeG;IACI,OAAO,CACZ,SAAS,EAAE,mBAAmB,EAC9B,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC;IAsBzB;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAkBpC;;;;;;;;;;;OAWG;IACI,OAAO,CACZ,SAAS,EAAE,gBAAgB,EAC3B,GAAG,EAAE,UAAU,EACf,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,UAAU,CAAC;IAetB;;;;;;;;;;;OAWG;IACI,SAAS,CACd,SAAS,EAAE,gBAAgB,EAC3B,YAAY,EAAE,UAAU,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,YAAY,CAAC;IAmBxB;;;;;;;;;;;OAWG;IACI,IAAI,CACT,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,UAAU,CAAC;IAetB;;;;;;;;;;;;OAYG;IACI,MAAM,CACX,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,UAAU,EACrB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC;IAexB;;;;;;;;;;;OAWG;IACI,QAAQ,CACb,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,UAAU,EAEhB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,UAAU,CAAC;IAmBtB;;;;;;;;;;;;OAYG;IACI,UAAU,CACf,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,UAAU,EAErB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC;IAmBxB;;;;;;;;OAQG;YACW,cAAc;IAa5B;;;;OAIG;YACW,QAAQ;IA2BtB,OAAO,CAAC,SAAS,CAAC,CAAyB;IAC3C;;;;;;OAMG;YACW,WAAW;IAsCzB,OAAO,CAAC,WAAW;CA0BpB"}
|
||||
433
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.js
generated
vendored
Normal file
433
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.js
generated
vendored
Normal file
@@ -0,0 +1,433 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { KnownKeyOperations, } from "./keysModels.js";
|
||||
import { RemoteCryptographyProvider } from "./cryptography/remoteCryptographyProvider.js";
|
||||
import { randomBytes } from "./cryptography/crypto.js";
|
||||
import { RsaCryptographyProvider } from "./cryptography/rsaCryptographyProvider.js";
|
||||
import { AesCryptographyProvider } from "./cryptography/aesCryptographyProvider.js";
|
||||
import { tracingClient } from "./tracing.js";
|
||||
import { isRestError } from "@azure/core-rest-pipeline";
|
||||
import { logger } from "./log.js";
|
||||
/**
|
||||
* A client used to perform cryptographic operations on an Azure Key vault key
|
||||
* or a local {@link JsonWebKey}.
|
||||
*/
|
||||
export class CryptographyClient {
|
||||
/**
|
||||
* Internal constructor implementation for either local or Key Vault backed keys.
|
||||
* @param key - The key to use during cryptography tasks.
|
||||
* @param credential - Teh credential to use when constructing a Key Vault Cryptography client.
|
||||
*/
|
||||
constructor(key, credential, pipelineOptions = {}) {
|
||||
if (typeof key === "string") {
|
||||
// Key URL for remote-local operations.
|
||||
this.key = {
|
||||
kind: "identifier",
|
||||
value: key,
|
||||
};
|
||||
this.remoteProvider = new RemoteCryptographyProvider(key, credential, pipelineOptions);
|
||||
}
|
||||
else if ("name" in key) {
|
||||
// KeyVault key for remote-local operations.
|
||||
this.key = {
|
||||
kind: "KeyVaultKey",
|
||||
value: key,
|
||||
};
|
||||
this.remoteProvider = new RemoteCryptographyProvider(key, credential, pipelineOptions);
|
||||
}
|
||||
else {
|
||||
// JsonWebKey for local-only operations.
|
||||
this.key = {
|
||||
kind: "JsonWebKey",
|
||||
value: key,
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The base URL to the vault. If a local {@link JsonWebKey} is used vaultUrl will be empty.
|
||||
*/
|
||||
get vaultUrl() {
|
||||
var _a;
|
||||
return ((_a = this.remoteProvider) === null || _a === void 0 ? void 0 : _a.vaultUrl) || "";
|
||||
}
|
||||
/**
|
||||
* The ID of the key used to perform cryptographic operations for the client.
|
||||
*/
|
||||
get keyID() {
|
||||
if (this.key.kind === "identifier" || this.key.kind === "remoteOnlyIdentifier") {
|
||||
return this.key.value;
|
||||
}
|
||||
else if (this.key.kind === "KeyVaultKey") {
|
||||
return this.key.value.id;
|
||||
}
|
||||
else {
|
||||
return this.key.value.kid;
|
||||
}
|
||||
}
|
||||
encrypt(...args) {
|
||||
const [parameters, options] = this.disambiguateEncryptArguments(args);
|
||||
return tracingClient.withSpan("CryptographyClient.encrypt", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.Encrypt);
|
||||
this.initializeIV(parameters);
|
||||
const provider = await this.getProvider("encrypt", parameters.algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.encrypt(parameters, updatedOptions);
|
||||
}
|
||||
catch (error) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.encrypt(parameters, updatedOptions);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
}
|
||||
initializeIV(parameters) {
|
||||
// For AES-GCM the service **must** generate the IV, so we only populate it for AES-CBC
|
||||
const algorithmsRequiringIV = [
|
||||
"A128CBC",
|
||||
"A128CBCPAD",
|
||||
"A192CBC",
|
||||
"A192CBCPAD",
|
||||
"A256CBC",
|
||||
"A256CBCPAD",
|
||||
];
|
||||
if (parameters.algorithm in algorithmsRequiringIV) {
|
||||
try {
|
||||
const cbcParams = parameters;
|
||||
if (!cbcParams.iv) {
|
||||
cbcParams.iv = randomBytes(16);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error(`Unable to initialize IV for algorithm ${parameters.algorithm}. You may pass a valid IV to avoid this error. Error: ${e.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Standardizes the arguments of multiple overloads into a single shape.
|
||||
* @param args - The encrypt arguments
|
||||
*/
|
||||
disambiguateEncryptArguments(args) {
|
||||
if (typeof args[0] === "string") {
|
||||
// Sample shape: ["RSA1_5", buffer, options]
|
||||
return [
|
||||
{
|
||||
algorithm: args[0],
|
||||
plaintext: args[1],
|
||||
},
|
||||
args[2] || {},
|
||||
];
|
||||
}
|
||||
else {
|
||||
// Sample shape: [{ algorithm: "RSA1_5", plaintext: buffer }, options]
|
||||
return [args[0], (args[1] || {})];
|
||||
}
|
||||
}
|
||||
decrypt(...args) {
|
||||
const [parameters, options] = this.disambiguateDecryptArguments(args);
|
||||
return tracingClient.withSpan("CryptographyClient.decrypt", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.Decrypt);
|
||||
const provider = await this.getProvider("decrypt", parameters.algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.decrypt(parameters, updatedOptions);
|
||||
}
|
||||
catch (error) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.decrypt(parameters, updatedOptions);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Standardizes the arguments of multiple overloads into a single shape.
|
||||
* @param args - The decrypt arguments
|
||||
*/
|
||||
disambiguateDecryptArguments(args) {
|
||||
if (typeof args[0] === "string") {
|
||||
// Sample shape: ["RSA1_5", encryptedBuffer, options]
|
||||
return [
|
||||
{
|
||||
algorithm: args[0],
|
||||
ciphertext: args[1],
|
||||
},
|
||||
args[2] || {},
|
||||
];
|
||||
}
|
||||
else {
|
||||
// Sample shape: [{ algorithm: "RSA1_5", ciphertext: encryptedBuffer }, options]
|
||||
return [args[0], (args[1] || {})];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Wraps the given key using the specified cryptography algorithm
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.wrapKey("RSA1_5", keyToWrap);
|
||||
* ```
|
||||
* @param algorithm - The encryption algorithm to use to wrap the given key.
|
||||
* @param key - The key to wrap.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
wrapKey(algorithm, key, options = {}) {
|
||||
return tracingClient.withSpan("CryptographyClient.wrapKey", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.WrapKey);
|
||||
const provider = await this.getProvider("wrapKey", algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.wrapKey(algorithm, key, updatedOptions);
|
||||
}
|
||||
catch (err) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.wrapKey(algorithm, key, options);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Unwraps the given wrapped key using the specified cryptography algorithm
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.unwrapKey("RSA1_5", keyToUnwrap);
|
||||
* ```
|
||||
* @param algorithm - The decryption algorithm to use to unwrap the key.
|
||||
* @param encryptedKey - The encrypted key to unwrap.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
unwrapKey(algorithm, encryptedKey, options = {}) {
|
||||
return tracingClient.withSpan("CryptographyClient.unwrapKey", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.UnwrapKey);
|
||||
const provider = await this.getProvider("unwrapKey", algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.unwrapKey(algorithm, encryptedKey, updatedOptions);
|
||||
}
|
||||
catch (err) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.unwrapKey(algorithm, encryptedKey, options);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Cryptographically sign the digest of a message
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.sign("RS256", digest);
|
||||
* ```
|
||||
* @param algorithm - The signing algorithm to use.
|
||||
* @param digest - The digest of the data to sign.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
sign(algorithm, digest, options = {}) {
|
||||
return tracingClient.withSpan("CryptographyClient.sign", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.Sign);
|
||||
const provider = await this.getProvider("sign", algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.sign(algorithm, digest, updatedOptions);
|
||||
}
|
||||
catch (err) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.sign(algorithm, digest, updatedOptions);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Verify the signed message digest
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.verify("RS256", signedDigest, signature);
|
||||
* ```
|
||||
* @param algorithm - The signing algorithm to use to verify with.
|
||||
* @param digest - The digest to verify.
|
||||
* @param signature - The signature to verify the digest against.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
verify(algorithm, digest, signature, options = {}) {
|
||||
return tracingClient.withSpan("CryptographyClient.verify", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.Verify);
|
||||
const provider = await this.getProvider("verify", algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.verify(algorithm, digest, signature, updatedOptions);
|
||||
}
|
||||
catch (err) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.verify(algorithm, digest, signature, updatedOptions);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Cryptographically sign a block of data
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.signData("RS256", message);
|
||||
* ```
|
||||
* @param algorithm - The signing algorithm to use.
|
||||
* @param data - The data to sign.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
signData(algorithm, data,
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options = {}) {
|
||||
return tracingClient.withSpan("CryptographyClient.signData", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.Sign);
|
||||
const provider = await this.getProvider("signData", algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.signData(algorithm, data, updatedOptions);
|
||||
}
|
||||
catch (err) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.signData(algorithm, data, options);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Verify the signed block of data
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.verifyData("RS256", signedMessage, signature);
|
||||
* ```
|
||||
* @param algorithm - The algorithm to use to verify with.
|
||||
* @param data - The signed block of data to verify.
|
||||
* @param signature - The signature to verify the block against.
|
||||
* @param options - Additional options.
|
||||
*/
|
||||
verifyData(algorithm, data, signature,
|
||||
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
||||
options = {}) {
|
||||
return tracingClient.withSpan("CryptographyClient.verifyData", options, async (updatedOptions) => {
|
||||
this.ensureValid(await this.fetchKey(updatedOptions), KnownKeyOperations.Verify);
|
||||
const provider = await this.getProvider("verifyData", algorithm, updatedOptions);
|
||||
try {
|
||||
return provider.verifyData(algorithm, data, signature, updatedOptions);
|
||||
}
|
||||
catch (err) {
|
||||
if (this.remoteProvider) {
|
||||
return this.remoteProvider.verifyData(algorithm, data, signature, updatedOptions);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves the {@link JsonWebKey} from the Key Vault, if possible. Returns undefined if the key could not be retrieved due to insufficient permissions.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new CryptographyClient(keyVaultKey, credentials);
|
||||
* let result = await client.getKeyMaterial();
|
||||
* ```
|
||||
*/
|
||||
async getKeyMaterial(options) {
|
||||
const key = await this.fetchKey(options);
|
||||
switch (key.kind) {
|
||||
case "JsonWebKey":
|
||||
return key.value;
|
||||
case "KeyVaultKey":
|
||||
return key.value.key;
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns the underlying key used for cryptographic operations.
|
||||
* If needed, attempts to fetch the key from KeyVault and exchanges the ID for the actual key.
|
||||
* @param options - The additional options.
|
||||
*/
|
||||
async fetchKey(options) {
|
||||
if (this.key.kind === "identifier") {
|
||||
// Exchange the identifier with the actual key when needed
|
||||
let key;
|
||||
try {
|
||||
key = await this.remoteProvider.getKey(options);
|
||||
}
|
||||
catch (e) {
|
||||
if (isRestError(e) && e.statusCode === 403) {
|
||||
// If we don't have permission to get the key, we'll fall back to using the remote provider.
|
||||
// Marking the key as a remoteOnlyIdentifier will ensure that we don't attempt to fetch the key again.
|
||||
logger.verbose(`Permission denied to get key ${this.key.value}. Falling back to remote operation.`);
|
||||
this.key = { kind: "remoteOnlyIdentifier", value: this.key.value };
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
if (key) {
|
||||
this.key = { kind: "KeyVaultKey", value: key };
|
||||
}
|
||||
}
|
||||
return this.key;
|
||||
}
|
||||
/**
|
||||
* Gets the provider that support this algorithm and operation.
|
||||
* The available providers are ordered by priority such that the first provider that supports this
|
||||
* operation is the one we should use.
|
||||
* @param operation - The {@link KeyOperation}.
|
||||
* @param algorithm - The algorithm to use.
|
||||
*/
|
||||
async getProvider(operation, algorithm, options) {
|
||||
if (!this.providers) {
|
||||
const keyMaterial = await this.getKeyMaterial(options);
|
||||
this.providers = [];
|
||||
// Add local crypto providers as needed
|
||||
if (keyMaterial) {
|
||||
this.providers.push(new RsaCryptographyProvider(keyMaterial), new AesCryptographyProvider(keyMaterial));
|
||||
}
|
||||
// If the remote provider exists, we're in hybrid-mode. Otherwise we're in local-only mode.
|
||||
// If we're in hybrid mode the remote provider is used as a catch-all and should be last in the list.
|
||||
if (this.remoteProvider) {
|
||||
this.providers.push(this.remoteProvider);
|
||||
}
|
||||
}
|
||||
const providers = this.providers.filter((p) => p.isSupported(algorithm, operation));
|
||||
if (providers.length === 0) {
|
||||
throw new Error(`Unable to support operation: "${operation}" with algorithm: "${algorithm}" ${this.key.kind === "JsonWebKey" ? "using a local JsonWebKey" : ""}`);
|
||||
}
|
||||
// Return the first provider that supports this request
|
||||
return providers[0];
|
||||
}
|
||||
ensureValid(key, operation) {
|
||||
var _a;
|
||||
if (key.kind === "KeyVaultKey") {
|
||||
const keyOps = key.value.keyOperations;
|
||||
const { notBefore, expiresOn } = key.value.properties;
|
||||
const now = new Date();
|
||||
// Check KeyVault Key Expiration
|
||||
if (notBefore && now < notBefore) {
|
||||
throw new Error(`Key ${key.value.id} can't be used before ${notBefore.toISOString()}`);
|
||||
}
|
||||
if (expiresOn && now > expiresOn) {
|
||||
throw new Error(`Key ${key.value.id} expired at ${expiresOn.toISOString()}`);
|
||||
}
|
||||
// Check Key operations
|
||||
if (operation && keyOps && !(keyOps === null || keyOps === void 0 ? void 0 : keyOps.includes(operation))) {
|
||||
throw new Error(`Operation ${operation} is not supported on key ${key.value.id}`);
|
||||
}
|
||||
}
|
||||
else if (key.kind === "JsonWebKey") {
|
||||
// Check JsonWebKey Key operations
|
||||
if (operation && key.value.keyOps && !((_a = key.value.keyOps) === null || _a === void 0 ? void 0 : _a.includes(operation))) {
|
||||
throw new Error(`Operation ${operation} is not supported on key ${key.value.kid}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=cryptographyClient.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClient.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
336
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.d.ts
generated
vendored
Normal file
336
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.d.ts
generated
vendored
Normal file
@@ -0,0 +1,336 @@
|
||||
import { CryptographyOptions, KeyVaultKey } from "./keysModels.js";
|
||||
import { JsonWebKeyEncryptionAlgorithm as EncryptionAlgorithm, JsonWebKey, JsonWebKeyCurveName as KeyCurveName, KnownJsonWebKeyCurveName as KnownKeyCurveNames, KnownJsonWebKeySignatureAlgorithm as KnownSignatureAlgorithms, JsonWebKeySignatureAlgorithm as SignatureAlgorithm } from "./generated/models/index.js";
|
||||
export { KeyCurveName, KnownKeyCurveNames, EncryptionAlgorithm, SignatureAlgorithm, KnownSignatureAlgorithms, };
|
||||
/** Known values of {@link EncryptionAlgorithm} that the service accepts. */
|
||||
export declare enum KnownEncryptionAlgorithms {
|
||||
/** Encryption Algorithm - RSA-OAEP */
|
||||
RSAOaep = "RSA-OAEP",
|
||||
/** Encryption Algorithm - RSA-OAEP-256 */
|
||||
RSAOaep256 = "RSA-OAEP-256",
|
||||
/** Encryption Algorithm - RSA1_5 */
|
||||
RSA15 = "RSA1_5",
|
||||
/** Encryption Algorithm - A128GCM */
|
||||
A128GCM = "A128GCM",
|
||||
/** Encryption Algorithm - A192GCM */
|
||||
A192GCM = "A192GCM",
|
||||
/** Encryption Algorithm - A256GCM */
|
||||
A256GCM = "A256GCM",
|
||||
/** Encryption Algorithm - A128KW */
|
||||
A128KW = "A128KW",
|
||||
/** Encryption Algorithm - A192KW */
|
||||
A192KW = "A192KW",
|
||||
/** Encryption Algorithm - A256KW */
|
||||
A256KW = "A256KW",
|
||||
/** Encryption Algorithm - A128CBC */
|
||||
A128CBC = "A128CBC",
|
||||
/** Encryption Algorithm - A192CBC */
|
||||
A192CBC = "A192CBC",
|
||||
/** Encryption Algorithm - A256CBC */
|
||||
A256CBC = "A256CBC",
|
||||
/** Encryption Algorithm - A128CBCPAD */
|
||||
A128Cbcpad = "A128CBCPAD",
|
||||
/** Encryption Algorithm - A192CBCPAD */
|
||||
A192Cbcpad = "A192CBCPAD",
|
||||
/** Encryption Algorithm - A256CBCPAD */
|
||||
A256Cbcpad = "A256CBCPAD"
|
||||
}
|
||||
/**
|
||||
* Supported algorithms for key wrapping/unwrapping
|
||||
*/
|
||||
export type KeyWrapAlgorithm = "A128KW" | "A192KW" | "A256KW" | "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_5";
|
||||
/**
|
||||
* Result of the {@link encrypt} operation.
|
||||
*/
|
||||
export interface EncryptResult {
|
||||
/**
|
||||
* Result of the {@link encrypt} operation in bytes.
|
||||
*/
|
||||
result: Uint8Array;
|
||||
/**
|
||||
* The {@link EncryptionAlgorithm} used to encrypt the data.
|
||||
*/
|
||||
algorithm: EncryptionAlgorithm;
|
||||
/**
|
||||
* The ID of the Key Vault Key used to encrypt the data.
|
||||
*/
|
||||
keyID?: string;
|
||||
/**
|
||||
* The initialization vector used for encryption.
|
||||
*/
|
||||
iv?: Uint8Array;
|
||||
/**
|
||||
* The authentication tag resulting from encryption with a symmetric key including A128GCM, A192GCM, and A256GCM.
|
||||
*/
|
||||
authenticationTag?: Uint8Array;
|
||||
/**
|
||||
* Additional data that is authenticated during decryption but not encrypted.
|
||||
*/
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* Result of the {@link wrap} operation.
|
||||
*/
|
||||
export interface WrapResult {
|
||||
/**
|
||||
* Result of the {@link wrap} operation in bytes.
|
||||
*/
|
||||
result: Uint8Array;
|
||||
/**
|
||||
* The ID of the Key Vault Key used to wrap the data.
|
||||
*/
|
||||
keyID?: string;
|
||||
/**
|
||||
* The {@link EncryptionAlgorithm} used to wrap the data.
|
||||
*/
|
||||
algorithm: KeyWrapAlgorithm;
|
||||
}
|
||||
/**
|
||||
* Result of the {@link unwrap} operation.
|
||||
*/
|
||||
export interface UnwrapResult {
|
||||
/**
|
||||
* Result of the {@link unwrap} operation in bytes.
|
||||
*/
|
||||
result: Uint8Array;
|
||||
/**
|
||||
* The ID of the Key Vault Key used to unwrap the data.
|
||||
*/
|
||||
keyID?: string;
|
||||
/**
|
||||
* The {@link KeyWrapAlgorithm} used to unwrap the data.
|
||||
*/
|
||||
algorithm: KeyWrapAlgorithm;
|
||||
}
|
||||
/**
|
||||
* Result of the {@link decrypt} operation.
|
||||
*/
|
||||
export interface DecryptResult {
|
||||
/**
|
||||
* Result of the {@link decrypt} operation in bytes.
|
||||
*/
|
||||
result: Uint8Array;
|
||||
/**
|
||||
* The ID of the Key Vault Key used to decrypt the encrypted data.
|
||||
*/
|
||||
keyID?: string;
|
||||
/**
|
||||
* The {@link EncryptionAlgorithm} used to decrypt the encrypted data.
|
||||
*/
|
||||
algorithm: EncryptionAlgorithm;
|
||||
}
|
||||
/**
|
||||
* Result of the {@link sign} operation.
|
||||
*/
|
||||
export interface SignResult {
|
||||
/**
|
||||
* Result of the {@link sign} operation in bytes.
|
||||
*/
|
||||
result: Uint8Array;
|
||||
/**
|
||||
* The ID of the Key Vault Key used to sign the data.
|
||||
*/
|
||||
keyID?: string;
|
||||
/**
|
||||
* The {@link EncryptionAlgorithm} used to sign the data.
|
||||
*/
|
||||
algorithm: SignatureAlgorithm;
|
||||
}
|
||||
/**
|
||||
* Result of the {@link verify} operation.
|
||||
*/
|
||||
export interface VerifyResult {
|
||||
/**
|
||||
* Result of the {@link verify} operation in bytes.
|
||||
*/
|
||||
result: boolean;
|
||||
/**
|
||||
* The ID of the Key Vault Key used to verify the data.
|
||||
*/
|
||||
keyID?: string;
|
||||
}
|
||||
/**
|
||||
* Options for {@link encrypt}.
|
||||
*/
|
||||
export interface EncryptOptions extends CryptographyOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link decrypt}.
|
||||
*/
|
||||
export interface DecryptOptions extends CryptographyOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link sign}.
|
||||
*/
|
||||
export interface SignOptions extends CryptographyOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link verify}.
|
||||
*/
|
||||
export interface VerifyOptions extends CryptographyOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link verifyData}
|
||||
*/
|
||||
export interface VerifyDataOptions extends CryptographyOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link wrapKey}.
|
||||
*/
|
||||
export interface WrapKeyOptions extends CryptographyOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link unwrapKey}.
|
||||
*/
|
||||
export interface UnwrapKeyOptions extends CryptographyOptions {
|
||||
}
|
||||
/**
|
||||
* A union type representing all supported RSA encryption algorithms.
|
||||
*/
|
||||
export type RsaEncryptionAlgorithm = "RSA1_5" | "RSA-OAEP" | "RSA-OAEP-256";
|
||||
/**
|
||||
* Encryption parameters for RSA encryption algorithms.
|
||||
*/
|
||||
export interface RsaEncryptParameters {
|
||||
/**
|
||||
* The encryption algorithm to use.
|
||||
*/
|
||||
algorithm: RsaEncryptionAlgorithm;
|
||||
/**
|
||||
* The plain text to encrypt.
|
||||
*/
|
||||
plaintext: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* A union type representing all supported AES-GCM encryption algorithms.
|
||||
*/
|
||||
export type AesGcmEncryptionAlgorithm = "A128GCM" | "A192GCM" | "A256GCM";
|
||||
/**
|
||||
* Encryption parameters for AES-GCM encryption algorithms.
|
||||
*/
|
||||
export interface AesGcmEncryptParameters {
|
||||
/**
|
||||
* The encryption algorithm to use.
|
||||
*/
|
||||
algorithm: AesGcmEncryptionAlgorithm;
|
||||
/**
|
||||
* The plain text to encrypt.
|
||||
*/
|
||||
plaintext: Uint8Array;
|
||||
/**
|
||||
* Optional data that is authenticated but not encrypted.
|
||||
*/
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* A union type representing all supported AES-CBC encryption algorithms.
|
||||
*/
|
||||
export type AesCbcEncryptionAlgorithm = "A128CBC" | "A192CBC" | "A256CBC" | "A128CBCPAD" | "A192CBCPAD" | "A256CBCPAD";
|
||||
/**
|
||||
* Encryption parameters for AES-CBC encryption algorithms.
|
||||
*/
|
||||
export interface AesCbcEncryptParameters {
|
||||
/**
|
||||
* The encryption algorithm to use.
|
||||
*/
|
||||
algorithm: AesCbcEncryptionAlgorithm;
|
||||
/**
|
||||
* The plain text to encrypt.
|
||||
*/
|
||||
plaintext: Uint8Array;
|
||||
/**
|
||||
* The initialization vector used for encryption. If omitted we will attempt to generate an IV using crypto's `randomBytes` functionality.
|
||||
* An error will be thrown if creating an IV fails, and you may recover by passing in your own cryptographically secure IV.
|
||||
*
|
||||
* When passing your own IV, make sure you use a cryptographically random, non-repeating IV.
|
||||
*/
|
||||
iv?: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* A type representing all currently supported encryption parameters as they apply to different encryption algorithms.
|
||||
*/
|
||||
export type EncryptParameters = RsaEncryptParameters | AesGcmEncryptParameters | AesCbcEncryptParameters;
|
||||
/**
|
||||
* Decryption parameters for RSA encryption algorithms.
|
||||
*/
|
||||
export interface RsaDecryptParameters {
|
||||
/**
|
||||
* The encryption algorithm to use.
|
||||
*/
|
||||
algorithm: RsaEncryptionAlgorithm;
|
||||
/**
|
||||
* The ciphertext to decrypt.
|
||||
*/
|
||||
ciphertext: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* Decryption parameters for AES-GCM encryption algorithms.
|
||||
*/
|
||||
export interface AesGcmDecryptParameters {
|
||||
/**
|
||||
* The encryption algorithm to use.
|
||||
*/
|
||||
algorithm: AesGcmEncryptionAlgorithm;
|
||||
/**
|
||||
* The ciphertext to decrypt.
|
||||
*/
|
||||
ciphertext: Uint8Array;
|
||||
/**
|
||||
* The initialization vector (or nonce) generated during encryption.
|
||||
*/
|
||||
iv: Uint8Array;
|
||||
/**
|
||||
* The authentication tag generated during encryption.
|
||||
*/
|
||||
authenticationTag: Uint8Array;
|
||||
/**
|
||||
* Optional data that is authenticated but not encrypted.
|
||||
*/
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* Decryption parameters for AES-CBC encryption algorithms.
|
||||
*/
|
||||
export interface AesCbcDecryptParameters {
|
||||
/**
|
||||
* The encryption algorithm to use.
|
||||
*/
|
||||
algorithm: AesCbcEncryptionAlgorithm;
|
||||
/**
|
||||
* The initialization vector used during encryption.
|
||||
*/
|
||||
/**
|
||||
* The ciphertext to decrypt. Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using an HMAC, for example.
|
||||
* See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
|
||||
*/
|
||||
ciphertext: Uint8Array;
|
||||
/**
|
||||
* The initialization vector generated during encryption.
|
||||
*/
|
||||
iv: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* A type representing all currently supported decryption parameters as they apply to different encryption algorithms.
|
||||
*/
|
||||
export type DecryptParameters = RsaDecryptParameters | AesGcmDecryptParameters | AesCbcDecryptParameters;
|
||||
/**
|
||||
* The various key types a {@link CryptographyClient} can hold.
|
||||
* The key may be an identifier (URL) to a KeyVault key, the actual KeyVault key,
|
||||
* or a local-only JsonWebKey.
|
||||
*
|
||||
* If an identifier is used, an attempt will be made to exchange it for a {@link KeyVaultKey} during the first operation call. If this attempt fails, the identifier
|
||||
* will become a remote-only identifier and the {@link CryptographyClient} will only be able to perform remote operations.
|
||||
*/
|
||||
export type CryptographyClientKey = {
|
||||
kind: "identifier";
|
||||
value: string;
|
||||
} | {
|
||||
kind: "remoteOnlyIdentifier";
|
||||
value: string;
|
||||
} | {
|
||||
kind: "KeyVaultKey";
|
||||
value: KeyVaultKey;
|
||||
} | {
|
||||
kind: "JsonWebKey";
|
||||
value: JsonWebKey;
|
||||
};
|
||||
//# sourceMappingURL=cryptographyClientModels.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cryptographyClientModels.d.ts","sourceRoot":"","sources":["../../src/cryptographyClientModels.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EACL,6BAA6B,IAAI,mBAAmB,EACpD,UAAU,EACV,mBAAmB,IAAI,YAAY,EACnC,wBAAwB,IAAI,kBAAkB,EAC9C,iCAAiC,IAAI,wBAAwB,EAC7D,4BAA4B,IAAI,kBAAkB,EACnD,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,GACzB,CAAC;AAEF,4EAA4E;AAC5E,oBAAY,yBAAyB;IACnC,sCAAsC;IACtC,OAAO,aAAa;IACpB,0CAA0C;IAC1C,UAAU,iBAAiB;IAC3B,oCAAoC;IACpC,KAAK,WAAW;IAChB,qCAAqC;IACrC,OAAO,YAAY;IACnB,qCAAqC;IACrC,OAAO,YAAY;IACnB,qCAAqC;IACrC,OAAO,YAAY;IACnB,oCAAoC;IACpC,MAAM,WAAW;IACjB,oCAAoC;IACpC,MAAM,WAAW;IACjB,oCAAoC;IACpC,MAAM,WAAW;IACjB,qCAAqC;IACrC,OAAO,YAAY;IACnB,qCAAqC;IACrC,OAAO,YAAY;IACnB,qCAAqC;IACrC,OAAO,YAAY;IACnB,wCAAwC;IACxC,UAAU,eAAe;IACzB,wCAAwC;IACxC,UAAU,eAAe;IACzB,wCAAwC;IACxC,UAAU,eAAe;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,cAAc,GACd,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,mBAAmB,CAAC;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B;;OAEG;IACH,2BAA2B,CAAC,EAAE,UAAU,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AACD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,mBAAmB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;CAAG;AAE9D;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;CAAG;AAE9D;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,mBAAmB;CAAG;AAE3D;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,mBAAmB;CAAG;AAE7D;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;CAAG;AAEjE;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;CAAG;AAE9D;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;CAAG;AAEhE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,SAAS,EAAE,sBAAsB,CAAC;IAClC;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,SAAS,EAAE,yBAAyB,CAAC;IACrC;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;IACtB;;OAEG;IACH,2BAA2B,CAAC,EAAE,UAAU,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,YAAY,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,SAAS,EAAE,yBAAyB,CAAC;IACrC;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;IACtB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,oBAAoB,GACpB,uBAAuB,GACvB,uBAAuB,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,SAAS,EAAE,sBAAsB,CAAC;IAClC;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,SAAS,EAAE,yBAAyB,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,EAAE,EAAE,UAAU,CAAC;IACf;;OAEG;IACH,iBAAiB,EAAE,UAAU,CAAC;IAC9B;;OAEG;IACH,2BAA2B,CAAC,EAAE,UAAU,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,SAAS,EAAE,yBAAyB,CAAC;IACrC;;OAEG;IACH;;;OAGG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,EAAE,EAAE,UAAU,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,oBAAoB,GACpB,uBAAuB,GACvB,uBAAuB,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;CACpB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC"}
|
||||
39
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.js
generated
vendored
Normal file
39
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { KnownJsonWebKeyCurveName as KnownKeyCurveNames, KnownJsonWebKeySignatureAlgorithm as KnownSignatureAlgorithms, } from "./generated/models/index.js";
|
||||
export { KnownKeyCurveNames, KnownSignatureAlgorithms, };
|
||||
/** Known values of {@link EncryptionAlgorithm} that the service accepts. */
|
||||
export var KnownEncryptionAlgorithms;
|
||||
(function (KnownEncryptionAlgorithms) {
|
||||
/** Encryption Algorithm - RSA-OAEP */
|
||||
KnownEncryptionAlgorithms["RSAOaep"] = "RSA-OAEP";
|
||||
/** Encryption Algorithm - RSA-OAEP-256 */
|
||||
KnownEncryptionAlgorithms["RSAOaep256"] = "RSA-OAEP-256";
|
||||
/** Encryption Algorithm - RSA1_5 */
|
||||
KnownEncryptionAlgorithms["RSA15"] = "RSA1_5";
|
||||
/** Encryption Algorithm - A128GCM */
|
||||
KnownEncryptionAlgorithms["A128GCM"] = "A128GCM";
|
||||
/** Encryption Algorithm - A192GCM */
|
||||
KnownEncryptionAlgorithms["A192GCM"] = "A192GCM";
|
||||
/** Encryption Algorithm - A256GCM */
|
||||
KnownEncryptionAlgorithms["A256GCM"] = "A256GCM";
|
||||
/** Encryption Algorithm - A128KW */
|
||||
KnownEncryptionAlgorithms["A128KW"] = "A128KW";
|
||||
/** Encryption Algorithm - A192KW */
|
||||
KnownEncryptionAlgorithms["A192KW"] = "A192KW";
|
||||
/** Encryption Algorithm - A256KW */
|
||||
KnownEncryptionAlgorithms["A256KW"] = "A256KW";
|
||||
/** Encryption Algorithm - A128CBC */
|
||||
KnownEncryptionAlgorithms["A128CBC"] = "A128CBC";
|
||||
/** Encryption Algorithm - A192CBC */
|
||||
KnownEncryptionAlgorithms["A192CBC"] = "A192CBC";
|
||||
/** Encryption Algorithm - A256CBC */
|
||||
KnownEncryptionAlgorithms["A256CBC"] = "A256CBC";
|
||||
/** Encryption Algorithm - A128CBCPAD */
|
||||
KnownEncryptionAlgorithms["A128Cbcpad"] = "A128CBCPAD";
|
||||
/** Encryption Algorithm - A192CBCPAD */
|
||||
KnownEncryptionAlgorithms["A192Cbcpad"] = "A192CBCPAD";
|
||||
/** Encryption Algorithm - A256CBCPAD */
|
||||
KnownEncryptionAlgorithms["A256Cbcpad"] = "A256CBCPAD";
|
||||
})(KnownEncryptionAlgorithms || (KnownEncryptionAlgorithms = {}));
|
||||
//# sourceMappingURL=cryptographyClientModels.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/cryptographyClientModels.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/@azure/keyvault-keys/dist/browser/generated/index.d.ts
generated
vendored
Normal file
3
node_modules/@azure/keyvault-keys/dist/browser/generated/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from "./models/index.js";
|
||||
export { KeyVaultClient } from "./keyVaultClient.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAQA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
||||
10
node_modules/@azure/keyvault-keys/dist/browser/generated/index.js
generated
vendored
Normal file
10
node_modules/@azure/keyvault-keys/dist/browser/generated/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
export * from "./models/index.js";
|
||||
export { KeyVaultClient } from "./keyVaultClient.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/index.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models/index.js\";\nexport { KeyVaultClient } from \"./keyVaultClient.js\";\n"]}
|
||||
307
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.d.ts
generated
vendored
Normal file
307
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.d.ts
generated
vendored
Normal file
@@ -0,0 +1,307 @@
|
||||
import * as coreHttpCompat from "@azure/core-http-compat";
|
||||
import { ApiVersion75, KeyVaultClientOptionalParams, JsonWebKeyType, CreateKeyOptionalParams, CreateKeyResponse, RotateKeyOptionalParams, RotateKeyResponse, JsonWebKey, ImportKeyOptionalParams, ImportKeyResponse, DeleteKeyOptionalParams, DeleteKeyResponse, UpdateKeyOptionalParams, UpdateKeyResponse, GetKeyOptionalParams, GetKeyResponse, GetKeyVersionsOptionalParams, GetKeyVersionsResponse, GetKeysOptionalParams, GetKeysResponse, BackupKeyOptionalParams, BackupKeyResponse, RestoreKeyOptionalParams, RestoreKeyResponse, JsonWebKeyEncryptionAlgorithm, EncryptOptionalParams, EncryptResponse, DecryptOptionalParams, DecryptResponse, JsonWebKeySignatureAlgorithm, SignOptionalParams, SignResponse, VerifyOptionalParams, VerifyResponse, WrapKeyOptionalParams, WrapKeyResponse, UnwrapKeyOptionalParams, UnwrapKeyResponse, ReleaseOptionalParams, ReleaseResponse, GetDeletedKeysOptionalParams, GetDeletedKeysResponse, GetDeletedKeyOptionalParams, GetDeletedKeyResponse, PurgeDeletedKeyOptionalParams, RecoverDeletedKeyOptionalParams, RecoverDeletedKeyResponse, GetKeyRotationPolicyOptionalParams, GetKeyRotationPolicyResponse, KeyRotationPolicy, UpdateKeyRotationPolicyOptionalParams, UpdateKeyRotationPolicyResponse, GetRandomBytesOptionalParams, GetRandomBytesResponse, GetKeyVersionsNextOptionalParams, GetKeyVersionsNextResponse, GetKeysNextOptionalParams, GetKeysNextResponse, GetDeletedKeysNextOptionalParams, GetDeletedKeysNextResponse } from "./models/index.js";
|
||||
export declare class KeyVaultClient extends coreHttpCompat.ExtendedServiceClient {
|
||||
apiVersion: ApiVersion75;
|
||||
/**
|
||||
* Initializes a new instance of the KeyVaultClient class.
|
||||
* @param apiVersion Api Version
|
||||
* @param options The parameter options
|
||||
*/
|
||||
constructor(apiVersion: ApiVersion75, options?: KeyVaultClientOptionalParams);
|
||||
/**
|
||||
* The create key operation can be used to create any key type in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name for the new key. The system will generate the version name for the new key.
|
||||
* The value you provide may be copied globally for the purpose of running the service. The value
|
||||
* provided should not include personally identifiable or sensitive information.
|
||||
* @param kty The type of key to create. For valid values, see JsonWebKeyType.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
createKey(vaultBaseUrl: string, keyName: string, kty: JsonWebKeyType, options?: CreateKeyOptionalParams): Promise<CreateKeyResponse>;
|
||||
/**
|
||||
* The operation will rotate the key based on the key policy. It requires the keys/rotate permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of key to be rotated. The system will generate a new version in the
|
||||
* specified key.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
rotateKey(vaultBaseUrl: string, keyName: string, options?: RotateKeyOptionalParams): Promise<RotateKeyResponse>;
|
||||
/**
|
||||
* The import key operation may be used to import any key type into an Azure Key Vault. If the named
|
||||
* key already exists, Azure Key Vault creates a new version of the key. This operation requires the
|
||||
* keys/import permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName Name for the imported key. The value you provide may be copied globally for the
|
||||
* purpose of running the service. The value provided should not include personally identifiable or
|
||||
* sensitive information.
|
||||
* @param key The Json web key
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
importKey(vaultBaseUrl: string, keyName: string, key: JsonWebKey, options?: ImportKeyOptionalParams): Promise<ImportKeyResponse>;
|
||||
/**
|
||||
* The delete key operation cannot be used to remove individual versions of a key. This operation
|
||||
* removes the cryptographic material associated with the key, which means the key is not usable for
|
||||
* Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations. This operation requires the keys/delete
|
||||
* permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key to delete.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
deleteKey(vaultBaseUrl: string, keyName: string, options?: DeleteKeyOptionalParams): Promise<DeleteKeyResponse>;
|
||||
/**
|
||||
* In order to perform this operation, the key must already exist in the Key Vault. Note: The
|
||||
* cryptographic material of a key itself cannot be changed. This operation requires the keys/update
|
||||
* permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of key to update.
|
||||
* @param keyVersion The version of the key to update.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
updateKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options?: UpdateKeyOptionalParams): Promise<UpdateKeyResponse>;
|
||||
/**
|
||||
* The get key operation is applicable to all key types. If the requested key is symmetric, then no key
|
||||
* material is released in the response. This operation requires the keys/get permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key to get.
|
||||
* @param keyVersion Adding the version parameter retrieves a specific version of a key. This URI
|
||||
* fragment is optional. If not specified, the latest version of the key is returned.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options?: GetKeyOptionalParams): Promise<GetKeyResponse>;
|
||||
/**
|
||||
* The full key identifier, attributes, and tags are provided in the response. This operation requires
|
||||
* the keys/list permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getKeyVersions(vaultBaseUrl: string, keyName: string, options?: GetKeyVersionsOptionalParams): Promise<GetKeyVersionsResponse>;
|
||||
/**
|
||||
* Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public
|
||||
* part of a stored key. The LIST operation is applicable to all key types, however only the base key
|
||||
* identifier, attributes, and tags are provided in the response. Individual versions of a key are not
|
||||
* listed in the response. This operation requires the keys/list permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getKeys(vaultBaseUrl: string, options?: GetKeysOptionalParams): Promise<GetKeysResponse>;
|
||||
/**
|
||||
* The Key Backup operation exports a key from Azure Key Vault in a protected form. Note that this
|
||||
* operation does NOT return key material in a form that can be used outside the Azure Key Vault
|
||||
* system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key Vault
|
||||
* itself. The intent of this operation is to allow a client to GENERATE a key in one Azure Key Vault
|
||||
* instance, BACKUP the key, and then RESTORE it into another Azure Key Vault instance. The BACKUP
|
||||
* operation may be used to export, in protected form, any key type from Azure Key Vault. Individual
|
||||
* versions of a key cannot be backed up. BACKUP / RESTORE can be performed within geographical
|
||||
* boundaries only; meaning that a BACKUP from one geographical area cannot be restored to another
|
||||
* geographical area. For example, a backup from the US geographical area cannot be restored in an EU
|
||||
* geographical area. This operation requires the key/backup permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
backupKey(vaultBaseUrl: string, keyName: string, options?: BackupKeyOptionalParams): Promise<BackupKeyResponse>;
|
||||
/**
|
||||
* Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier,
|
||||
* attributes and access control policies. The RESTORE operation may be used to import a previously
|
||||
* backed up key. Individual versions of a key cannot be restored. The key is restored in its entirety
|
||||
* with the same key name as it had when it was backed up. If the key name is not available in the
|
||||
* target Key Vault, the RESTORE operation will be rejected. While the key name is retained during
|
||||
* restore, the final key identifier will change if the key is restored to a different vault. Restore
|
||||
* will restore all versions and preserve version identifiers. The RESTORE operation is subject to
|
||||
* security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as
|
||||
* the source Key Vault The user must have RESTORE permission in the target Key Vault. This operation
|
||||
* requires the keys/restore permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyBundleBackup The backup blob associated with a key bundle.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
restoreKey(vaultBaseUrl: string, keyBundleBackup: Uint8Array, options?: RestoreKeyOptionalParams): Promise<RestoreKeyResponse>;
|
||||
/**
|
||||
* The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored
|
||||
* in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size
|
||||
* of which is dependent on the target key and the encryption algorithm to be used. The ENCRYPT
|
||||
* operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection
|
||||
* with an asymmetric key can be performed using public portion of the key. This operation is supported
|
||||
* for asymmetric keys as a convenience for callers that have a key-reference but do not have access to
|
||||
* the public key material. This operation requires the keys/encrypt permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param keyVersion The version of the key.
|
||||
* @param algorithm algorithm identifier
|
||||
* @param value
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
encrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: EncryptOptionalParams): Promise<EncryptResponse>;
|
||||
/**
|
||||
* The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and
|
||||
* specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of
|
||||
* data may be decrypted, the size of this block is dependent on the target key and the algorithm to be
|
||||
* used. The DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key Vault since
|
||||
* it uses the private portion of the key. This operation requires the keys/decrypt permission.
|
||||
* Microsoft recommends not to use CBC algorithms for decryption without first ensuring the integrity
|
||||
* of the ciphertext using an HMAC, for example. See
|
||||
* https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param keyVersion The version of the key.
|
||||
* @param algorithm algorithm identifier
|
||||
* @param value
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
decrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: DecryptOptionalParams): Promise<DecryptResponse>;
|
||||
/**
|
||||
* The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since
|
||||
* this operation uses the private portion of the key. This operation requires the keys/sign
|
||||
* permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param keyVersion The version of the key.
|
||||
* @param algorithm The signing/verification algorithm identifier. For more information on possible
|
||||
* algorithm types, see JsonWebKeySignatureAlgorithm.
|
||||
* @param value
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
sign(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: JsonWebKeySignatureAlgorithm, value: Uint8Array, options?: SignOptionalParams): Promise<SignResponse>;
|
||||
/**
|
||||
* The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not
|
||||
* strictly necessary for asymmetric keys stored in Azure Key Vault since signature verification can be
|
||||
* performed using the public portion of the key but this operation is supported as a convenience for
|
||||
* callers that only have a key-reference and not the public portion of the key. This operation
|
||||
* requires the keys/verify permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param keyVersion The version of the key.
|
||||
* @param algorithm The signing/verification algorithm. For more information on possible algorithm
|
||||
* types, see JsonWebKeySignatureAlgorithm.
|
||||
* @param digest The digest used for signing.
|
||||
* @param signature The signature to be verified.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
verify(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: JsonWebKeySignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, options?: VerifyOptionalParams): Promise<VerifyResponse>;
|
||||
/**
|
||||
* The WRAP operation supports encryption of a symmetric key using a key encryption key that has
|
||||
* previously been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for
|
||||
* symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed
|
||||
* using the public portion of the key. This operation is supported for asymmetric keys as a
|
||||
* convenience for callers that have a key-reference but do not have access to the public key material.
|
||||
* This operation requires the keys/wrapKey permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param keyVersion The version of the key.
|
||||
* @param algorithm algorithm identifier
|
||||
* @param value
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
wrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: WrapKeyOptionalParams): Promise<WrapKeyResponse>;
|
||||
/**
|
||||
* The UNWRAP operation supports decryption of a symmetric key using the target key encryption key.
|
||||
* This operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric and
|
||||
* symmetric keys stored in Azure Key Vault since it uses the private portion of the key. This
|
||||
* operation requires the keys/unwrapKey permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param keyVersion The version of the key.
|
||||
* @param algorithm algorithm identifier
|
||||
* @param value
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
unwrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: UnwrapKeyOptionalParams): Promise<UnwrapKeyResponse>;
|
||||
/**
|
||||
* The release key operation is applicable to all key types. The target key must be marked exportable.
|
||||
* This operation requires the keys/release permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key to get.
|
||||
* @param keyVersion Adding the version parameter retrieves a specific version of a key.
|
||||
* @param targetAttestationToken The attestation assertion for the target of the key release.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
release(vaultBaseUrl: string, keyName: string, keyVersion: string, targetAttestationToken: string, options?: ReleaseOptionalParams): Promise<ReleaseResponse>;
|
||||
/**
|
||||
* Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public
|
||||
* part of a deleted key. This operation includes deletion-specific information. The Get Deleted Keys
|
||||
* operation is applicable for vaults enabled for soft-delete. While the operation can be invoked on
|
||||
* any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation
|
||||
* requires the keys/list permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getDeletedKeys(vaultBaseUrl: string, options?: GetDeletedKeysOptionalParams): Promise<GetDeletedKeysResponse>;
|
||||
/**
|
||||
* The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can
|
||||
* be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This
|
||||
* operation requires the keys/get permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getDeletedKey(vaultBaseUrl: string, keyName: string, options?: GetDeletedKeyOptionalParams): Promise<GetDeletedKeyResponse>;
|
||||
/**
|
||||
* The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation
|
||||
* can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault.
|
||||
* This operation requires the keys/purge permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
purgeDeletedKey(vaultBaseUrl: string, keyName: string, options?: PurgeDeletedKeyOptionalParams): Promise<void>;
|
||||
/**
|
||||
* The Recover Deleted Key operation is applicable for deleted keys in soft-delete enabled vaults. It
|
||||
* recovers the deleted key back to its latest version under /keys. An attempt to recover an
|
||||
* non-deleted key will return an error. Consider this the inverse of the delete operation on
|
||||
* soft-delete enabled vaults. This operation requires the keys/recover permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the deleted key.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
recoverDeletedKey(vaultBaseUrl: string, keyName: string, options?: RecoverDeletedKeyOptionalParams): Promise<RecoverDeletedKeyResponse>;
|
||||
/**
|
||||
* The GetKeyRotationPolicy operation returns the specified key policy resources in the specified key
|
||||
* vault. This operation requires the keys/get permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key in a given key vault.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getKeyRotationPolicy(vaultBaseUrl: string, keyName: string, options?: GetKeyRotationPolicyOptionalParams): Promise<GetKeyRotationPolicyResponse>;
|
||||
/**
|
||||
* Set specified members in the key policy. Leave others as undefined. This operation requires the
|
||||
* keys/update permission.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key in the given vault.
|
||||
* @param keyRotationPolicy The policy for the key.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
updateKeyRotationPolicy(vaultBaseUrl: string, keyName: string, keyRotationPolicy: KeyRotationPolicy, options?: UpdateKeyRotationPolicyOptionalParams): Promise<UpdateKeyRotationPolicyResponse>;
|
||||
/**
|
||||
* Get the requested number of bytes containing random values from a managed HSM.
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param count The requested number of random bytes.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getRandomBytes(vaultBaseUrl: string, count: number, options?: GetRandomBytesOptionalParams): Promise<GetRandomBytesResponse>;
|
||||
/**
|
||||
* GetKeyVersionsNext
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param keyName The name of the key.
|
||||
* @param nextLink The nextLink from the previous successful call to the GetKeyVersions method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getKeyVersionsNext(vaultBaseUrl: string, keyName: string, nextLink: string, options?: GetKeyVersionsNextOptionalParams): Promise<GetKeyVersionsNextResponse>;
|
||||
/**
|
||||
* GetKeysNext
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param nextLink The nextLink from the previous successful call to the GetKeys method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getKeysNext(vaultBaseUrl: string, nextLink: string, options?: GetKeysNextOptionalParams): Promise<GetKeysNextResponse>;
|
||||
/**
|
||||
* GetDeletedKeysNext
|
||||
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
||||
* @param nextLink The nextLink from the previous successful call to the GetDeletedKeys method.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
getDeletedKeysNext(vaultBaseUrl: string, nextLink: string, options?: GetDeletedKeysNextOptionalParams): Promise<GetDeletedKeysNextResponse>;
|
||||
}
|
||||
//# sourceMappingURL=keyVaultClient.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.d.ts.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1002
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.js
generated
vendored
Normal file
1002
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/keyVaultClient.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
843
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.d.ts
generated
vendored
Normal file
843
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,843 @@
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreHttpCompat from "@azure/core-http-compat";
|
||||
/** The key create parameters. */
|
||||
export interface KeyCreateParameters {
|
||||
/** The type of key to create. For valid values, see JsonWebKeyType. */
|
||||
kty: JsonWebKeyType;
|
||||
/** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */
|
||||
keySize?: number;
|
||||
/** The public exponent for a RSA key. */
|
||||
publicExponent?: number;
|
||||
keyOps?: JsonWebKeyOperation[];
|
||||
/** The attributes of a key managed by the key vault service. */
|
||||
keyAttributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */
|
||||
curve?: JsonWebKeyCurveName;
|
||||
/** The policy rules under which the key can be exported. */
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/** The object attributes managed by the KeyVault service. */
|
||||
export interface Attributes {
|
||||
/** Determines whether the object is enabled. */
|
||||
enabled?: boolean;
|
||||
/** Not before date in UTC. */
|
||||
notBefore?: Date;
|
||||
/** Expiry date in UTC. */
|
||||
expires?: Date;
|
||||
/**
|
||||
* Creation time in UTC.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly created?: Date;
|
||||
/**
|
||||
* Last updated time in UTC.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly updated?: Date;
|
||||
}
|
||||
/** The policy rules under which the key can be exported. */
|
||||
export interface KeyReleasePolicy {
|
||||
/** Content type and version of key release policy */
|
||||
contentType?: string;
|
||||
/** Defines the mutability state of the policy. Once marked immutable, this flag cannot be reset and the policy cannot be changed under any circumstances. */
|
||||
immutable?: boolean;
|
||||
/** Blob encoding the policy rules under which the key can be released. Blob must be base64 URL encoded. */
|
||||
encodedPolicy?: Uint8Array;
|
||||
}
|
||||
/** A KeyBundle consisting of a WebKey plus its attributes. */
|
||||
export interface KeyBundle {
|
||||
/** The Json web key. */
|
||||
key?: JsonWebKey;
|
||||
/** The key management attributes. */
|
||||
attributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/**
|
||||
* True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly managed?: boolean;
|
||||
/** The policy rules under which the key can be exported. */
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/** As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 */
|
||||
export interface JsonWebKey {
|
||||
/** Key identifier. */
|
||||
kid?: string;
|
||||
/** JsonWebKey Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. */
|
||||
kty?: JsonWebKeyType;
|
||||
keyOps?: string[];
|
||||
/** RSA modulus. */
|
||||
n?: Uint8Array;
|
||||
/** RSA public exponent. */
|
||||
e?: Uint8Array;
|
||||
/** RSA private exponent, or the D component of an EC private key. */
|
||||
d?: Uint8Array;
|
||||
/** RSA private key parameter. */
|
||||
dp?: Uint8Array;
|
||||
/** RSA private key parameter. */
|
||||
dq?: Uint8Array;
|
||||
/** RSA private key parameter. */
|
||||
qi?: Uint8Array;
|
||||
/** RSA secret prime. */
|
||||
p?: Uint8Array;
|
||||
/** RSA secret prime, with p < q. */
|
||||
q?: Uint8Array;
|
||||
/** Symmetric key. */
|
||||
k?: Uint8Array;
|
||||
/** Protected Key, used with 'Bring Your Own Key'. */
|
||||
t?: Uint8Array;
|
||||
/** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */
|
||||
crv?: JsonWebKeyCurveName;
|
||||
/** X component of an EC public key. */
|
||||
x?: Uint8Array;
|
||||
/** Y component of an EC public key. */
|
||||
y?: Uint8Array;
|
||||
}
|
||||
/** The key vault error exception. */
|
||||
export interface KeyVaultError {
|
||||
/**
|
||||
* The key vault server error.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly error?: ErrorModel;
|
||||
}
|
||||
/** The key vault server error. */
|
||||
export interface ErrorModel {
|
||||
/**
|
||||
* The error code.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly code?: string;
|
||||
/**
|
||||
* The error message.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly message?: string;
|
||||
/**
|
||||
* The key vault server error.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly innerError?: ErrorModel;
|
||||
}
|
||||
/** The key import parameters. */
|
||||
export interface KeyImportParameters {
|
||||
/** Whether to import as a hardware key (HSM) or software key. */
|
||||
hsm?: boolean;
|
||||
/** The Json web key */
|
||||
key: JsonWebKey;
|
||||
/** The key management attributes. */
|
||||
keyAttributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/** The policy rules under which the key can be exported. */
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/** The key update parameters. */
|
||||
export interface KeyUpdateParameters {
|
||||
/** Json web key operations. For more information on possible key operations, see JsonWebKeyOperation. */
|
||||
keyOps?: JsonWebKeyOperation[];
|
||||
/** The attributes of a key managed by the key vault service. */
|
||||
keyAttributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/** The policy rules under which the key can be exported. */
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/** The key list result. */
|
||||
export interface KeyListResult {
|
||||
/**
|
||||
* A response message containing a list of keys in the key vault along with a link to the next page of keys.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly value?: KeyItem[];
|
||||
/**
|
||||
* The URL to get the next set of keys.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly nextLink?: string;
|
||||
}
|
||||
/** The key item containing key metadata. */
|
||||
export interface KeyItem {
|
||||
/** Key identifier. */
|
||||
kid?: string;
|
||||
/** The key management attributes. */
|
||||
attributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/**
|
||||
* True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly managed?: boolean;
|
||||
}
|
||||
/** The backup key result, containing the backup blob. */
|
||||
export interface BackupKeyResult {
|
||||
/**
|
||||
* The backup blob containing the backed up key.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly value?: Uint8Array;
|
||||
}
|
||||
/** The key restore parameters. */
|
||||
export interface KeyRestoreParameters {
|
||||
/** The backup blob associated with a key bundle. */
|
||||
keyBundleBackup: Uint8Array;
|
||||
}
|
||||
/** The key operations parameters. */
|
||||
export interface KeyOperationsParameters {
|
||||
/** algorithm identifier */
|
||||
algorithm: JsonWebKeyEncryptionAlgorithm;
|
||||
value: Uint8Array;
|
||||
/** Cryptographically random, non-repeating initialization vector for symmetric algorithms. */
|
||||
iv?: Uint8Array;
|
||||
/** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
/** The tag to authenticate when performing decryption with an authenticated algorithm. */
|
||||
authenticationTag?: Uint8Array;
|
||||
}
|
||||
/** The key operation result. */
|
||||
export interface KeyOperationResult {
|
||||
/**
|
||||
* Key identifier
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly kid?: string;
|
||||
/** NOTE: This property will not be serialized. It can only be populated by the server. */
|
||||
readonly result?: Uint8Array;
|
||||
/** NOTE: This property will not be serialized. It can only be populated by the server. */
|
||||
readonly iv?: Uint8Array;
|
||||
/** NOTE: This property will not be serialized. It can only be populated by the server. */
|
||||
readonly authenticationTag?: Uint8Array;
|
||||
/** NOTE: This property will not be serialized. It can only be populated by the server. */
|
||||
readonly additionalAuthenticatedData?: Uint8Array;
|
||||
}
|
||||
/** The key operations parameters. */
|
||||
export interface KeySignParameters {
|
||||
/** The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. */
|
||||
algorithm: JsonWebKeySignatureAlgorithm;
|
||||
value: Uint8Array;
|
||||
}
|
||||
/** The key verify parameters. */
|
||||
export interface KeyVerifyParameters {
|
||||
/** The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. */
|
||||
algorithm: JsonWebKeySignatureAlgorithm;
|
||||
/** The digest used for signing. */
|
||||
digest: Uint8Array;
|
||||
/** The signature to be verified. */
|
||||
signature: Uint8Array;
|
||||
}
|
||||
/** The key verify result. */
|
||||
export interface KeyVerifyResult {
|
||||
/**
|
||||
* True if the signature is verified, otherwise false.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly value?: boolean;
|
||||
}
|
||||
/** The release key parameters. */
|
||||
export interface KeyReleaseParameters {
|
||||
/** The attestation assertion for the target of the key release. */
|
||||
targetAttestationToken: string;
|
||||
/** A client provided nonce for freshness. */
|
||||
nonce?: string;
|
||||
/** The encryption algorithm to use to protected the exported key material */
|
||||
enc?: KeyEncryptionAlgorithm;
|
||||
}
|
||||
/** The release result, containing the released key. */
|
||||
export interface KeyReleaseResult {
|
||||
/**
|
||||
* A signed object containing the released key.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly value?: string;
|
||||
}
|
||||
/** A list of keys that have been deleted in this vault. */
|
||||
export interface DeletedKeyListResult {
|
||||
/**
|
||||
* A response message containing a list of deleted keys in the vault along with a link to the next page of deleted keys
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly value?: DeletedKeyItem[];
|
||||
/**
|
||||
* The URL to get the next set of deleted keys.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly nextLink?: string;
|
||||
}
|
||||
/** Management policy for a key. */
|
||||
export interface KeyRotationPolicy {
|
||||
/**
|
||||
* The key policy id.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly id?: string;
|
||||
/** Actions that will be performed by Key Vault over the lifetime of a key. For preview, lifetimeActions can only have two items at maximum: one for rotate, one for notify. Notification time would be default to 30 days before expiry and it is not configurable. */
|
||||
lifetimeActions?: LifetimeActions[];
|
||||
/** The key rotation policy attributes. */
|
||||
attributes?: KeyRotationPolicyAttributes;
|
||||
}
|
||||
/** Action and its trigger that will be performed by Key Vault over the lifetime of a key. */
|
||||
export interface LifetimeActions {
|
||||
/** The condition that will execute the action. */
|
||||
trigger?: LifetimeActionsTrigger;
|
||||
/** The action that will be executed. */
|
||||
action?: LifetimeActionsType;
|
||||
}
|
||||
/** A condition to be satisfied for an action to be executed. */
|
||||
export interface LifetimeActionsTrigger {
|
||||
/** Time after creation to attempt to rotate. It only applies to rotate. It will be in ISO 8601 duration format. Example: 90 days : "P90D" */
|
||||
timeAfterCreate?: string;
|
||||
/** Time before expiry to attempt to rotate or notify. It will be in ISO 8601 duration format. Example: 90 days : "P90D" */
|
||||
timeBeforeExpiry?: string;
|
||||
}
|
||||
/** The action that will be executed. */
|
||||
export interface LifetimeActionsType {
|
||||
/** The type of the action. The value should be compared case-insensitively. */
|
||||
type?: ActionType;
|
||||
}
|
||||
/** The key rotation policy attributes. */
|
||||
export interface KeyRotationPolicyAttributes {
|
||||
/** The expiryTime will be applied on the new key version. It should be at least 28 days. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D */
|
||||
expiryTime?: string;
|
||||
/**
|
||||
* The key rotation policy created time in UTC.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly created?: Date;
|
||||
/**
|
||||
* The key rotation policy's last updated time in UTC.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly updated?: Date;
|
||||
}
|
||||
/** The get random bytes request object. */
|
||||
export interface GetRandomBytesRequest {
|
||||
/** The requested number of random bytes. */
|
||||
count: number;
|
||||
}
|
||||
/** The get random bytes response object containing the bytes. */
|
||||
export interface RandomBytes {
|
||||
/** The bytes encoded as a base64url string. */
|
||||
value: Uint8Array;
|
||||
}
|
||||
/** Properties of the key pair backing a certificate. */
|
||||
export interface KeyProperties {
|
||||
/** Indicates if the private key can be exported. Release policy must be provided when creating the first version of an exportable key. */
|
||||
exportable?: boolean;
|
||||
/** The type of key pair to be used for the certificate. */
|
||||
keyType?: JsonWebKeyType;
|
||||
/** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */
|
||||
keySize?: number;
|
||||
/** Indicates if the same key pair will be used on certificate renewal. */
|
||||
reuseKey?: boolean;
|
||||
/** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */
|
||||
curve?: JsonWebKeyCurveName;
|
||||
}
|
||||
/** The export key parameters. */
|
||||
export interface KeyExportParameters {
|
||||
/** The export key encryption Json web key. This key MUST be a RSA key that supports encryption. */
|
||||
wrappingKey?: JsonWebKey;
|
||||
/** The export key encryption key identifier. This key MUST be a RSA key that supports encryption. */
|
||||
wrappingKid?: string;
|
||||
/** The encryption algorithm to use to protected the exported key material */
|
||||
enc?: KeyEncryptionAlgorithm;
|
||||
}
|
||||
/** The attributes of a key managed by the key vault service. */
|
||||
export type KeyAttributes = Attributes & {
|
||||
/**
|
||||
* softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly recoverableDays?: number;
|
||||
/**
|
||||
* Reflects the deletion recovery level currently in effect for keys in the current vault. If it contains 'Purgeable' the key can be permanently deleted by a privileged user; otherwise, only the system can purge the key, at the end of the retention interval.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly recoveryLevel?: DeletionRecoveryLevel;
|
||||
/** Indicates if the private key can be exported. Release policy must be provided when creating the first version of an exportable key. */
|
||||
exportable?: boolean;
|
||||
/**
|
||||
* The underlying HSM Platform.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly hsmPlatform?: string;
|
||||
};
|
||||
/** A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info */
|
||||
export type DeletedKeyBundle = KeyBundle & {
|
||||
/** The url of the recovery object, used to identify and recover the deleted key. */
|
||||
recoveryId?: string;
|
||||
/**
|
||||
* The time when the key is scheduled to be purged, in UTC
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly scheduledPurgeDate?: Date;
|
||||
/**
|
||||
* The time when the key was deleted, in UTC
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly deletedDate?: Date;
|
||||
};
|
||||
/** The deleted key item containing the deleted key metadata and information about deletion. */
|
||||
export type DeletedKeyItem = KeyItem & {
|
||||
/** The url of the recovery object, used to identify and recover the deleted key. */
|
||||
recoveryId?: string;
|
||||
/**
|
||||
* The time when the key is scheduled to be purged, in UTC
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly scheduledPurgeDate?: Date;
|
||||
/**
|
||||
* The time when the key was deleted, in UTC
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly deletedDate?: Date;
|
||||
};
|
||||
/** Known values of {@link ApiVersion75} that the service accepts. */
|
||||
export declare enum KnownApiVersion75 {
|
||||
/** Api Version '7.5' */
|
||||
Seven5 = "7.5"
|
||||
}
|
||||
/**
|
||||
* Defines values for ApiVersion75. \
|
||||
* {@link KnownApiVersion75} can be used interchangeably with ApiVersion75,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **7.5**: Api Version '7.5'
|
||||
*/
|
||||
export type ApiVersion75 = string;
|
||||
/** Known values of {@link JsonWebKeyType} that the service accepts. */
|
||||
export declare enum KnownJsonWebKeyType {
|
||||
/** Elliptic Curve. */
|
||||
EC = "EC",
|
||||
/** Elliptic Curve with a private key which is stored in the HSM. */
|
||||
ECHSM = "EC-HSM",
|
||||
/** RSA (https://tools.ietf.org/html/rfc3447) */
|
||||
RSA = "RSA",
|
||||
/** RSA with a private key which is stored in the HSM. */
|
||||
RSAHSM = "RSA-HSM",
|
||||
/** Octet sequence (used to represent symmetric keys) */
|
||||
Oct = "oct",
|
||||
/** Octet sequence (used to represent symmetric keys) which is stored the HSM. */
|
||||
OctHSM = "oct-HSM"
|
||||
}
|
||||
/**
|
||||
* Defines values for JsonWebKeyType. \
|
||||
* {@link KnownJsonWebKeyType} can be used interchangeably with JsonWebKeyType,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **EC**: Elliptic Curve. \
|
||||
* **EC-HSM**: Elliptic Curve with a private key which is stored in the HSM. \
|
||||
* **RSA**: RSA (https:\/\/tools.ietf.org\/html\/rfc3447) \
|
||||
* **RSA-HSM**: RSA with a private key which is stored in the HSM. \
|
||||
* **oct**: Octet sequence (used to represent symmetric keys) \
|
||||
* **oct-HSM**: Octet sequence (used to represent symmetric keys) which is stored the HSM.
|
||||
*/
|
||||
export type JsonWebKeyType = string;
|
||||
/** Known values of {@link JsonWebKeyOperation} that the service accepts. */
|
||||
export declare enum KnownJsonWebKeyOperation {
|
||||
Encrypt = "encrypt",
|
||||
Decrypt = "decrypt",
|
||||
Sign = "sign",
|
||||
Verify = "verify",
|
||||
WrapKey = "wrapKey",
|
||||
UnwrapKey = "unwrapKey",
|
||||
Import = "import",
|
||||
Export = "export"
|
||||
}
|
||||
/**
|
||||
* Defines values for JsonWebKeyOperation. \
|
||||
* {@link KnownJsonWebKeyOperation} can be used interchangeably with JsonWebKeyOperation,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **encrypt** \
|
||||
* **decrypt** \
|
||||
* **sign** \
|
||||
* **verify** \
|
||||
* **wrapKey** \
|
||||
* **unwrapKey** \
|
||||
* **import** \
|
||||
* **export**
|
||||
*/
|
||||
export type JsonWebKeyOperation = string;
|
||||
/** Known values of {@link DeletionRecoveryLevel} that the service accepts. */
|
||||
export declare enum KnownDeletionRecoveryLevel {
|
||||
/** Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) */
|
||||
Purgeable = "Purgeable",
|
||||
/** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered */
|
||||
RecoverablePurgeable = "Recoverable+Purgeable",
|
||||
/** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered */
|
||||
Recoverable = "Recoverable",
|
||||
/** Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered */
|
||||
RecoverableProtectedSubscription = "Recoverable+ProtectedSubscription",
|
||||
/** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled. */
|
||||
CustomizedRecoverablePurgeable = "CustomizedRecoverable+Purgeable",
|
||||
/** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available. */
|
||||
CustomizedRecoverable = "CustomizedRecoverable",
|
||||
/** Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled. */
|
||||
CustomizedRecoverableProtectedSubscription = "CustomizedRecoverable+ProtectedSubscription"
|
||||
}
|
||||
/**
|
||||
* Defines values for DeletionRecoveryLevel. \
|
||||
* {@link KnownDeletionRecoveryLevel} can be used interchangeably with DeletionRecoveryLevel,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Purgeable**: Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) \
|
||||
* **Recoverable+Purgeable**: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered \
|
||||
* **Recoverable**: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered \
|
||||
* **Recoverable+ProtectedSubscription**: Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered \
|
||||
* **CustomizedRecoverable+Purgeable**: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled. \
|
||||
* **CustomizedRecoverable**: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available. \
|
||||
* **CustomizedRecoverable+ProtectedSubscription**: Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled.
|
||||
*/
|
||||
export type DeletionRecoveryLevel = string;
|
||||
/** Known values of {@link JsonWebKeyCurveName} that the service accepts. */
|
||||
export declare enum KnownJsonWebKeyCurveName {
|
||||
/** The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. */
|
||||
P256 = "P-256",
|
||||
/** The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. */
|
||||
P384 = "P-384",
|
||||
/** The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. */
|
||||
P521 = "P-521",
|
||||
/** The SECG SECP256K1 elliptic curve. */
|
||||
P256K = "P-256K"
|
||||
}
|
||||
/**
|
||||
* Defines values for JsonWebKeyCurveName. \
|
||||
* {@link KnownJsonWebKeyCurveName} can be used interchangeably with JsonWebKeyCurveName,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **P-256**: The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. \
|
||||
* **P-384**: The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. \
|
||||
* **P-521**: The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. \
|
||||
* **P-256K**: The SECG SECP256K1 elliptic curve.
|
||||
*/
|
||||
export type JsonWebKeyCurveName = string;
|
||||
/** Known values of {@link JsonWebKeyEncryptionAlgorithm} that the service accepts. */
|
||||
export declare enum KnownJsonWebKeyEncryptionAlgorithm {
|
||||
RSAOaep = "RSA-OAEP",
|
||||
RSAOaep256 = "RSA-OAEP-256",
|
||||
RSA15 = "RSA1_5",
|
||||
A128GCM = "A128GCM",
|
||||
A192GCM = "A192GCM",
|
||||
A256GCM = "A256GCM",
|
||||
A128KW = "A128KW",
|
||||
A192KW = "A192KW",
|
||||
A256KW = "A256KW",
|
||||
A128CBC = "A128CBC",
|
||||
A192CBC = "A192CBC",
|
||||
A256CBC = "A256CBC",
|
||||
A128Cbcpad = "A128CBCPAD",
|
||||
A192Cbcpad = "A192CBCPAD",
|
||||
A256Cbcpad = "A256CBCPAD"
|
||||
}
|
||||
/**
|
||||
* Defines values for JsonWebKeyEncryptionAlgorithm. \
|
||||
* {@link KnownJsonWebKeyEncryptionAlgorithm} can be used interchangeably with JsonWebKeyEncryptionAlgorithm,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **RSA-OAEP** \
|
||||
* **RSA-OAEP-256** \
|
||||
* **RSA1_5** \
|
||||
* **A128GCM** \
|
||||
* **A192GCM** \
|
||||
* **A256GCM** \
|
||||
* **A128KW** \
|
||||
* **A192KW** \
|
||||
* **A256KW** \
|
||||
* **A128CBC** \
|
||||
* **A192CBC** \
|
||||
* **A256CBC** \
|
||||
* **A128CBCPAD** \
|
||||
* **A192CBCPAD** \
|
||||
* **A256CBCPAD**
|
||||
*/
|
||||
export type JsonWebKeyEncryptionAlgorithm = string;
|
||||
/** Known values of {@link JsonWebKeySignatureAlgorithm} that the service accepts. */
|
||||
export declare enum KnownJsonWebKeySignatureAlgorithm {
|
||||
/** RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
PS256 = "PS256",
|
||||
/** RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
PS384 = "PS384",
|
||||
/** RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
PS512 = "PS512",
|
||||
/** RSASSA-PKCS1-v1_5 using SHA-256, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
RS256 = "RS256",
|
||||
/** RSASSA-PKCS1-v1_5 using SHA-384, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
RS384 = "RS384",
|
||||
/** RSASSA-PKCS1-v1_5 using SHA-512, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
RS512 = "RS512",
|
||||
/** Reserved */
|
||||
Rsnull = "RSNULL",
|
||||
/** ECDSA using P-256 and SHA-256, as described in https://tools.ietf.org/html/rfc7518. */
|
||||
ES256 = "ES256",
|
||||
/** ECDSA using P-384 and SHA-384, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
ES384 = "ES384",
|
||||
/** ECDSA using P-521 and SHA-512, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
ES512 = "ES512",
|
||||
/** ECDSA using P-256K and SHA-256, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
ES256K = "ES256K"
|
||||
}
|
||||
/**
|
||||
* Defines values for JsonWebKeySignatureAlgorithm. \
|
||||
* {@link KnownJsonWebKeySignatureAlgorithm} can be used interchangeably with JsonWebKeySignatureAlgorithm,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **PS256**: RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **PS384**: RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **PS512**: RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **RS256**: RSASSA-PKCS1-v1_5 using SHA-256, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **RS384**: RSASSA-PKCS1-v1_5 using SHA-384, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **RS512**: RSASSA-PKCS1-v1_5 using SHA-512, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **RSNULL**: Reserved \
|
||||
* **ES256**: ECDSA using P-256 and SHA-256, as described in https:\/\/tools.ietf.org\/html\/rfc7518. \
|
||||
* **ES384**: ECDSA using P-384 and SHA-384, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **ES512**: ECDSA using P-521 and SHA-512, as described in https:\/\/tools.ietf.org\/html\/rfc7518 \
|
||||
* **ES256K**: ECDSA using P-256K and SHA-256, as described in https:\/\/tools.ietf.org\/html\/rfc7518
|
||||
*/
|
||||
export type JsonWebKeySignatureAlgorithm = string;
|
||||
/** Known values of {@link KeyEncryptionAlgorithm} that the service accepts. */
|
||||
export declare enum KnownKeyEncryptionAlgorithm {
|
||||
CKMRSAAESKEYWrap = "CKM_RSA_AES_KEY_WRAP",
|
||||
RSAAESKEYWrap256 = "RSA_AES_KEY_WRAP_256",
|
||||
RSAAESKEYWrap384 = "RSA_AES_KEY_WRAP_384"
|
||||
}
|
||||
/**
|
||||
* Defines values for KeyEncryptionAlgorithm. \
|
||||
* {@link KnownKeyEncryptionAlgorithm} can be used interchangeably with KeyEncryptionAlgorithm,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **CKM_RSA_AES_KEY_WRAP** \
|
||||
* **RSA_AES_KEY_WRAP_256** \
|
||||
* **RSA_AES_KEY_WRAP_384**
|
||||
*/
|
||||
export type KeyEncryptionAlgorithm = string;
|
||||
/** Defines values for ActionType. */
|
||||
export type ActionType = "Rotate" | "Notify";
|
||||
/** Optional parameters. */
|
||||
export interface CreateKeyOptionalParams extends coreClient.OperationOptions {
|
||||
/** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */
|
||||
keySize?: number;
|
||||
/** The public exponent for a RSA key. */
|
||||
publicExponent?: number;
|
||||
/** Array of JsonWebKeyOperation */
|
||||
keyOps?: JsonWebKeyOperation[];
|
||||
/** The attributes of a key managed by the key vault service. */
|
||||
keyAttributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */
|
||||
curve?: JsonWebKeyCurveName;
|
||||
/** The policy rules under which the key can be exported. */
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/** Contains response data for the createKey operation. */
|
||||
export type CreateKeyResponse = KeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface RotateKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the rotateKey operation. */
|
||||
export type RotateKeyResponse = KeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface ImportKeyOptionalParams extends coreClient.OperationOptions {
|
||||
/** Whether to import as a hardware key (HSM) or software key. */
|
||||
hsm?: boolean;
|
||||
/** The key management attributes. */
|
||||
keyAttributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/** The policy rules under which the key can be exported. */
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/** Contains response data for the importKey operation. */
|
||||
export type ImportKeyResponse = KeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface DeleteKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the deleteKey operation. */
|
||||
export type DeleteKeyResponse = DeletedKeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface UpdateKeyOptionalParams extends coreClient.OperationOptions {
|
||||
/** Json web key operations. For more information on possible key operations, see JsonWebKeyOperation. */
|
||||
keyOps?: JsonWebKeyOperation[];
|
||||
/** The attributes of a key managed by the key vault service. */
|
||||
keyAttributes?: KeyAttributes;
|
||||
/** Application specific metadata in the form of key-value pairs. */
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/** The policy rules under which the key can be exported. */
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/** Contains response data for the updateKey operation. */
|
||||
export type UpdateKeyResponse = KeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface GetKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the getKey operation. */
|
||||
export type GetKeyResponse = KeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface GetKeyVersionsOptionalParams extends coreClient.OperationOptions {
|
||||
/** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */
|
||||
maxresults?: number;
|
||||
}
|
||||
/** Contains response data for the getKeyVersions operation. */
|
||||
export type GetKeyVersionsResponse = KeyListResult;
|
||||
/** Optional parameters. */
|
||||
export interface GetKeysOptionalParams extends coreClient.OperationOptions {
|
||||
/** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */
|
||||
maxresults?: number;
|
||||
}
|
||||
/** Contains response data for the getKeys operation. */
|
||||
export type GetKeysResponse = KeyListResult;
|
||||
/** Optional parameters. */
|
||||
export interface BackupKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the backupKey operation. */
|
||||
export type BackupKeyResponse = BackupKeyResult;
|
||||
/** Optional parameters. */
|
||||
export interface RestoreKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the restoreKey operation. */
|
||||
export type RestoreKeyResponse = KeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface EncryptOptionalParams extends coreClient.OperationOptions {
|
||||
/** Cryptographically random, non-repeating initialization vector for symmetric algorithms. */
|
||||
iv?: Uint8Array;
|
||||
/** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
/** The tag to authenticate when performing decryption with an authenticated algorithm. */
|
||||
authenticationTag?: Uint8Array;
|
||||
}
|
||||
/** Contains response data for the encrypt operation. */
|
||||
export type EncryptResponse = KeyOperationResult;
|
||||
/** Optional parameters. */
|
||||
export interface DecryptOptionalParams extends coreClient.OperationOptions {
|
||||
/** Cryptographically random, non-repeating initialization vector for symmetric algorithms. */
|
||||
iv?: Uint8Array;
|
||||
/** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
/** The tag to authenticate when performing decryption with an authenticated algorithm. */
|
||||
authenticationTag?: Uint8Array;
|
||||
}
|
||||
/** Contains response data for the decrypt operation. */
|
||||
export type DecryptResponse = KeyOperationResult;
|
||||
/** Optional parameters. */
|
||||
export interface SignOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the sign operation. */
|
||||
export type SignResponse = KeyOperationResult;
|
||||
/** Optional parameters. */
|
||||
export interface VerifyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the verify operation. */
|
||||
export type VerifyResponse = KeyVerifyResult;
|
||||
/** Optional parameters. */
|
||||
export interface WrapKeyOptionalParams extends coreClient.OperationOptions {
|
||||
/** Cryptographically random, non-repeating initialization vector for symmetric algorithms. */
|
||||
iv?: Uint8Array;
|
||||
/** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
/** The tag to authenticate when performing decryption with an authenticated algorithm. */
|
||||
authenticationTag?: Uint8Array;
|
||||
}
|
||||
/** Contains response data for the wrapKey operation. */
|
||||
export type WrapKeyResponse = KeyOperationResult;
|
||||
/** Optional parameters. */
|
||||
export interface UnwrapKeyOptionalParams extends coreClient.OperationOptions {
|
||||
/** Cryptographically random, non-repeating initialization vector for symmetric algorithms. */
|
||||
iv?: Uint8Array;
|
||||
/** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */
|
||||
additionalAuthenticatedData?: Uint8Array;
|
||||
/** The tag to authenticate when performing decryption with an authenticated algorithm. */
|
||||
authenticationTag?: Uint8Array;
|
||||
}
|
||||
/** Contains response data for the unwrapKey operation. */
|
||||
export type UnwrapKeyResponse = KeyOperationResult;
|
||||
/** Optional parameters. */
|
||||
export interface ReleaseOptionalParams extends coreClient.OperationOptions {
|
||||
/** A client provided nonce for freshness. */
|
||||
nonce?: string;
|
||||
/** The encryption algorithm to use to protected the exported key material */
|
||||
enc?: KeyEncryptionAlgorithm;
|
||||
}
|
||||
/** Contains response data for the release operation. */
|
||||
export type ReleaseResponse = KeyReleaseResult;
|
||||
/** Optional parameters. */
|
||||
export interface GetDeletedKeysOptionalParams extends coreClient.OperationOptions {
|
||||
/** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */
|
||||
maxresults?: number;
|
||||
}
|
||||
/** Contains response data for the getDeletedKeys operation. */
|
||||
export type GetDeletedKeysResponse = DeletedKeyListResult;
|
||||
/** Optional parameters. */
|
||||
export interface GetDeletedKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the getDeletedKey operation. */
|
||||
export type GetDeletedKeyResponse = DeletedKeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface PurgeDeletedKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Optional parameters. */
|
||||
export interface RecoverDeletedKeyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the recoverDeletedKey operation. */
|
||||
export type RecoverDeletedKeyResponse = KeyBundle;
|
||||
/** Optional parameters. */
|
||||
export interface GetKeyRotationPolicyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the getKeyRotationPolicy operation. */
|
||||
export type GetKeyRotationPolicyResponse = KeyRotationPolicy;
|
||||
/** Optional parameters. */
|
||||
export interface UpdateKeyRotationPolicyOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the updateKeyRotationPolicy operation. */
|
||||
export type UpdateKeyRotationPolicyResponse = KeyRotationPolicy;
|
||||
/** Optional parameters. */
|
||||
export interface GetRandomBytesOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
/** Contains response data for the getRandomBytes operation. */
|
||||
export type GetRandomBytesResponse = RandomBytes;
|
||||
/** Optional parameters. */
|
||||
export interface GetKeyVersionsNextOptionalParams extends coreClient.OperationOptions {
|
||||
/** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */
|
||||
maxresults?: number;
|
||||
}
|
||||
/** Contains response data for the getKeyVersionsNext operation. */
|
||||
export type GetKeyVersionsNextResponse = KeyListResult;
|
||||
/** Optional parameters. */
|
||||
export interface GetKeysNextOptionalParams extends coreClient.OperationOptions {
|
||||
/** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */
|
||||
maxresults?: number;
|
||||
}
|
||||
/** Contains response data for the getKeysNext operation. */
|
||||
export type GetKeysNextResponse = KeyListResult;
|
||||
/** Optional parameters. */
|
||||
export interface GetDeletedKeysNextOptionalParams extends coreClient.OperationOptions {
|
||||
/** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */
|
||||
maxresults?: number;
|
||||
}
|
||||
/** Contains response data for the getDeletedKeysNext operation. */
|
||||
export type GetDeletedKeysNextResponse = DeletedKeyListResult;
|
||||
/** Optional parameters. */
|
||||
export interface KeyVaultClientOptionalParams extends coreHttpCompat.ExtendedServiceClientOptions {
|
||||
/** Overrides client endpoint. */
|
||||
endpoint?: string;
|
||||
}
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.d.ts.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
124
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.js
generated
vendored
Normal file
124
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.js
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
/** Known values of {@link ApiVersion75} that the service accepts. */
|
||||
export var KnownApiVersion75;
|
||||
(function (KnownApiVersion75) {
|
||||
/** Api Version '7.5' */
|
||||
KnownApiVersion75["Seven5"] = "7.5";
|
||||
})(KnownApiVersion75 || (KnownApiVersion75 = {}));
|
||||
/** Known values of {@link JsonWebKeyType} that the service accepts. */
|
||||
export var KnownJsonWebKeyType;
|
||||
(function (KnownJsonWebKeyType) {
|
||||
/** Elliptic Curve. */
|
||||
KnownJsonWebKeyType["EC"] = "EC";
|
||||
/** Elliptic Curve with a private key which is stored in the HSM. */
|
||||
KnownJsonWebKeyType["ECHSM"] = "EC-HSM";
|
||||
/** RSA (https://tools.ietf.org/html/rfc3447) */
|
||||
KnownJsonWebKeyType["RSA"] = "RSA";
|
||||
/** RSA with a private key which is stored in the HSM. */
|
||||
KnownJsonWebKeyType["RSAHSM"] = "RSA-HSM";
|
||||
/** Octet sequence (used to represent symmetric keys) */
|
||||
KnownJsonWebKeyType["Oct"] = "oct";
|
||||
/** Octet sequence (used to represent symmetric keys) which is stored the HSM. */
|
||||
KnownJsonWebKeyType["OctHSM"] = "oct-HSM";
|
||||
})(KnownJsonWebKeyType || (KnownJsonWebKeyType = {}));
|
||||
/** Known values of {@link JsonWebKeyOperation} that the service accepts. */
|
||||
export var KnownJsonWebKeyOperation;
|
||||
(function (KnownJsonWebKeyOperation) {
|
||||
KnownJsonWebKeyOperation["Encrypt"] = "encrypt";
|
||||
KnownJsonWebKeyOperation["Decrypt"] = "decrypt";
|
||||
KnownJsonWebKeyOperation["Sign"] = "sign";
|
||||
KnownJsonWebKeyOperation["Verify"] = "verify";
|
||||
KnownJsonWebKeyOperation["WrapKey"] = "wrapKey";
|
||||
KnownJsonWebKeyOperation["UnwrapKey"] = "unwrapKey";
|
||||
KnownJsonWebKeyOperation["Import"] = "import";
|
||||
KnownJsonWebKeyOperation["Export"] = "export";
|
||||
})(KnownJsonWebKeyOperation || (KnownJsonWebKeyOperation = {}));
|
||||
/** Known values of {@link DeletionRecoveryLevel} that the service accepts. */
|
||||
export var KnownDeletionRecoveryLevel;
|
||||
(function (KnownDeletionRecoveryLevel) {
|
||||
/** Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) */
|
||||
KnownDeletionRecoveryLevel["Purgeable"] = "Purgeable";
|
||||
/** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered */
|
||||
KnownDeletionRecoveryLevel["RecoverablePurgeable"] = "Recoverable+Purgeable";
|
||||
/** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered */
|
||||
KnownDeletionRecoveryLevel["Recoverable"] = "Recoverable";
|
||||
/** Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered */
|
||||
KnownDeletionRecoveryLevel["RecoverableProtectedSubscription"] = "Recoverable+ProtectedSubscription";
|
||||
/** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled. */
|
||||
KnownDeletionRecoveryLevel["CustomizedRecoverablePurgeable"] = "CustomizedRecoverable+Purgeable";
|
||||
/** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available. */
|
||||
KnownDeletionRecoveryLevel["CustomizedRecoverable"] = "CustomizedRecoverable";
|
||||
/** Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled. */
|
||||
KnownDeletionRecoveryLevel["CustomizedRecoverableProtectedSubscription"] = "CustomizedRecoverable+ProtectedSubscription";
|
||||
})(KnownDeletionRecoveryLevel || (KnownDeletionRecoveryLevel = {}));
|
||||
/** Known values of {@link JsonWebKeyCurveName} that the service accepts. */
|
||||
export var KnownJsonWebKeyCurveName;
|
||||
(function (KnownJsonWebKeyCurveName) {
|
||||
/** The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. */
|
||||
KnownJsonWebKeyCurveName["P256"] = "P-256";
|
||||
/** The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. */
|
||||
KnownJsonWebKeyCurveName["P384"] = "P-384";
|
||||
/** The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. */
|
||||
KnownJsonWebKeyCurveName["P521"] = "P-521";
|
||||
/** The SECG SECP256K1 elliptic curve. */
|
||||
KnownJsonWebKeyCurveName["P256K"] = "P-256K";
|
||||
})(KnownJsonWebKeyCurveName || (KnownJsonWebKeyCurveName = {}));
|
||||
/** Known values of {@link JsonWebKeyEncryptionAlgorithm} that the service accepts. */
|
||||
export var KnownJsonWebKeyEncryptionAlgorithm;
|
||||
(function (KnownJsonWebKeyEncryptionAlgorithm) {
|
||||
KnownJsonWebKeyEncryptionAlgorithm["RSAOaep"] = "RSA-OAEP";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["RSAOaep256"] = "RSA-OAEP-256";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["RSA15"] = "RSA1_5";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A128GCM"] = "A128GCM";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A192GCM"] = "A192GCM";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A256GCM"] = "A256GCM";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A128KW"] = "A128KW";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A192KW"] = "A192KW";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A256KW"] = "A256KW";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A128CBC"] = "A128CBC";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A192CBC"] = "A192CBC";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A256CBC"] = "A256CBC";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A128Cbcpad"] = "A128CBCPAD";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A192Cbcpad"] = "A192CBCPAD";
|
||||
KnownJsonWebKeyEncryptionAlgorithm["A256Cbcpad"] = "A256CBCPAD";
|
||||
})(KnownJsonWebKeyEncryptionAlgorithm || (KnownJsonWebKeyEncryptionAlgorithm = {}));
|
||||
/** Known values of {@link JsonWebKeySignatureAlgorithm} that the service accepts. */
|
||||
export var KnownJsonWebKeySignatureAlgorithm;
|
||||
(function (KnownJsonWebKeySignatureAlgorithm) {
|
||||
/** RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["PS256"] = "PS256";
|
||||
/** RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["PS384"] = "PS384";
|
||||
/** RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["PS512"] = "PS512";
|
||||
/** RSASSA-PKCS1-v1_5 using SHA-256, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["RS256"] = "RS256";
|
||||
/** RSASSA-PKCS1-v1_5 using SHA-384, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["RS384"] = "RS384";
|
||||
/** RSASSA-PKCS1-v1_5 using SHA-512, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["RS512"] = "RS512";
|
||||
/** Reserved */
|
||||
KnownJsonWebKeySignatureAlgorithm["Rsnull"] = "RSNULL";
|
||||
/** ECDSA using P-256 and SHA-256, as described in https://tools.ietf.org/html/rfc7518. */
|
||||
KnownJsonWebKeySignatureAlgorithm["ES256"] = "ES256";
|
||||
/** ECDSA using P-384 and SHA-384, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["ES384"] = "ES384";
|
||||
/** ECDSA using P-521 and SHA-512, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["ES512"] = "ES512";
|
||||
/** ECDSA using P-256K and SHA-256, as described in https://tools.ietf.org/html/rfc7518 */
|
||||
KnownJsonWebKeySignatureAlgorithm["ES256K"] = "ES256K";
|
||||
})(KnownJsonWebKeySignatureAlgorithm || (KnownJsonWebKeySignatureAlgorithm = {}));
|
||||
/** Known values of {@link KeyEncryptionAlgorithm} that the service accepts. */
|
||||
export var KnownKeyEncryptionAlgorithm;
|
||||
(function (KnownKeyEncryptionAlgorithm) {
|
||||
KnownKeyEncryptionAlgorithm["CKMRSAAESKEYWrap"] = "CKM_RSA_AES_KEY_WRAP";
|
||||
KnownKeyEncryptionAlgorithm["RSAAESKEYWrap256"] = "RSA_AES_KEY_WRAP_256";
|
||||
KnownKeyEncryptionAlgorithm["RSAAESKEYWrap384"] = "RSA_AES_KEY_WRAP_384";
|
||||
})(KnownKeyEncryptionAlgorithm || (KnownKeyEncryptionAlgorithm = {}));
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
35
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.d.ts
generated
vendored
Normal file
35
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import * as coreClient from "@azure/core-client";
|
||||
export declare const KeyCreateParameters: coreClient.CompositeMapper;
|
||||
export declare const Attributes: coreClient.CompositeMapper;
|
||||
export declare const KeyReleasePolicy: coreClient.CompositeMapper;
|
||||
export declare const KeyBundle: coreClient.CompositeMapper;
|
||||
export declare const JsonWebKey: coreClient.CompositeMapper;
|
||||
export declare const KeyVaultError: coreClient.CompositeMapper;
|
||||
export declare const ErrorModel: coreClient.CompositeMapper;
|
||||
export declare const KeyImportParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyUpdateParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyListResult: coreClient.CompositeMapper;
|
||||
export declare const KeyItem: coreClient.CompositeMapper;
|
||||
export declare const BackupKeyResult: coreClient.CompositeMapper;
|
||||
export declare const KeyRestoreParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyOperationsParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyOperationResult: coreClient.CompositeMapper;
|
||||
export declare const KeySignParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyVerifyParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyVerifyResult: coreClient.CompositeMapper;
|
||||
export declare const KeyReleaseParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyReleaseResult: coreClient.CompositeMapper;
|
||||
export declare const DeletedKeyListResult: coreClient.CompositeMapper;
|
||||
export declare const KeyRotationPolicy: coreClient.CompositeMapper;
|
||||
export declare const LifetimeActions: coreClient.CompositeMapper;
|
||||
export declare const LifetimeActionsTrigger: coreClient.CompositeMapper;
|
||||
export declare const LifetimeActionsType: coreClient.CompositeMapper;
|
||||
export declare const KeyRotationPolicyAttributes: coreClient.CompositeMapper;
|
||||
export declare const GetRandomBytesRequest: coreClient.CompositeMapper;
|
||||
export declare const RandomBytes: coreClient.CompositeMapper;
|
||||
export declare const KeyProperties: coreClient.CompositeMapper;
|
||||
export declare const KeyExportParameters: coreClient.CompositeMapper;
|
||||
export declare const KeyAttributes: coreClient.CompositeMapper;
|
||||
export declare const DeletedKeyBundle: coreClient.CompositeMapper;
|
||||
export declare const DeletedKeyItem: coreClient.CompositeMapper;
|
||||
//# sourceMappingURL=mappers.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../src/generated/models/mappers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eAgE5C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eAuCnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,eA0BzC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,eA0ClC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eA4GnC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eActC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eA4BnC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eAyC5C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eAuC5C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eA2BtC,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,UAAU,CAAC,eAkChC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,eAcxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,eAc7C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,eAuChD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,UAAU,CAAC,eA0C3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,eAqB1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eA4B5C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,eAcxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,eA6B7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,eAczC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,eA2B7C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,eAiC1C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,eAqBxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAAC,eAmB/C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eAc5C,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,eA2BpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAkB9C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,eAcpC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eAqCtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eA0B5C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eAmCtC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,eA4BzC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,eA4BvC,CAAC"}
|
||||
1029
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.js
generated
vendored
Normal file
1029
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/mappers.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
44
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.d.ts
generated
vendored
Normal file
44
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { OperationParameter, OperationURLParameter, OperationQueryParameter } from "@azure/core-client";
|
||||
export declare const contentType: OperationParameter;
|
||||
export declare const accept: OperationParameter;
|
||||
export declare const kty: OperationParameter;
|
||||
export declare const keySize: OperationParameter;
|
||||
export declare const publicExponent: OperationParameter;
|
||||
export declare const keyOps: OperationParameter;
|
||||
export declare const keyAttributes: OperationParameter;
|
||||
export declare const tags: OperationParameter;
|
||||
export declare const curve: OperationParameter;
|
||||
export declare const releasePolicy: OperationParameter;
|
||||
export declare const vaultBaseUrl: OperationURLParameter;
|
||||
export declare const keyName: OperationURLParameter;
|
||||
export declare const apiVersion: OperationQueryParameter;
|
||||
export declare const hsm: OperationParameter;
|
||||
export declare const key: OperationParameter;
|
||||
export declare const keyAttributes1: OperationParameter;
|
||||
export declare const tags1: OperationParameter;
|
||||
export declare const releasePolicy1: OperationParameter;
|
||||
export declare const keyName1: OperationURLParameter;
|
||||
export declare const keyOps1: OperationParameter;
|
||||
export declare const keyAttributes2: OperationParameter;
|
||||
export declare const tags2: OperationParameter;
|
||||
export declare const releasePolicy2: OperationParameter;
|
||||
export declare const keyVersion: OperationURLParameter;
|
||||
export declare const maxresults: OperationQueryParameter;
|
||||
export declare const keyBundleBackup: OperationParameter;
|
||||
export declare const algorithm: OperationParameter;
|
||||
export declare const value: OperationParameter;
|
||||
export declare const iv: OperationParameter;
|
||||
export declare const additionalAuthenticatedData: OperationParameter;
|
||||
export declare const authenticationTag: OperationParameter;
|
||||
export declare const algorithm1: OperationParameter;
|
||||
export declare const value1: OperationParameter;
|
||||
export declare const algorithm2: OperationParameter;
|
||||
export declare const digest: OperationParameter;
|
||||
export declare const signature: OperationParameter;
|
||||
export declare const targetAttestationToken: OperationParameter;
|
||||
export declare const nonce: OperationParameter;
|
||||
export declare const enc: OperationParameter;
|
||||
export declare const keyRotationPolicy: OperationParameter;
|
||||
export declare const count: OperationParameter;
|
||||
export declare const nextLink: OperationURLParameter;
|
||||
//# sourceMappingURL=parameters.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../src/generated/models/parameters.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAc5B,eAAO,MAAM,WAAW,EAAE,kBAUzB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,kBAUpB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,kBAGjB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,kBAGrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAG5B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,kBAGpB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAG3B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,kBAGlB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAG3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,qBAU1B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,qBAYrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,uBASxB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,kBAGjB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,kBAGjB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAG5B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAG5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,qBAStB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,kBAGrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAG5B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAG5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,qBASxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,uBAYxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAG7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,kBAGvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,kBAGhB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,kBAGzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,kBAG/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,kBAGxB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,kBAGpB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,kBAGxB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,kBAGpB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,kBAGvB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,kBAGpC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,kBAGjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,kBAG/B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,qBAUtB,CAAC"}
|
||||
241
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.js
generated
vendored
Normal file
241
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.js
generated
vendored
Normal file
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
import { KeyCreateParameters as KeyCreateParametersMapper, KeyImportParameters as KeyImportParametersMapper, KeyUpdateParameters as KeyUpdateParametersMapper, KeyRestoreParameters as KeyRestoreParametersMapper, KeyOperationsParameters as KeyOperationsParametersMapper, KeySignParameters as KeySignParametersMapper, KeyVerifyParameters as KeyVerifyParametersMapper, KeyReleaseParameters as KeyReleaseParametersMapper, KeyRotationPolicy as KeyRotationPolicyMapper, GetRandomBytesRequest as GetRandomBytesRequestMapper } from "../models/mappers.js";
|
||||
export const contentType = {
|
||||
parameterPath: ["options", "contentType"],
|
||||
mapper: {
|
||||
defaultValue: "application/json",
|
||||
isConstant: true,
|
||||
serializedName: "Content-Type",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const accept = {
|
||||
parameterPath: "accept",
|
||||
mapper: {
|
||||
defaultValue: "application/json",
|
||||
isConstant: true,
|
||||
serializedName: "Accept",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const kty = {
|
||||
parameterPath: "kty",
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const keySize = {
|
||||
parameterPath: ["options", "keySize"],
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const publicExponent = {
|
||||
parameterPath: ["options", "publicExponent"],
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const keyOps = {
|
||||
parameterPath: ["options", "keyOps"],
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const keyAttributes = {
|
||||
parameterPath: ["options", "keyAttributes"],
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const tags = {
|
||||
parameterPath: ["options", "tags"],
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const curve = {
|
||||
parameterPath: ["options", "curve"],
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const releasePolicy = {
|
||||
parameterPath: ["options", "releasePolicy"],
|
||||
mapper: KeyCreateParametersMapper
|
||||
};
|
||||
export const vaultBaseUrl = {
|
||||
parameterPath: "vaultBaseUrl",
|
||||
mapper: {
|
||||
serializedName: "vaultBaseUrl",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
export const keyName = {
|
||||
parameterPath: "keyName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[0-9a-zA-Z-]+$")
|
||||
},
|
||||
serializedName: "key-name",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const apiVersion = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
serializedName: "api-version",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const hsm = {
|
||||
parameterPath: ["options", "hsm"],
|
||||
mapper: KeyImportParametersMapper
|
||||
};
|
||||
export const key = {
|
||||
parameterPath: "key",
|
||||
mapper: KeyImportParametersMapper
|
||||
};
|
||||
export const keyAttributes1 = {
|
||||
parameterPath: ["options", "keyAttributes"],
|
||||
mapper: KeyImportParametersMapper
|
||||
};
|
||||
export const tags1 = {
|
||||
parameterPath: ["options", "tags"],
|
||||
mapper: KeyImportParametersMapper
|
||||
};
|
||||
export const releasePolicy1 = {
|
||||
parameterPath: ["options", "releasePolicy"],
|
||||
mapper: KeyImportParametersMapper
|
||||
};
|
||||
export const keyName1 = {
|
||||
parameterPath: "keyName",
|
||||
mapper: {
|
||||
serializedName: "key-name",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const keyOps1 = {
|
||||
parameterPath: ["options", "keyOps"],
|
||||
mapper: KeyUpdateParametersMapper
|
||||
};
|
||||
export const keyAttributes2 = {
|
||||
parameterPath: ["options", "keyAttributes"],
|
||||
mapper: KeyUpdateParametersMapper
|
||||
};
|
||||
export const tags2 = {
|
||||
parameterPath: ["options", "tags"],
|
||||
mapper: KeyUpdateParametersMapper
|
||||
};
|
||||
export const releasePolicy2 = {
|
||||
parameterPath: ["options", "releasePolicy"],
|
||||
mapper: KeyUpdateParametersMapper
|
||||
};
|
||||
export const keyVersion = {
|
||||
parameterPath: "keyVersion",
|
||||
mapper: {
|
||||
serializedName: "key-version",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const maxresults = {
|
||||
parameterPath: ["options", "maxresults"],
|
||||
mapper: {
|
||||
constraints: {
|
||||
InclusiveMaximum: 25,
|
||||
InclusiveMinimum: 1
|
||||
},
|
||||
serializedName: "maxresults",
|
||||
type: {
|
||||
name: "Number"
|
||||
}
|
||||
}
|
||||
};
|
||||
export const keyBundleBackup = {
|
||||
parameterPath: "keyBundleBackup",
|
||||
mapper: KeyRestoreParametersMapper
|
||||
};
|
||||
export const algorithm = {
|
||||
parameterPath: "algorithm",
|
||||
mapper: KeyOperationsParametersMapper
|
||||
};
|
||||
export const value = {
|
||||
parameterPath: "value",
|
||||
mapper: KeyOperationsParametersMapper
|
||||
};
|
||||
export const iv = {
|
||||
parameterPath: ["options", "iv"],
|
||||
mapper: KeyOperationsParametersMapper
|
||||
};
|
||||
export const additionalAuthenticatedData = {
|
||||
parameterPath: ["options", "additionalAuthenticatedData"],
|
||||
mapper: KeyOperationsParametersMapper
|
||||
};
|
||||
export const authenticationTag = {
|
||||
parameterPath: ["options", "authenticationTag"],
|
||||
mapper: KeyOperationsParametersMapper
|
||||
};
|
||||
export const algorithm1 = {
|
||||
parameterPath: "algorithm",
|
||||
mapper: KeySignParametersMapper
|
||||
};
|
||||
export const value1 = {
|
||||
parameterPath: "value",
|
||||
mapper: KeySignParametersMapper
|
||||
};
|
||||
export const algorithm2 = {
|
||||
parameterPath: "algorithm",
|
||||
mapper: KeyVerifyParametersMapper
|
||||
};
|
||||
export const digest = {
|
||||
parameterPath: "digest",
|
||||
mapper: KeyVerifyParametersMapper
|
||||
};
|
||||
export const signature = {
|
||||
parameterPath: "signature",
|
||||
mapper: KeyVerifyParametersMapper
|
||||
};
|
||||
export const targetAttestationToken = {
|
||||
parameterPath: "targetAttestationToken",
|
||||
mapper: KeyReleaseParametersMapper
|
||||
};
|
||||
export const nonce = {
|
||||
parameterPath: ["options", "nonce"],
|
||||
mapper: KeyReleaseParametersMapper
|
||||
};
|
||||
export const enc = {
|
||||
parameterPath: ["options", "enc"],
|
||||
mapper: KeyReleaseParametersMapper
|
||||
};
|
||||
export const keyRotationPolicy = {
|
||||
parameterPath: "keyRotationPolicy",
|
||||
mapper: KeyRotationPolicyMapper
|
||||
};
|
||||
export const count = {
|
||||
parameterPath: "count",
|
||||
mapper: GetRandomBytesRequestMapper
|
||||
};
|
||||
export const nextLink = {
|
||||
parameterPath: "nextLink",
|
||||
mapper: {
|
||||
serializedName: "nextLink",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
//# sourceMappingURL=parameters.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/generated/models/parameters.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
42
node_modules/@azure/keyvault-keys/dist/browser/identifier.d.ts
generated
vendored
Normal file
42
node_modules/@azure/keyvault-keys/dist/browser/identifier.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Represents the segments that compose a Key Vault Key Id.
|
||||
*/
|
||||
export interface KeyVaultKeyIdentifier {
|
||||
/**
|
||||
* The complete representation of the Key Vault Key Id. For example:
|
||||
*
|
||||
* https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>
|
||||
*
|
||||
*/
|
||||
sourceId: string;
|
||||
/**
|
||||
* The URL of the Azure Key Vault instance to which the Key belongs.
|
||||
*/
|
||||
vaultUrl: string;
|
||||
/**
|
||||
* The version of Key Vault Key. Might be undefined.
|
||||
*/
|
||||
version?: string;
|
||||
/**
|
||||
* The name of the Key Vault Key.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
/**
|
||||
* Parses the given Key Vault Key Id. An example is:
|
||||
*
|
||||
* https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>
|
||||
*
|
||||
* On parsing the above Id, this function returns:
|
||||
*```ts
|
||||
* {
|
||||
* sourceId: "https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>",
|
||||
* vaultUrl: "https://<keyvault-name>.vault.azure.net",
|
||||
* version: "<unique-version-id>",
|
||||
* name: "<key-name>"
|
||||
* }
|
||||
*```
|
||||
* @param id - The Id of the Key Vault Key.
|
||||
*/
|
||||
export declare function parseKeyVaultKeyIdentifier(id: string): KeyVaultKeyIdentifier;
|
||||
//# sourceMappingURL=identifier.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/identifier.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/identifier.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../src/identifier.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,MAAM,GAAG,qBAAqB,CAQ5E"}
|
||||
25
node_modules/@azure/keyvault-keys/dist/browser/identifier.js
generated
vendored
Normal file
25
node_modules/@azure/keyvault-keys/dist/browser/identifier.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { parseKeyVaultIdentifier } from "@azure/keyvault-common";
|
||||
/**
|
||||
* Parses the given Key Vault Key Id. An example is:
|
||||
*
|
||||
* https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>
|
||||
*
|
||||
* On parsing the above Id, this function returns:
|
||||
*```ts
|
||||
* {
|
||||
* sourceId: "https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>",
|
||||
* vaultUrl: "https://<keyvault-name>.vault.azure.net",
|
||||
* version: "<unique-version-id>",
|
||||
* name: "<key-name>"
|
||||
* }
|
||||
*```
|
||||
* @param id - The Id of the Key Vault Key.
|
||||
*/
|
||||
export function parseKeyVaultKeyIdentifier(id) {
|
||||
const urlParts = id.split("/");
|
||||
const collection = urlParts[3];
|
||||
return Object.assign({ sourceId: id }, parseKeyVaultIdentifier(collection, id));
|
||||
}
|
||||
//# sourceMappingURL=identifier.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/identifier.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/identifier.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../src/identifier.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AA8BjE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAU;IACnD,MAAM,QAAQ,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE/B,uBACE,QAAQ,EAAE,EAAE,IACT,uBAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,EAC1C;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { parseKeyVaultIdentifier } from \"@azure/keyvault-common\";\n\n/**\n * Represents the segments that compose a Key Vault Key Id.\n */\nexport interface KeyVaultKeyIdentifier {\n /**\n * The complete representation of the Key Vault Key Id. For example:\n *\n * https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\n *\n */\n sourceId: string;\n\n /**\n * The URL of the Azure Key Vault instance to which the Key belongs.\n */\n vaultUrl: string;\n\n /**\n * The version of Key Vault Key. Might be undefined.\n */\n version?: string;\n\n /**\n * The name of the Key Vault Key.\n */\n name: string;\n}\n\n/**\n * Parses the given Key Vault Key Id. An example is:\n *\n * https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\n *\n * On parsing the above Id, this function returns:\n *```ts\n * {\n * sourceId: \"https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\",\n * vaultUrl: \"https://<keyvault-name>.vault.azure.net\",\n * version: \"<unique-version-id>\",\n * name: \"<key-name>\"\n * }\n *```\n * @param id - The Id of the Key Vault Key.\n */\nexport function parseKeyVaultKeyIdentifier(id: string): KeyVaultKeyIdentifier {\n const urlParts = id.split(\"/\");\n const collection = urlParts[3];\n\n return {\n sourceId: id,\n ...parseKeyVaultIdentifier(collection, id),\n };\n}\n"]}
|
||||
475
node_modules/@azure/keyvault-keys/dist/browser/index.d.ts
generated
vendored
Normal file
475
node_modules/@azure/keyvault-keys/dist/browser/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,475 @@
|
||||
import { TokenCredential } from "@azure/core-auth";
|
||||
import { logger } from "./log.js";
|
||||
import { PageSettings, PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { PollOperationState, PollerLike } from "@azure/core-lro";
|
||||
import { DeletionRecoveryLevel, KnownDeletionRecoveryLevel } from "./generated/models/index.js";
|
||||
import { BackupKeyOptions, BeginDeleteKeyOptions, BeginRecoverDeletedKeyOptions, CreateEcKeyOptions, CreateKeyOptions, CreateOctKeyOptions, CreateRsaKeyOptions, CryptographyClientOptions, CryptographyOptions, DeletedKey, GetCryptographyClientOptions, GetDeletedKeyOptions, GetKeyOptions, GetKeyRotationPolicyOptions, GetRandomBytesOptions, ImportKeyOptions, JsonWebKey, KeyClientOptions, KeyExportEncryptionAlgorithm, KeyOperation, KeyPollerOptions, KeyProperties, KeyReleasePolicy, KeyRotationLifetimeAction, KeyRotationPolicy, KeyRotationPolicyAction, KeyRotationPolicyProperties, KeyType, KeyVaultKey, KnownKeyExportEncryptionAlgorithm, KnownKeyOperations, KnownKeyTypes, ListDeletedKeysOptions, ListPropertiesOfKeyVersionsOptions, ListPropertiesOfKeysOptions, PurgeDeletedKeyOptions, ReleaseKeyOptions, ReleaseKeyResult, RestoreKeyBackupOptions, RotateKeyOptions, UpdateKeyPropertiesOptions, UpdateKeyRotationPolicyOptions } from "./keysModels.js";
|
||||
import { CryptographyClient } from "./cryptographyClient.js";
|
||||
import { AesCbcDecryptParameters, AesCbcEncryptParameters, AesCbcEncryptionAlgorithm, AesGcmDecryptParameters, AesGcmEncryptParameters, AesGcmEncryptionAlgorithm, DecryptOptions, DecryptParameters, DecryptResult, EncryptOptions, EncryptParameters, EncryptResult, EncryptionAlgorithm, KeyCurveName, KeyWrapAlgorithm, KnownEncryptionAlgorithms, KnownKeyCurveNames, KnownSignatureAlgorithms, RsaDecryptParameters, RsaEncryptParameters, RsaEncryptionAlgorithm, SignOptions, SignResult, SignatureAlgorithm, UnwrapKeyOptions, UnwrapResult, VerifyDataOptions, VerifyOptions, VerifyResult, WrapKeyOptions, WrapResult } from "./cryptographyClientModels.js";
|
||||
import { KeyVaultKeyIdentifier, parseKeyVaultKeyIdentifier } from "./identifier.js";
|
||||
export { CryptographyClientOptions, KeyClientOptions, BackupKeyOptions, CreateEcKeyOptions, CreateKeyOptions, CreateRsaKeyOptions, CreateOctKeyOptions, CryptographyClient, CryptographyOptions, RsaEncryptionAlgorithm, RsaDecryptParameters, AesGcmEncryptionAlgorithm, AesGcmDecryptParameters, AesCbcEncryptionAlgorithm, AesCbcDecryptParameters, DecryptParameters, DecryptOptions, DecryptResult, DeletedKey, DeletionRecoveryLevel, KnownDeletionRecoveryLevel, RsaEncryptParameters, AesGcmEncryptParameters, AesCbcEncryptParameters, EncryptParameters, EncryptOptions, EncryptResult, GetDeletedKeyOptions, GetKeyOptions, GetRandomBytesOptions, ImportKeyOptions, JsonWebKey, KeyCurveName, KnownKeyCurveNames, KnownKeyExportEncryptionAlgorithm, EncryptionAlgorithm, KnownEncryptionAlgorithms, KeyOperation, KnownKeyOperations, KeyType, KnownKeyTypes, KeyPollerOptions, BeginDeleteKeyOptions, BeginRecoverDeletedKeyOptions, KeyProperties, SignatureAlgorithm, KnownSignatureAlgorithms, KeyVaultKey, KeyWrapAlgorithm, ListPropertiesOfKeysOptions, ListPropertiesOfKeyVersionsOptions, ListDeletedKeysOptions, PageSettings, PagedAsyncIterableIterator, KeyVaultKeyIdentifier, parseKeyVaultKeyIdentifier, PollOperationState, PollerLike, PurgeDeletedKeyOptions, RestoreKeyBackupOptions, RotateKeyOptions, SignOptions, SignResult, UnwrapKeyOptions, UnwrapResult, UpdateKeyPropertiesOptions, VerifyOptions, VerifyDataOptions, VerifyResult, WrapKeyOptions, WrapResult, ReleaseKeyOptions, ReleaseKeyResult, KeyReleasePolicy, KeyExportEncryptionAlgorithm, GetCryptographyClientOptions, KeyRotationPolicyAction, KeyRotationPolicyProperties, KeyRotationPolicy, KeyRotationLifetimeAction, UpdateKeyRotationPolicyOptions, GetKeyRotationPolicyOptions, logger, };
|
||||
/**
|
||||
* The KeyClient provides methods to manage {@link KeyVaultKey} in the
|
||||
* Azure Key Vault. The client supports creating, retrieving, updating,
|
||||
* deleting, purging, backing up, restoring and listing KeyVaultKeys. The
|
||||
* client also supports listing {@link DeletedKey} for a soft-delete enabled Azure Key
|
||||
* Vault.
|
||||
*/
|
||||
export declare class KeyClient {
|
||||
/**
|
||||
* The base URL to the vault
|
||||
*/
|
||||
readonly vaultUrl: string;
|
||||
/**
|
||||
* A reference to the auto-generated Key Vault HTTP client.
|
||||
*/
|
||||
private readonly client;
|
||||
/**
|
||||
* A reference to the credential that was used to construct this client.
|
||||
* Later used to instantiate a {@link CryptographyClient} with the same credential.
|
||||
*/
|
||||
private readonly credential;
|
||||
/**
|
||||
* Creates an instance of KeyClient.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* import { KeyClient } from "@azure/keyvault-keys";
|
||||
* import { DefaultAzureCredential } from "@azure/identity";
|
||||
*
|
||||
* let vaultUrl = `https://<MY KEYVAULT HERE>.vault.azure.net`;
|
||||
* let credentials = new DefaultAzureCredential();
|
||||
*
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* ```
|
||||
* @param vaultUrl - the URL of the Key Vault. It should have this shape: `https://${your-key-vault-name}.vault.azure.net`. You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.
|
||||
* @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \@azure/identity package to create a credential that suits your needs.
|
||||
* @param pipelineOptions - Pipeline options used to configure Key Vault API requests. Omit this parameter to use the default pipeline configuration.
|
||||
*/
|
||||
constructor(vaultUrl: string, credential: TokenCredential, pipelineOptions?: KeyClientOptions);
|
||||
/**
|
||||
* The create key operation can be used to create any key type in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* // Create an elliptic-curve key:
|
||||
* let result = await client.createKey("MyKey", "EC");
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param keyType - The type of the key. One of the following: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
createKey(name: string, keyType: KeyType, options?: CreateKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* The createEcKey method creates a new elliptic curve key in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let result = await client.createEcKey("MyKey", { curve: "P-256" });
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
createEcKey(name: string, options?: CreateEcKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* The createRSAKey method creates a new RSA key in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let result = await client.createRsaKey("MyKey", { keySize: 2048 });
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
createRsaKey(name: string, options?: CreateRsaKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* The createOctKey method creates a new OCT key in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let result = await client.createOctKey("MyKey", { hsm: true });
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
createOctKey(name: string, options?: CreateOctKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* The import key operation may be used to import any key type into an Azure Key Vault. If the
|
||||
* named key already exists, Azure Key Vault creates a new version of the key. This operation
|
||||
* requires the keys/import permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* // Key contents in myKeyContents
|
||||
* let result = await client.importKey("MyKey", myKeyContents);
|
||||
* ```
|
||||
* Imports an externally created key, stores it, and returns key parameters and properties
|
||||
* to the client.
|
||||
* @param name - Name for the imported key.
|
||||
* @param key - The JSON web key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
importKey(name: string, key: JsonWebKey, options?: ImportKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* Gets a {@link CryptographyClient} for the given key.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* // get a cryptography client for a given key
|
||||
* let cryptographyClient = client.getCryptographyClient("MyKey");
|
||||
* ```
|
||||
* @param name - The name of the key used to perform cryptographic operations.
|
||||
* @param version - Optional version of the key used to perform cryptographic operations.
|
||||
* @returns - A {@link CryptographyClient} using the same options, credentials, and http client as this {@link KeyClient}
|
||||
*/
|
||||
getCryptographyClient(keyName: string, options?: GetCryptographyClientOptions): CryptographyClient;
|
||||
/**
|
||||
* The delete operation applies to any key stored in Azure Key Vault. Individual versions
|
||||
* of a key can not be deleted, only all versions of a given key at once.
|
||||
*
|
||||
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the key is deleted.
|
||||
*
|
||||
* This operation requires the keys/delete permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* const client = new KeyClient(url, credentials);
|
||||
* await client.createKey("MyKey", "EC");
|
||||
* const poller = await client.beginDeleteKey("MyKey");
|
||||
*
|
||||
* // Serializing the poller
|
||||
* const serialized = poller.toString();
|
||||
* // A new poller can be created with:
|
||||
* // await client.beginDeleteKey("MyKey", { resumeFrom: serialized });
|
||||
*
|
||||
* // Waiting until it's done
|
||||
* const deletedKey = await poller.pollUntilDone();
|
||||
* console.log(deletedKey);
|
||||
* ```
|
||||
* Deletes a key from a specified key vault.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
beginDeleteKey(name: string, options?: BeginDeleteKeyOptions): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>>;
|
||||
/**
|
||||
* The updateKeyProperties method changes specified properties of an existing stored key. Properties that
|
||||
* are not specified in the request are left unchanged. The value of a key itself cannot be
|
||||
* changed. This operation requires the keys/set permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let keyName = "MyKey";
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let key = await client.getKey(keyName);
|
||||
* let result = await client.updateKeyProperties(keyName, key.properties.version, { enabled: false });
|
||||
* ```
|
||||
* Updates the properties associated with a specified key in a given key vault.
|
||||
* @param name - The name of the key.
|
||||
* @param keyVersion - The version of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
updateKeyProperties(name: string, keyVersion: string, options?: UpdateKeyPropertiesOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* The updateKeyProperties method changes specified properties of the latest version of an existing stored key. Properties that
|
||||
* are not specified in the request are left unchanged. The value of a key itself cannot be
|
||||
* changed. This operation requires the keys/set permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let keyName = "MyKey";
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let key = await client.getKey(keyName);
|
||||
* let result = await client.updateKeyProperties(keyName, { enabled: false });
|
||||
* ```
|
||||
* Updates the properties associated with a specified key in a given key vault.
|
||||
* @param name - The name of the key.
|
||||
* @param keyVersion - The version of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
updateKeyProperties(name: string, options?: UpdateKeyPropertiesOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* Standardizes an overloaded arguments collection for the updateKeyProperties method.
|
||||
*
|
||||
* @param args - The arguments collection.
|
||||
* @returns - The standardized arguments collection.
|
||||
*/
|
||||
private disambiguateUpdateKeyPropertiesArgs;
|
||||
/**
|
||||
* The getKey method gets a specified key and is applicable to any key stored in Azure Key Vault.
|
||||
* This operation requires the keys/get permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let key = await client.getKey("MyKey");
|
||||
* ```
|
||||
* Get a specified key from a given key vault.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getKey(name: string, options?: GetKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* The getDeletedKey method returns the specified deleted key along with its properties.
|
||||
* This operation requires the keys/get permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let key = await client.getDeletedKey("MyDeletedKey");
|
||||
* ```
|
||||
* Gets the specified deleted key.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getDeletedKey(name: string, options?: GetDeletedKeyOptions): Promise<DeletedKey>;
|
||||
/**
|
||||
* The purge deleted key operation removes the key permanently, without the possibility of
|
||||
* recovery. This operation can only be enabled on a soft-delete enabled vault. This operation
|
||||
* requires the keys/purge permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* const client = new KeyClient(url, credentials);
|
||||
* const deletePoller = await client.beginDeleteKey("MyKey")
|
||||
* await deletePoller.pollUntilDone();
|
||||
* await client.purgeDeletedKey("MyKey");
|
||||
* ```
|
||||
* Permanently deletes the specified key.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
purgeDeletedKey(name: string, options?: PurgeDeletedKeyOptions): Promise<void>;
|
||||
/**
|
||||
* Recovers the deleted key in the specified vault. This operation can only be performed on a
|
||||
* soft-delete enabled vault.
|
||||
*
|
||||
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the deleted key is recovered.
|
||||
*
|
||||
* This operation requires the keys/recover permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* const client = new KeyClient(url, credentials);
|
||||
* await client.createKey("MyKey", "EC");
|
||||
* const deletePoller = await client.beginDeleteKey("MyKey");
|
||||
* await deletePoller.pollUntilDone();
|
||||
* const poller = await client.beginRecoverDeletedKey("MyKey");
|
||||
*
|
||||
* // Serializing the poller
|
||||
* const serialized = poller.toString();
|
||||
* // A new poller can be created with:
|
||||
* // await client.beginRecoverDeletedKey("MyKey", { resumeFrom: serialized });
|
||||
*
|
||||
* // Waiting until it's done
|
||||
* const key = await poller.pollUntilDone();
|
||||
* console.log(key);
|
||||
* ```
|
||||
* Recovers the deleted key to the latest version.
|
||||
* @param name - The name of the deleted key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
beginRecoverDeletedKey(name: string, options?: BeginRecoverDeletedKeyOptions): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>>;
|
||||
/**
|
||||
* Requests that a backup of the specified key be downloaded to the client. All versions of the
|
||||
* key will be downloaded. This operation requires the keys/backup permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let backupContents = await client.backupKey("MyKey");
|
||||
* ```
|
||||
* Backs up the specified key.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
backupKey(name: string, options?: BackupKeyOptions): Promise<Uint8Array | undefined>;
|
||||
/**
|
||||
* Restores a backed up key, and all its versions, to a vault. This operation requires the
|
||||
* keys/restore permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let backupContents = await client.backupKey("MyKey");
|
||||
* // ...
|
||||
* let key = await client.restoreKeyBackup(backupContents);
|
||||
* ```
|
||||
* Restores a backed up key to a vault.
|
||||
* @param backup - The backup blob associated with a key bundle.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
restoreKeyBackup(backup: Uint8Array, options?: RestoreKeyBackupOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* Gets the requested number of bytes containing random values from a managed HSM.
|
||||
* This operation requires the managedHsm/rng permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let { bytes } = await client.getRandomBytes(10);
|
||||
* ```
|
||||
* @param count - The number of bytes to generate between 1 and 128 inclusive.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getRandomBytes(count: number, options?: GetRandomBytesOptions): Promise<Uint8Array>;
|
||||
/**
|
||||
* Rotates the key based on the key policy by generating a new version of the key. This operation requires the keys/rotate permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let key = await client.rotateKey("MyKey");
|
||||
* ```
|
||||
*
|
||||
* @param name - The name of the key to rotate.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
rotateKey(name: string, options?: RotateKeyOptions): Promise<KeyVaultKey>;
|
||||
/**
|
||||
* Releases a key from a managed HSM.
|
||||
*
|
||||
* The release key operation is applicable to all key types. The operation requires the key to be marked exportable and the keys/release permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let result = await client.releaseKey("myKey", target)
|
||||
* ```
|
||||
*
|
||||
* @param name - The name of the key.
|
||||
* @param targetAttestationToken - The attestation assertion for the target of the key release.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
releaseKey(name: string, targetAttestationToken: string, options?: ReleaseKeyOptions): Promise<ReleaseKeyResult>;
|
||||
/**
|
||||
* Gets the rotation policy of a Key Vault Key.
|
||||
* By default, all keys have a policy that will notify 30 days before expiry.
|
||||
*
|
||||
* This operation requires the keys/get permission.
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let result = await client.getKeyRotationPolicy("myKey");
|
||||
* ```
|
||||
*
|
||||
* @param keyName - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getKeyRotationPolicy(keyName: string, options?: GetKeyRotationPolicyOptions): Promise<KeyRotationPolicy>;
|
||||
/**
|
||||
* Updates the rotation policy of a Key Vault Key.
|
||||
* This operation requires the keys/update permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* const setPolicy = await client.updateKeyRotationPolicy("MyKey", myPolicy);
|
||||
* ```
|
||||
*
|
||||
* @param keyName - The name of the key.
|
||||
* @param policyProperties - The {@link KeyRotationPolicyProperties} for the policy.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
updateKeyRotationPolicy(keyName: string, policy: KeyRotationPolicyProperties, options?: UpdateKeyRotationPolicyOptions): Promise<KeyRotationPolicy>;
|
||||
/**
|
||||
* Deals with the pagination of {@link listPropertiesOfKeyVersions}.
|
||||
* @param name - The name of the Key Vault Key.
|
||||
* @param continuationState - An object that indicates the position of the paginated request.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
private listPropertiesOfKeyVersionsPage;
|
||||
/**
|
||||
* Deals with the iteration of all the available results of {@link listPropertiesOfKeyVersions}.
|
||||
* @param name - The name of the Key Vault Key.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
private listPropertiesOfKeyVersionsAll;
|
||||
/**
|
||||
* Iterates all versions of the given key in the vault. The full key identifier, properties, and tags are provided
|
||||
* in the response. This operation requires the keys/list permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* for await (const keyProperties of client.listPropertiesOfKeyVersions("MyKey")) {
|
||||
* const key = await client.getKey(keyProperties.name);
|
||||
* console.log("key version: ", key);
|
||||
* }
|
||||
* ```
|
||||
* @param name - Name of the key to fetch versions for
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
listPropertiesOfKeyVersions(name: string, options?: ListPropertiesOfKeyVersionsOptions): PagedAsyncIterableIterator<KeyProperties>;
|
||||
/**
|
||||
* Deals with the pagination of {@link listPropertiesOfKeys}.
|
||||
* @param continuationState - An object that indicates the position of the paginated request.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
private listPropertiesOfKeysPage;
|
||||
/**
|
||||
* Deals with the iteration of all the available results of {@link listPropertiesOfKeys}.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
private listPropertiesOfKeysAll;
|
||||
/**
|
||||
* Iterates the latest version of all keys in the vault. The full key identifier and properties are provided
|
||||
* in the response. No values are returned for the keys. This operations requires the keys/list permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* for await (const keyProperties of client.listPropertiesOfKeys()) {
|
||||
* const key = await client.getKey(keyProperties.name);
|
||||
* console.log("key: ", key);
|
||||
* }
|
||||
* ```
|
||||
* List all keys in the vault
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
listPropertiesOfKeys(options?: ListPropertiesOfKeysOptions): PagedAsyncIterableIterator<KeyProperties>;
|
||||
/**
|
||||
* Deals with the pagination of {@link listDeletedKeys}.
|
||||
* @param continuationState - An object that indicates the position of the paginated request.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
private listDeletedKeysPage;
|
||||
/**
|
||||
* Deals with the iteration of all the available results of {@link listDeletedKeys}.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
private listDeletedKeysAll;
|
||||
/**
|
||||
* Iterates the deleted keys in the vault. The full key identifier and properties are provided
|
||||
* in the response. No values are returned for the keys. This operations requires the keys/list permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* for await (const deletedKey of client.listDeletedKeys()) {
|
||||
* console.log("deleted key: ", deletedKey);
|
||||
* }
|
||||
* ```
|
||||
* List all keys in the vault
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
listDeletedKeys(options?: ListDeletedKeysOptions): PagedAsyncIterableIterator<DeletedKey>;
|
||||
}
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/index.d.ts.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
767
node_modules/@azure/keyvault-keys/dist/browser/index.js
generated
vendored
Normal file
767
node_modules/@azure/keyvault-keys/dist/browser/index.js
generated
vendored
Normal file
@@ -0,0 +1,767 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
import { __asyncGenerator, __asyncValues, __await, __rest } from "tslib";
|
||||
import { logger } from "./log.js";
|
||||
import { KnownDeletionRecoveryLevel, KnownJsonWebKeyType, } from "./generated/models/index.js";
|
||||
import { KeyVaultClient } from "./generated/keyVaultClient.js";
|
||||
import { SDK_VERSION } from "./constants.js";
|
||||
import { keyVaultAuthenticationPolicy } from "@azure/keyvault-common";
|
||||
import { DeleteKeyPoller } from "./lro/delete/poller.js";
|
||||
import { RecoverDeletedKeyPoller } from "./lro/recover/poller.js";
|
||||
import { KnownKeyExportEncryptionAlgorithm, KnownKeyOperations, KnownKeyTypes, LATEST_API_VERSION, } from "./keysModels.js";
|
||||
import { CryptographyClient } from "./cryptographyClient.js";
|
||||
import { KnownEncryptionAlgorithms, KnownKeyCurveNames, KnownSignatureAlgorithms, } from "./cryptographyClientModels.js";
|
||||
import { parseKeyVaultKeyIdentifier } from "./identifier.js";
|
||||
import { getDeletedKeyFromDeletedKeyItem, getKeyFromKeyBundle, getKeyPropertiesFromKeyItem, keyRotationTransformations, } from "./transformations.js";
|
||||
import { tracingClient } from "./tracing.js";
|
||||
export { CryptographyClient, KnownDeletionRecoveryLevel, KnownKeyCurveNames, KnownKeyExportEncryptionAlgorithm, KnownEncryptionAlgorithms, KnownKeyOperations, KnownKeyTypes, KnownSignatureAlgorithms, parseKeyVaultKeyIdentifier, logger, };
|
||||
/**
|
||||
* The KeyClient provides methods to manage {@link KeyVaultKey} in the
|
||||
* Azure Key Vault. The client supports creating, retrieving, updating,
|
||||
* deleting, purging, backing up, restoring and listing KeyVaultKeys. The
|
||||
* client also supports listing {@link DeletedKey} for a soft-delete enabled Azure Key
|
||||
* Vault.
|
||||
*/
|
||||
export class KeyClient {
|
||||
/**
|
||||
* Creates an instance of KeyClient.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* import { KeyClient } from "@azure/keyvault-keys";
|
||||
* import { DefaultAzureCredential } from "@azure/identity";
|
||||
*
|
||||
* let vaultUrl = `https://<MY KEYVAULT HERE>.vault.azure.net`;
|
||||
* let credentials = new DefaultAzureCredential();
|
||||
*
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* ```
|
||||
* @param vaultUrl - the URL of the Key Vault. It should have this shape: `https://${your-key-vault-name}.vault.azure.net`. You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.
|
||||
* @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \@azure/identity package to create a credential that suits your needs.
|
||||
* @param pipelineOptions - Pipeline options used to configure Key Vault API requests. Omit this parameter to use the default pipeline configuration.
|
||||
*/
|
||||
constructor(vaultUrl, credential, pipelineOptions = {}) {
|
||||
this.vaultUrl = vaultUrl;
|
||||
const libInfo = `azsdk-js-keyvault-keys/${SDK_VERSION}`;
|
||||
const userAgentOptions = pipelineOptions.userAgentOptions;
|
||||
pipelineOptions.userAgentOptions = {
|
||||
userAgentPrefix: userAgentOptions && userAgentOptions.userAgentPrefix
|
||||
? `${userAgentOptions.userAgentPrefix} ${libInfo}`
|
||||
: libInfo,
|
||||
};
|
||||
const internalPipelineOptions = Object.assign(Object.assign({}, pipelineOptions), { loggingOptions: {
|
||||
logger: logger.info,
|
||||
allowedHeaderNames: [
|
||||
"x-ms-keyvault-region",
|
||||
"x-ms-keyvault-network-info",
|
||||
"x-ms-keyvault-service-version",
|
||||
],
|
||||
} });
|
||||
this.credential = credential;
|
||||
this.client = new KeyVaultClient(pipelineOptions.serviceVersion || LATEST_API_VERSION, internalPipelineOptions);
|
||||
// The authentication policy must come after the deserialization policy since the deserialization policy
|
||||
// converts 401 responses to an Error, and we don't want to deal with that.
|
||||
this.client.pipeline.addPolicy(keyVaultAuthenticationPolicy(credential, pipelineOptions), {
|
||||
afterPolicies: ["deserializationPolicy"],
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The create key operation can be used to create any key type in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* // Create an elliptic-curve key:
|
||||
* let result = await client.createKey("MyKey", "EC");
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param keyType - The type of the key. One of the following: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
createKey(name, keyType, options) {
|
||||
let unflattenedOptions = {};
|
||||
if (options) {
|
||||
const { enabled, notBefore, expiresOn: expires, exportable } = options, remainingOptions = __rest(options, ["enabled", "notBefore", "expiresOn", "exportable"]);
|
||||
unflattenedOptions = Object.assign(Object.assign({}, remainingOptions), { keyAttributes: {
|
||||
enabled,
|
||||
notBefore,
|
||||
expires,
|
||||
exportable,
|
||||
} });
|
||||
}
|
||||
return tracingClient.withSpan("KeyClient.createKey", unflattenedOptions, async (updatedOptions) => {
|
||||
const response = await this.client.createKey(this.vaultUrl, name, keyType, updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The createEcKey method creates a new elliptic curve key in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let result = await client.createEcKey("MyKey", { curve: "P-256" });
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
async createEcKey(name, options) {
|
||||
const keyType = (options === null || options === void 0 ? void 0 : options.hsm) ? KnownJsonWebKeyType.ECHSM : KnownJsonWebKeyType.EC;
|
||||
return this.createKey(name, keyType, options);
|
||||
}
|
||||
/**
|
||||
* The createRSAKey method creates a new RSA key in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let result = await client.createRsaKey("MyKey", { keySize: 2048 });
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
async createRsaKey(name, options) {
|
||||
const keyType = (options === null || options === void 0 ? void 0 : options.hsm) ? KnownJsonWebKeyType.RSAHSM : KnownJsonWebKeyType.RSA;
|
||||
return this.createKey(name, keyType, options);
|
||||
}
|
||||
/**
|
||||
* The createOctKey method creates a new OCT key in Azure Key Vault. If the named key
|
||||
* already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
|
||||
* permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let result = await client.createOctKey("MyKey", { hsm: true });
|
||||
* ```
|
||||
* Creates a new key, stores it, then returns key parameters and properties to the client.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
async createOctKey(name, options) {
|
||||
const keyType = (options === null || options === void 0 ? void 0 : options.hsm) ? KnownJsonWebKeyType.OctHSM : KnownJsonWebKeyType.Oct;
|
||||
return this.createKey(name, keyType, options);
|
||||
}
|
||||
/**
|
||||
* The import key operation may be used to import any key type into an Azure Key Vault. If the
|
||||
* named key already exists, Azure Key Vault creates a new version of the key. This operation
|
||||
* requires the keys/import permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* // Key contents in myKeyContents
|
||||
* let result = await client.importKey("MyKey", myKeyContents);
|
||||
* ```
|
||||
* Imports an externally created key, stores it, and returns key parameters and properties
|
||||
* to the client.
|
||||
* @param name - Name for the imported key.
|
||||
* @param key - The JSON web key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
importKey(name, key, options) {
|
||||
let unflattenedOptions = {};
|
||||
if (options) {
|
||||
const { enabled, notBefore, exportable, expiresOn: expires, hardwareProtected: hsm } = options, remainingOptions = __rest(options, ["enabled", "notBefore", "exportable", "expiresOn", "hardwareProtected"]);
|
||||
unflattenedOptions = Object.assign(Object.assign({}, remainingOptions), { keyAttributes: {
|
||||
enabled,
|
||||
notBefore,
|
||||
expires,
|
||||
hsm,
|
||||
exportable,
|
||||
} });
|
||||
}
|
||||
return tracingClient.withSpan(`KeyClient.importKey`, unflattenedOptions, async (updatedOptions) => {
|
||||
const response = await this.client.importKey(this.vaultUrl, name, key, updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets a {@link CryptographyClient} for the given key.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* // get a cryptography client for a given key
|
||||
* let cryptographyClient = client.getCryptographyClient("MyKey");
|
||||
* ```
|
||||
* @param name - The name of the key used to perform cryptographic operations.
|
||||
* @param version - Optional version of the key used to perform cryptographic operations.
|
||||
* @returns - A {@link CryptographyClient} using the same options, credentials, and http client as this {@link KeyClient}
|
||||
*/
|
||||
getCryptographyClient(keyName, options) {
|
||||
const keyUrl = new URL(["keys", keyName, options === null || options === void 0 ? void 0 : options.keyVersion].filter(Boolean).join("/"), this.vaultUrl);
|
||||
// The goals of this method are discoverability and performance (by sharing a client and pipeline).
|
||||
// The existing cryptography client does not accept a pipeline as an argument, nor does it expose it.
|
||||
// In order to avoid publicly exposing the pipeline we will pass in the underlying client as an undocumented
|
||||
// property to the constructor so that crypto providers downstream can use it.
|
||||
const constructorOptions = {
|
||||
generatedClient: this.client,
|
||||
};
|
||||
const cryptoClient = new CryptographyClient(keyUrl.toString(), this.credential, constructorOptions);
|
||||
return cryptoClient;
|
||||
}
|
||||
/**
|
||||
* The delete operation applies to any key stored in Azure Key Vault. Individual versions
|
||||
* of a key can not be deleted, only all versions of a given key at once.
|
||||
*
|
||||
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the key is deleted.
|
||||
*
|
||||
* This operation requires the keys/delete permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* const client = new KeyClient(url, credentials);
|
||||
* await client.createKey("MyKey", "EC");
|
||||
* const poller = await client.beginDeleteKey("MyKey");
|
||||
*
|
||||
* // Serializing the poller
|
||||
* const serialized = poller.toString();
|
||||
* // A new poller can be created with:
|
||||
* // await client.beginDeleteKey("MyKey", { resumeFrom: serialized });
|
||||
*
|
||||
* // Waiting until it's done
|
||||
* const deletedKey = await poller.pollUntilDone();
|
||||
* console.log(deletedKey);
|
||||
* ```
|
||||
* Deletes a key from a specified key vault.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
async beginDeleteKey(name, options = {}) {
|
||||
const poller = new DeleteKeyPoller({
|
||||
name,
|
||||
vaultUrl: this.vaultUrl,
|
||||
client: this.client,
|
||||
intervalInMs: options.intervalInMs,
|
||||
resumeFrom: options.resumeFrom,
|
||||
operationOptions: options,
|
||||
});
|
||||
// This will initialize the poller's operation (the deletion of the key).
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
updateKeyProperties(...args) {
|
||||
const [name, keyVersion, options] = this.disambiguateUpdateKeyPropertiesArgs(args);
|
||||
return tracingClient.withSpan(`KeyClient.updateKeyProperties`, options, async (updatedOptions) => {
|
||||
const { enabled, notBefore, expiresOn: expires } = updatedOptions, remainingOptions = __rest(updatedOptions, ["enabled", "notBefore", "expiresOn"]);
|
||||
const unflattenedOptions = Object.assign(Object.assign({}, remainingOptions), { keyAttributes: {
|
||||
enabled,
|
||||
notBefore,
|
||||
expires,
|
||||
} });
|
||||
const response = await this.client.updateKey(this.vaultUrl, name, keyVersion, unflattenedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Standardizes an overloaded arguments collection for the updateKeyProperties method.
|
||||
*
|
||||
* @param args - The arguments collection.
|
||||
* @returns - The standardized arguments collection.
|
||||
*/
|
||||
disambiguateUpdateKeyPropertiesArgs(args) {
|
||||
if (typeof args[1] === "string") {
|
||||
// [name, keyVersion, options?] => [name, keyVersion, options || {}]
|
||||
return [args[0], args[1], args[2] || {}];
|
||||
}
|
||||
else {
|
||||
// [name, options?] => [name , "", options || {}]
|
||||
return [args[0], "", args[1] || {}];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The getKey method gets a specified key and is applicable to any key stored in Azure Key Vault.
|
||||
* This operation requires the keys/get permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let key = await client.getKey("MyKey");
|
||||
* ```
|
||||
* Get a specified key from a given key vault.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getKey(name, options = {}) {
|
||||
return tracingClient.withSpan(`KeyClient.getKey`, options, async (updatedOptions) => {
|
||||
const response = await this.client.getKey(this.vaultUrl, name, options && options.version ? options.version : "", updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The getDeletedKey method returns the specified deleted key along with its properties.
|
||||
* This operation requires the keys/get permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let key = await client.getDeletedKey("MyDeletedKey");
|
||||
* ```
|
||||
* Gets the specified deleted key.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getDeletedKey(name, options = {}) {
|
||||
return tracingClient.withSpan(`KeyClient.getDeletedKey`, options, async (updatedOptions) => {
|
||||
const response = await this.client.getDeletedKey(this.vaultUrl, name, updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The purge deleted key operation removes the key permanently, without the possibility of
|
||||
* recovery. This operation can only be enabled on a soft-delete enabled vault. This operation
|
||||
* requires the keys/purge permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* const client = new KeyClient(url, credentials);
|
||||
* const deletePoller = await client.beginDeleteKey("MyKey")
|
||||
* await deletePoller.pollUntilDone();
|
||||
* await client.purgeDeletedKey("MyKey");
|
||||
* ```
|
||||
* Permanently deletes the specified key.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
purgeDeletedKey(name, options = {}) {
|
||||
return tracingClient.withSpan(`KeyClient.purgeDeletedKey`, options, async (updatedOptions) => {
|
||||
await this.client.purgeDeletedKey(this.vaultUrl, name, updatedOptions);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Recovers the deleted key in the specified vault. This operation can only be performed on a
|
||||
* soft-delete enabled vault.
|
||||
*
|
||||
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the deleted key is recovered.
|
||||
*
|
||||
* This operation requires the keys/recover permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* const client = new KeyClient(url, credentials);
|
||||
* await client.createKey("MyKey", "EC");
|
||||
* const deletePoller = await client.beginDeleteKey("MyKey");
|
||||
* await deletePoller.pollUntilDone();
|
||||
* const poller = await client.beginRecoverDeletedKey("MyKey");
|
||||
*
|
||||
* // Serializing the poller
|
||||
* const serialized = poller.toString();
|
||||
* // A new poller can be created with:
|
||||
* // await client.beginRecoverDeletedKey("MyKey", { resumeFrom: serialized });
|
||||
*
|
||||
* // Waiting until it's done
|
||||
* const key = await poller.pollUntilDone();
|
||||
* console.log(key);
|
||||
* ```
|
||||
* Recovers the deleted key to the latest version.
|
||||
* @param name - The name of the deleted key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
async beginRecoverDeletedKey(name, options = {}) {
|
||||
const poller = new RecoverDeletedKeyPoller({
|
||||
name,
|
||||
vaultUrl: this.vaultUrl,
|
||||
client: this.client,
|
||||
intervalInMs: options.intervalInMs,
|
||||
resumeFrom: options.resumeFrom,
|
||||
operationOptions: options,
|
||||
});
|
||||
// This will initialize the poller's operation (the deletion of the key).
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
/**
|
||||
* Requests that a backup of the specified key be downloaded to the client. All versions of the
|
||||
* key will be downloaded. This operation requires the keys/backup permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let backupContents = await client.backupKey("MyKey");
|
||||
* ```
|
||||
* Backs up the specified key.
|
||||
* @param name - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
backupKey(name, options = {}) {
|
||||
return tracingClient.withSpan(`KeyClient.backupKey`, options, async (updatedOptions) => {
|
||||
const response = await this.client.backupKey(this.vaultUrl, name, updatedOptions);
|
||||
return response.value;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Restores a backed up key, and all its versions, to a vault. This operation requires the
|
||||
* keys/restore permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* let backupContents = await client.backupKey("MyKey");
|
||||
* // ...
|
||||
* let key = await client.restoreKeyBackup(backupContents);
|
||||
* ```
|
||||
* Restores a backed up key to a vault.
|
||||
* @param backup - The backup blob associated with a key bundle.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
async restoreKeyBackup(backup, options = {}) {
|
||||
return tracingClient.withSpan(`KeyClient.restoreKeyBackup`, options, async (updatedOptions) => {
|
||||
const response = await this.client.restoreKey(this.vaultUrl, backup, updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets the requested number of bytes containing random values from a managed HSM.
|
||||
* This operation requires the managedHsm/rng permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let { bytes } = await client.getRandomBytes(10);
|
||||
* ```
|
||||
* @param count - The number of bytes to generate between 1 and 128 inclusive.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getRandomBytes(count, options = {}) {
|
||||
return tracingClient.withSpan("KeyClient.getRandomBytes", options, async (updatedOptions) => {
|
||||
const response = await this.client.getRandomBytes(this.vaultUrl, count, updatedOptions);
|
||||
return response.value;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Rotates the key based on the key policy by generating a new version of the key. This operation requires the keys/rotate permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let key = await client.rotateKey("MyKey");
|
||||
* ```
|
||||
*
|
||||
* @param name - The name of the key to rotate.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
rotateKey(name, options = {}) {
|
||||
return tracingClient.withSpan("KeyClient.rotateKey", options, async (updatedOptions) => {
|
||||
const key = await this.client.rotateKey(this.vaultUrl, name, updatedOptions);
|
||||
return getKeyFromKeyBundle(key);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Releases a key from a managed HSM.
|
||||
*
|
||||
* The release key operation is applicable to all key types. The operation requires the key to be marked exportable and the keys/release permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let result = await client.releaseKey("myKey", target)
|
||||
* ```
|
||||
*
|
||||
* @param name - The name of the key.
|
||||
* @param targetAttestationToken - The attestation assertion for the target of the key release.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
releaseKey(name, targetAttestationToken, options = {}) {
|
||||
return tracingClient.withSpan("KeyClient.releaseKey", options, async (updatedOptions) => {
|
||||
const { nonce, algorithm } = updatedOptions, rest = __rest(updatedOptions, ["nonce", "algorithm"]);
|
||||
const result = await this.client.release(this.vaultUrl, name, (options === null || options === void 0 ? void 0 : options.version) || "", targetAttestationToken, Object.assign({ enc: algorithm, nonce }, rest));
|
||||
return { value: result.value };
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Gets the rotation policy of a Key Vault Key.
|
||||
* By default, all keys have a policy that will notify 30 days before expiry.
|
||||
*
|
||||
* This operation requires the keys/get permission.
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* let result = await client.getKeyRotationPolicy("myKey");
|
||||
* ```
|
||||
*
|
||||
* @param keyName - The name of the key.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
getKeyRotationPolicy(keyName, options = {}) {
|
||||
return tracingClient.withSpan("KeyClient.getKeyRotationPolicy", options, async () => {
|
||||
const policy = await this.client.getKeyRotationPolicy(this.vaultUrl, keyName);
|
||||
return keyRotationTransformations.generatedToPublic(policy);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Updates the rotation policy of a Key Vault Key.
|
||||
* This operation requires the keys/update permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(vaultUrl, credentials);
|
||||
* const setPolicy = await client.updateKeyRotationPolicy("MyKey", myPolicy);
|
||||
* ```
|
||||
*
|
||||
* @param keyName - The name of the key.
|
||||
* @param policyProperties - The {@link KeyRotationPolicyProperties} for the policy.
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
updateKeyRotationPolicy(keyName, policy, options = {}) {
|
||||
return tracingClient.withSpan("KeyClient.updateKeyRotationPolicy", options, async (updatedOptions) => {
|
||||
const result = await this.client.updateKeyRotationPolicy(this.vaultUrl, keyName, keyRotationTransformations.propertiesToGenerated(policy), updatedOptions);
|
||||
return keyRotationTransformations.generatedToPublic(result);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Deals with the pagination of {@link listPropertiesOfKeyVersions}.
|
||||
* @param name - The name of the Key Vault Key.
|
||||
* @param continuationState - An object that indicates the position of the paginated request.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
listPropertiesOfKeyVersionsPage(name, continuationState, options) {
|
||||
return __asyncGenerator(this, arguments, function* listPropertiesOfKeyVersionsPage_1() {
|
||||
if (continuationState.continuationToken == null) {
|
||||
const optionsComplete = Object.assign({ maxresults: continuationState.maxPageSize }, options);
|
||||
const currentSetResponse = yield __await(tracingClient.withSpan("KeyClient.listPropertiesOfKeyVersionsPage", optionsComplete, async (updatedOptions) => this.client.getKeyVersions(this.vaultUrl, name, updatedOptions)));
|
||||
continuationState.continuationToken = currentSetResponse.nextLink;
|
||||
if (currentSetResponse.value) {
|
||||
yield yield __await(currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this));
|
||||
}
|
||||
}
|
||||
while (continuationState.continuationToken) {
|
||||
const currentSetResponse = yield __await(tracingClient.withSpan("KeyClient.listPropertiesOfKeyVersionsPage", options || {}, async (updatedOptions) => this.client.getKeyVersionsNext(this.vaultUrl, name, continuationState.continuationToken, updatedOptions)));
|
||||
continuationState.continuationToken = currentSetResponse.nextLink;
|
||||
if (currentSetResponse.value) {
|
||||
yield yield __await(currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this));
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Deals with the iteration of all the available results of {@link listPropertiesOfKeyVersions}.
|
||||
* @param name - The name of the Key Vault Key.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
listPropertiesOfKeyVersionsAll(name, options) {
|
||||
return __asyncGenerator(this, arguments, function* listPropertiesOfKeyVersionsAll_1() {
|
||||
var _a, e_1, _b, _c;
|
||||
const f = {};
|
||||
try {
|
||||
for (var _d = true, _e = __asyncValues(this.listPropertiesOfKeyVersionsPage(name, f, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
||||
_c = _f.value;
|
||||
_d = false;
|
||||
const page = _c;
|
||||
for (const item of page) {
|
||||
yield yield __await(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Iterates all versions of the given key in the vault. The full key identifier, properties, and tags are provided
|
||||
* in the response. This operation requires the keys/list permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* for await (const keyProperties of client.listPropertiesOfKeyVersions("MyKey")) {
|
||||
* const key = await client.getKey(keyProperties.name);
|
||||
* console.log("key version: ", key);
|
||||
* }
|
||||
* ```
|
||||
* @param name - Name of the key to fetch versions for
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
listPropertiesOfKeyVersions(name, options = {}) {
|
||||
const iter = this.listPropertiesOfKeyVersionsAll(name, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings = {}) => this.listPropertiesOfKeyVersionsPage(name, settings, options),
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Deals with the pagination of {@link listPropertiesOfKeys}.
|
||||
* @param continuationState - An object that indicates the position of the paginated request.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
listPropertiesOfKeysPage(continuationState, options) {
|
||||
return __asyncGenerator(this, arguments, function* listPropertiesOfKeysPage_1() {
|
||||
if (continuationState.continuationToken == null) {
|
||||
const optionsComplete = Object.assign({ maxresults: continuationState.maxPageSize }, options);
|
||||
const currentSetResponse = yield __await(tracingClient.withSpan("KeyClient.listPropertiesOfKeysPage", optionsComplete, async (updatedOptions) => this.client.getKeys(this.vaultUrl, updatedOptions)));
|
||||
continuationState.continuationToken = currentSetResponse.nextLink;
|
||||
if (currentSetResponse.value) {
|
||||
yield yield __await(currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this));
|
||||
}
|
||||
}
|
||||
while (continuationState.continuationToken) {
|
||||
const currentSetResponse = yield __await(tracingClient.withSpan("KeyClient.listPropertiesOfKeysPage", options || {}, async (updatedOptions) => this.client.getKeysNext(this.vaultUrl, continuationState.continuationToken, updatedOptions)));
|
||||
continuationState.continuationToken = currentSetResponse.nextLink;
|
||||
if (currentSetResponse.value) {
|
||||
yield yield __await(currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this));
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Deals with the iteration of all the available results of {@link listPropertiesOfKeys}.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
listPropertiesOfKeysAll(options) {
|
||||
return __asyncGenerator(this, arguments, function* listPropertiesOfKeysAll_1() {
|
||||
var _a, e_2, _b, _c;
|
||||
const f = {};
|
||||
try {
|
||||
for (var _d = true, _e = __asyncValues(this.listPropertiesOfKeysPage(f, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
||||
_c = _f.value;
|
||||
_d = false;
|
||||
const page = _c;
|
||||
for (const item of page) {
|
||||
yield yield __await(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Iterates the latest version of all keys in the vault. The full key identifier and properties are provided
|
||||
* in the response. No values are returned for the keys. This operations requires the keys/list permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* for await (const keyProperties of client.listPropertiesOfKeys()) {
|
||||
* const key = await client.getKey(keyProperties.name);
|
||||
* console.log("key: ", key);
|
||||
* }
|
||||
* ```
|
||||
* List all keys in the vault
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
listPropertiesOfKeys(options = {}) {
|
||||
const iter = this.listPropertiesOfKeysAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings = {}) => this.listPropertiesOfKeysPage(settings, options),
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Deals with the pagination of {@link listDeletedKeys}.
|
||||
* @param continuationState - An object that indicates the position of the paginated request.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
listDeletedKeysPage(continuationState, options) {
|
||||
return __asyncGenerator(this, arguments, function* listDeletedKeysPage_1() {
|
||||
if (continuationState.continuationToken == null) {
|
||||
const optionsComplete = Object.assign({ maxresults: continuationState.maxPageSize }, options);
|
||||
const currentSetResponse = yield __await(tracingClient.withSpan("KeyClient.listDeletedKeysPage", optionsComplete, async (updatedOptions) => this.client.getDeletedKeys(this.vaultUrl, updatedOptions)));
|
||||
continuationState.continuationToken = currentSetResponse.nextLink;
|
||||
if (currentSetResponse.value) {
|
||||
yield yield __await(currentSetResponse.value.map(getDeletedKeyFromDeletedKeyItem, this));
|
||||
}
|
||||
}
|
||||
while (continuationState.continuationToken) {
|
||||
const currentSetResponse = yield __await(tracingClient.withSpan("KeyClient.listDeletedKeysPage", options || {}, async (updatedOptions) => this.client.getDeletedKeysNext(this.vaultUrl, continuationState.continuationToken, updatedOptions)));
|
||||
continuationState.continuationToken = currentSetResponse.nextLink;
|
||||
if (currentSetResponse.value) {
|
||||
yield yield __await(currentSetResponse.value.map(getDeletedKeyFromDeletedKeyItem, this));
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Deals with the iteration of all the available results of {@link listDeletedKeys}.
|
||||
* @param options - Common options for the iterative endpoints.
|
||||
*/
|
||||
listDeletedKeysAll(options) {
|
||||
return __asyncGenerator(this, arguments, function* listDeletedKeysAll_1() {
|
||||
var _a, e_3, _b, _c;
|
||||
const f = {};
|
||||
try {
|
||||
for (var _d = true, _e = __asyncValues(this.listDeletedKeysPage(f, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
||||
_c = _f.value;
|
||||
_d = false;
|
||||
const page = _c;
|
||||
for (const item of page) {
|
||||
yield yield __await(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Iterates the deleted keys in the vault. The full key identifier and properties are provided
|
||||
* in the response. No values are returned for the keys. This operations requires the keys/list permission.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* let client = new KeyClient(url, credentials);
|
||||
* for await (const deletedKey of client.listDeletedKeys()) {
|
||||
* console.log("deleted key: ", deletedKey);
|
||||
* }
|
||||
* ```
|
||||
* List all keys in the vault
|
||||
* @param options - The optional parameters.
|
||||
*/
|
||||
listDeletedKeys(options = {}) {
|
||||
const iter = this.listDeletedKeysAll(options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: (settings = {}) => this.listDeletedKeysPage(settings, options),
|
||||
};
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/index.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
669
node_modules/@azure/keyvault-keys/dist/browser/keysModels.d.ts
generated
vendored
Normal file
669
node_modules/@azure/keyvault-keys/dist/browser/keysModels.d.ts
generated
vendored
Normal file
@@ -0,0 +1,669 @@
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import { ExtendedCommonClientOptions } from "@azure/core-http-compat";
|
||||
import { DeletionRecoveryLevel, JsonWebKeyOperation as KeyOperation, JsonWebKeyType as KeyType, KnownJsonWebKeyType as KnownKeyTypes } from "./generated/models/index.js";
|
||||
import { KeyCurveName } from "./cryptographyClientModels.js";
|
||||
export { KeyType, KnownKeyTypes, KeyOperation };
|
||||
/**
|
||||
* The latest supported Key Vault service API version
|
||||
*/
|
||||
export declare const LATEST_API_VERSION = "7.5";
|
||||
/**
|
||||
* The optional parameters accepted by the KeyVault's KeyClient
|
||||
*/
|
||||
export interface KeyClientOptions extends ExtendedCommonClientOptions {
|
||||
/**
|
||||
* The version of the KeyVault's service API to make calls against.
|
||||
*/
|
||||
serviceVersion?: string;
|
||||
/**
|
||||
* Whether to disable verification that the authentication challenge resource matches the Key Vault or Managed HSM domain.
|
||||
* Defaults to false.
|
||||
*/
|
||||
disableChallengeResourceVerification?: boolean;
|
||||
}
|
||||
/**
|
||||
* The optional parameters accepted by the KeyVault's CryptographyClient
|
||||
*/
|
||||
export interface CryptographyClientOptions extends KeyClientOptions {
|
||||
}
|
||||
/**
|
||||
* As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18
|
||||
*/
|
||||
export interface JsonWebKey {
|
||||
/**
|
||||
* Key identifier.
|
||||
*/
|
||||
kid?: string;
|
||||
/**
|
||||
* JsonWebKey Key Type (kty), as defined in
|
||||
* https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible values include:
|
||||
* 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct', "oct-HSM"
|
||||
*/
|
||||
kty?: KeyType;
|
||||
/**
|
||||
* Json web key operations. For more
|
||||
* information on possible key operations, see KeyOperation.
|
||||
*/
|
||||
keyOps?: KeyOperation[];
|
||||
/**
|
||||
* RSA modulus.
|
||||
*/
|
||||
n?: Uint8Array;
|
||||
/**
|
||||
* RSA public exponent.
|
||||
*/
|
||||
e?: Uint8Array;
|
||||
/**
|
||||
* RSA private exponent, or the D component of an EC private key.
|
||||
*/
|
||||
d?: Uint8Array;
|
||||
/**
|
||||
* RSA private key parameter.
|
||||
*/
|
||||
dp?: Uint8Array;
|
||||
/**
|
||||
* RSA private key parameter.
|
||||
*/
|
||||
dq?: Uint8Array;
|
||||
/**
|
||||
* RSA private key parameter.
|
||||
*/
|
||||
qi?: Uint8Array;
|
||||
/**
|
||||
* RSA secret prime.
|
||||
*/
|
||||
p?: Uint8Array;
|
||||
/**
|
||||
* RSA secret prime, with `p < q`.
|
||||
*/
|
||||
q?: Uint8Array;
|
||||
/**
|
||||
* Symmetric key.
|
||||
*/
|
||||
k?: Uint8Array;
|
||||
/**
|
||||
* HSM Token, used with 'Bring Your Own Key'.
|
||||
*/
|
||||
t?: Uint8Array;
|
||||
/**
|
||||
* Elliptic curve name. For valid values, see KeyCurveName. Possible values include:
|
||||
* 'P-256', 'P-384', 'P-521', 'P-256K'
|
||||
*/
|
||||
crv?: KeyCurveName;
|
||||
/**
|
||||
* X component of an EC public key.
|
||||
*/
|
||||
x?: Uint8Array;
|
||||
/**
|
||||
* Y component of an EC public key.
|
||||
*/
|
||||
y?: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* An interface representing a Key Vault Key, with its name, value and {@link KeyProperties}.
|
||||
*/
|
||||
export interface KeyVaultKey {
|
||||
/**
|
||||
* The key value.
|
||||
*/
|
||||
key?: JsonWebKey;
|
||||
/**
|
||||
* The name of the key.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Key identifier.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* JsonWebKey Key Type (kty), as defined in
|
||||
* https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible values include:
|
||||
* 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct', "oct-HSM"
|
||||
*/
|
||||
keyType?: KeyType;
|
||||
/**
|
||||
* Operations allowed on this key
|
||||
*/
|
||||
keyOperations?: KeyOperation[];
|
||||
/**
|
||||
* The properties of the key.
|
||||
*/
|
||||
properties: KeyProperties;
|
||||
}
|
||||
/**
|
||||
* An interface representing the Properties of {@link KeyVaultKey}
|
||||
*/
|
||||
export interface KeyProperties {
|
||||
/**
|
||||
* Key identifier.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The name of the key.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The vault URI.
|
||||
*/
|
||||
vaultUrl: string;
|
||||
/**
|
||||
* The version of the key. May be undefined.
|
||||
*/
|
||||
version?: string;
|
||||
/**
|
||||
* Determines whether the object is enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Not before date in UTC.
|
||||
*/
|
||||
notBefore?: Date;
|
||||
/**
|
||||
* Expiry date in UTC.
|
||||
*/
|
||||
expiresOn?: Date;
|
||||
/**
|
||||
* Application specific metadata in the form of key-value pairs.
|
||||
*/
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/**
|
||||
* Creation time in UTC.
|
||||
* **NOTE: This property will not be serialized. It can only be populated by
|
||||
* the server.**
|
||||
*/
|
||||
readonly createdOn?: Date;
|
||||
/**
|
||||
* Last updated time in UTC.
|
||||
* **NOTE: This property will not be serialized. It can only be populated by
|
||||
* the server.**
|
||||
*/
|
||||
readonly updatedOn?: Date;
|
||||
/**
|
||||
* Reflects the deletion recovery level currently in effect for keys in the current vault.
|
||||
* If it contains 'Purgeable' the key can be permanently deleted by a privileged
|
||||
* user; otherwise, only the system can purge the key, at the end of the
|
||||
* retention interval. Possible values include: 'Purgeable',
|
||||
* 'Recoverable+Purgeable', 'Recoverable',
|
||||
* 'Recoverable+ProtectedSubscription'
|
||||
* **NOTE: This property will not be serialized. It can only be populated by
|
||||
* the server.**
|
||||
*/
|
||||
readonly recoveryLevel?: DeletionRecoveryLevel;
|
||||
/**
|
||||
* The retention dates of the softDelete data.
|
||||
* The value should be `>=7` and `<=90` when softDelete enabled.
|
||||
* **NOTE: This property will not be serialized. It can only be populated by the server.**
|
||||
*/
|
||||
recoverableDays?: number;
|
||||
/**
|
||||
* True if the secret's lifetime is managed by
|
||||
* key vault. If this is a secret backing a certificate, then managed will be
|
||||
* true.
|
||||
* **NOTE: This property will not be serialized. It can only be populated by
|
||||
* the server.**
|
||||
*/
|
||||
readonly managed?: boolean;
|
||||
/**
|
||||
* Indicates whether the private key can be exported.
|
||||
*/
|
||||
exportable?: boolean;
|
||||
/**
|
||||
* A {@link KeyReleasePolicy} object specifying the rules under which the key can be exported.
|
||||
*/
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
/**
|
||||
* The underlying HSM Platform.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly hsmPlatform?: string;
|
||||
}
|
||||
/**
|
||||
* An interface representing a deleted Key Vault Key.
|
||||
*/
|
||||
export interface DeletedKey {
|
||||
/**
|
||||
* The key value.
|
||||
*/
|
||||
key?: JsonWebKey;
|
||||
/**
|
||||
* The name of the key.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Key identifier.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* JsonWebKey Key Type (kty), as defined in
|
||||
* https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. Possible values include:
|
||||
* 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct', "oct-HSM"
|
||||
*/
|
||||
keyType?: KeyType;
|
||||
/**
|
||||
* Operations allowed on this key
|
||||
*/
|
||||
keyOperations?: KeyOperation[];
|
||||
/**
|
||||
* The properties of the key.
|
||||
*/
|
||||
properties: KeyProperties & {
|
||||
/**
|
||||
* The url of the recovery object, used to
|
||||
* identify and recover the deleted key.
|
||||
*/
|
||||
readonly recoveryId?: string;
|
||||
/**
|
||||
* The time when the key is scheduled to be purged, in UTC
|
||||
* **NOTE: This property will not be serialized. It can only be populated by
|
||||
* the server.**
|
||||
*/
|
||||
readonly scheduledPurgeDate?: Date;
|
||||
/**
|
||||
* The time when the key was deleted, in UTC
|
||||
* **NOTE: This property will not be serialized. It can only be populated by
|
||||
* the server.**
|
||||
*/
|
||||
deletedOn?: Date;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* The policy rules under which a key can be exported.
|
||||
*/
|
||||
export interface KeyReleasePolicy {
|
||||
/**
|
||||
* Content type and version of key release policy.
|
||||
*
|
||||
* Defaults to "application/json; charset=utf-8" if omitted.
|
||||
*/
|
||||
contentType?: string;
|
||||
/**
|
||||
* The policy rules under which the key can be released. Encoded based on the {@link KeyReleasePolicy.contentType}.
|
||||
*
|
||||
* For more information regarding the release policy grammar for Azure Key Vault, please refer to:
|
||||
* - https://aka.ms/policygrammarkeys for Azure Key Vault release policy grammar.
|
||||
* - https://aka.ms/policygrammarmhsm for Azure Managed HSM release policy grammar.
|
||||
*/
|
||||
encodedPolicy?: Uint8Array;
|
||||
/** Marks a release policy as immutable. An immutable release policy cannot be changed or updated after being marked immutable. */
|
||||
immutable?: boolean;
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link createKey}
|
||||
*/
|
||||
export interface CreateKeyOptions extends coreClient.OperationOptions {
|
||||
/**
|
||||
* Application specific metadata in the form of key-value pairs.
|
||||
*/
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/**
|
||||
* Json web key operations. For more
|
||||
* information on possible key operations, see KeyOperation.
|
||||
*/
|
||||
keyOps?: KeyOperation[];
|
||||
/**
|
||||
* Determines whether the object is enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Not before date in UTC.
|
||||
*/
|
||||
notBefore?: Date;
|
||||
/**
|
||||
* Expiry date in UTC.
|
||||
*/
|
||||
readonly expiresOn?: Date;
|
||||
/**
|
||||
* The key size in bits. For example: 2048, 3072, or 4096 for RSA.
|
||||
*/
|
||||
keySize?: number;
|
||||
/**
|
||||
* Elliptic curve name. For valid values, see KeyCurveName.
|
||||
* Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K'
|
||||
*/
|
||||
curve?: KeyCurveName;
|
||||
/**
|
||||
* Whether to import as a hardware key (HSM) or software key.
|
||||
*/
|
||||
hsm?: boolean;
|
||||
/**
|
||||
* Indicates whether the private key can be exported.
|
||||
*/
|
||||
exportable?: boolean;
|
||||
/**
|
||||
* A {@link KeyReleasePolicy} object specifying the rules under which the key can be exported.
|
||||
*/
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link beginDeleteKey} and {@link beginRecoverDeletedKey}
|
||||
*/
|
||||
export interface KeyPollerOptions extends coreClient.OperationOptions {
|
||||
/**
|
||||
* Time between each polling
|
||||
*/
|
||||
intervalInMs?: number;
|
||||
/**
|
||||
* A serialized poller, used to resume an existing operation
|
||||
*/
|
||||
resumeFrom?: string;
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link beginDeleteKey}
|
||||
*/
|
||||
export interface BeginDeleteKeyOptions extends KeyPollerOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link beginRecoverDeletedKey}
|
||||
*/
|
||||
export interface BeginRecoverDeletedKeyOptions extends KeyPollerOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link createEcKey}
|
||||
*/
|
||||
export interface CreateEcKeyOptions extends CreateKeyOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link createRsaKey}
|
||||
*/
|
||||
export interface CreateRsaKeyOptions extends CreateKeyOptions {
|
||||
/** The public exponent for a RSA key. */
|
||||
publicExponent?: number;
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link createOctKey}
|
||||
*/
|
||||
export interface CreateOctKeyOptions extends CreateKeyOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing the optional parameters that can be
|
||||
* passed to {@link importKey}
|
||||
*/
|
||||
export interface ImportKeyOptions extends coreClient.OperationOptions {
|
||||
/**
|
||||
* Application specific metadata in the form of key-value pairs.
|
||||
*/
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/**
|
||||
* Whether to import as a hardware key (HSM) or software key.
|
||||
*/
|
||||
hardwareProtected?: boolean;
|
||||
/**
|
||||
* Determines whether the object is enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Not before date in UTC.
|
||||
*/
|
||||
notBefore?: Date;
|
||||
/**
|
||||
* Expiry date in UTC.
|
||||
*/
|
||||
expiresOn?: Date;
|
||||
/**
|
||||
* Indicates whether the private key can be exported.
|
||||
*/
|
||||
exportable?: boolean;
|
||||
/**
|
||||
* A {@link KeyReleasePolicy} object specifying the rules under which the key can be exported.
|
||||
*/
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/**
|
||||
* Options for {@link updateKeyProperties}.
|
||||
*/
|
||||
export interface UpdateKeyPropertiesOptions extends coreClient.OperationOptions {
|
||||
/**
|
||||
* Json web key operations. For more
|
||||
* information on possible key operations, see KeyOperation.
|
||||
*/
|
||||
keyOps?: KeyOperation[];
|
||||
/**
|
||||
* Determines whether the object is enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Not before date in UTC.
|
||||
*/
|
||||
notBefore?: Date;
|
||||
/**
|
||||
* Expiry date in UTC.
|
||||
*/
|
||||
expiresOn?: Date;
|
||||
/**
|
||||
* Application specific metadata in the form of key-value pairs.
|
||||
*/
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
/**
|
||||
* A {@link KeyReleasePolicy} object specifying the rules under which the key can be exported.
|
||||
* Only valid if the key is marked exportable, which cannot be changed after key creation.
|
||||
*/
|
||||
releasePolicy?: KeyReleasePolicy;
|
||||
}
|
||||
/**
|
||||
* Options for {@link getKey}.
|
||||
*/
|
||||
export interface GetKeyOptions extends coreClient.OperationOptions {
|
||||
/**
|
||||
* The version of the secret to retrieve. If not
|
||||
* specified the latest version of the secret will be retrieved.
|
||||
*/
|
||||
version?: string;
|
||||
}
|
||||
/**
|
||||
* An interface representing optional parameters for KeyClient paged operations passed to {@link listKeys}.
|
||||
*/
|
||||
export interface ListKeysOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing optional parameters for KeyClient paged operations passed to {@link listPropertiesOfKeys}.
|
||||
*/
|
||||
export interface ListPropertiesOfKeysOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing optional parameters for KeyClient paged operations passed to {@link listPropertiesOfKeyVersions}.
|
||||
*/
|
||||
export interface ListPropertiesOfKeyVersionsOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing optional parameters for KeyClient paged operations passed to {@link listDeletedKeys}.
|
||||
*/
|
||||
export interface ListDeletedKeysOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link getDeletedKey}.
|
||||
*/
|
||||
export interface GetDeletedKeyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link purgeDeletedKey}.
|
||||
*/
|
||||
export interface PurgeDeletedKeyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
* Options for {@link recoverDeletedKey}.
|
||||
*/
|
||||
export interface RecoverDeletedKeyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
* Options for {@link deleteKey}.
|
||||
*/
|
||||
export interface DeleteKeyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link backupKey}.
|
||||
*/
|
||||
export interface BackupKeyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link restoreKeyBackup}.
|
||||
*/
|
||||
export interface RestoreKeyBackupOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* An interface representing the options of the cryptography API methods, go to the {@link CryptographyClient} for more information.
|
||||
*/
|
||||
export interface CryptographyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link KeyClient.getRandomBytes}
|
||||
*/
|
||||
export interface GetRandomBytesOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link KeyClient.releaseKey}
|
||||
*/
|
||||
export interface ReleaseKeyOptions extends coreClient.OperationOptions {
|
||||
/** A client provided nonce for freshness. */
|
||||
nonce?: string;
|
||||
/** The {@link KeyExportEncryptionAlgorithm} to for protecting the exported key material. */
|
||||
algorithm?: KeyExportEncryptionAlgorithm;
|
||||
/**
|
||||
* The version of the key to release. Defaults to the latest version of the key if omitted.
|
||||
*/
|
||||
version?: string;
|
||||
}
|
||||
/**
|
||||
* Result of the {@link KeyClient.releaseKey} operation.
|
||||
*/
|
||||
export interface ReleaseKeyResult {
|
||||
/** A signed token containing the released key. */
|
||||
value: string;
|
||||
}
|
||||
/** Known values of {@link KeyOperation} that the service accepts. */
|
||||
export declare enum KnownKeyOperations {
|
||||
/** Key operation - encrypt */
|
||||
Encrypt = "encrypt",
|
||||
/** Key operation - decrypt */
|
||||
Decrypt = "decrypt",
|
||||
/** Key operation - sign */
|
||||
Sign = "sign",
|
||||
/** Key operation - verify */
|
||||
Verify = "verify",
|
||||
/** Key operation - wrapKey */
|
||||
WrapKey = "wrapKey",
|
||||
/** Key operation - unwrapKey */
|
||||
UnwrapKey = "unwrapKey",
|
||||
/** Key operation - import */
|
||||
Import = "import"
|
||||
}
|
||||
/** Known values of {@link KeyExportEncryptionAlgorithm} that the service accepts. */
|
||||
export declare enum KnownKeyExportEncryptionAlgorithm {
|
||||
/** CKM_RSA_AES_KEY_WRAP Key Export Encryption Algorithm */
|
||||
CkmRsaAesKeyWrap = "CKM_RSA_AES_KEY_WRAP",
|
||||
/** RSA_AES_KEY_WRAP_256 Key Export Encryption Algorithm */
|
||||
RsaAesKeyWrap256 = "RSA_AES_KEY_WRAP_256",
|
||||
/** RSA_AES_KEY_WRAP_384 Key Export Encryption Algorithm */
|
||||
RsaAesKeyWrap384 = "RSA_AES_KEY_WRAP_384"
|
||||
}
|
||||
/**
|
||||
* Defines values for KeyEncryptionAlgorithm.
|
||||
* {@link KnownKeyExportEncryptionAlgorithm} can be used interchangeably with KeyEncryptionAlgorithm,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **CKM_RSA_AES_KEY_WRAP** \
|
||||
* **RSA_AES_KEY_WRAP_256** \
|
||||
* **RSA_AES_KEY_WRAP_384**
|
||||
*/
|
||||
export type KeyExportEncryptionAlgorithm = string;
|
||||
/**
|
||||
* Options for {@link KeyClient.getCryptographyClient}.
|
||||
*/
|
||||
export interface GetCryptographyClientOptions {
|
||||
/**
|
||||
* The version of the key to use for cryptographic operations.
|
||||
*
|
||||
* When undefined, the latest version of the key will be used.
|
||||
*/
|
||||
keyVersion?: string;
|
||||
}
|
||||
/**
|
||||
* Options for {@link KeyClient.rotateKey}
|
||||
*/
|
||||
export interface RotateKeyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* The properties of a key rotation policy that the client can set for a given key.
|
||||
*
|
||||
* You may also reset the key rotation policy to its default values by setting lifetimeActions to an empty array.
|
||||
*/
|
||||
export interface KeyRotationPolicyProperties {
|
||||
/**
|
||||
* Optional key expiration period used to define the duration after which a newly rotated key will expire, defined as an ISO 8601 duration.
|
||||
*/
|
||||
expiresIn?: string;
|
||||
/**
|
||||
* Actions that will be performed by Key Vault over the lifetime of a key.
|
||||
*
|
||||
* You may also pass an empty array to restore to its default values.
|
||||
*/
|
||||
lifetimeActions?: KeyRotationLifetimeAction[];
|
||||
}
|
||||
/**
|
||||
* The complete key rotation policy that belongs to a key.
|
||||
*/
|
||||
export interface KeyRotationPolicy extends KeyRotationPolicyProperties {
|
||||
/**
|
||||
* The identifier of the Key Rotation Policy.
|
||||
* May be undefined if a policy has not been explicitly set.
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The created time in UTC.
|
||||
* May be undefined if a policy has not been explicitly set.
|
||||
*/
|
||||
readonly createdOn?: Date;
|
||||
/**
|
||||
* The last updated time in UTC.
|
||||
* May be undefined if a policy has not been explicitly set.
|
||||
*/
|
||||
readonly updatedOn?: Date;
|
||||
}
|
||||
/**
|
||||
* An action and its corresponding trigger that will be performed by Key Vault over the lifetime of a key.
|
||||
*/
|
||||
export interface KeyRotationLifetimeAction {
|
||||
/**
|
||||
* Time after creation to attempt the specified action, defined as an ISO 8601 duration.
|
||||
*/
|
||||
timeAfterCreate?: string;
|
||||
/**
|
||||
* Time before expiry to attempt the specified action, defined as an ISO 8601 duration.
|
||||
*/
|
||||
timeBeforeExpiry?: string;
|
||||
/**
|
||||
* The action that will be executed.
|
||||
*/
|
||||
action: KeyRotationPolicyAction;
|
||||
}
|
||||
/**
|
||||
* The action that will be executed.
|
||||
*/
|
||||
export type KeyRotationPolicyAction = "Rotate" | "Notify";
|
||||
/**
|
||||
* Options for {@link KeyClient.updateKeyRotationPolicy}
|
||||
*/
|
||||
export interface UpdateKeyRotationPolicyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
/**
|
||||
* Options for {@link KeyClient.getRotationPolicy}
|
||||
*/
|
||||
export interface GetKeyRotationPolicyOptions extends coreClient.OperationOptions {
|
||||
}
|
||||
//# sourceMappingURL=keysModels.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/keysModels.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/keysModels.d.ts.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
37
node_modules/@azure/keyvault-keys/dist/browser/keysModels.js
generated
vendored
Normal file
37
node_modules/@azure/keyvault-keys/dist/browser/keysModels.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { KnownJsonWebKeyType as KnownKeyTypes, } from "./generated/models/index.js";
|
||||
export { KnownKeyTypes };
|
||||
/**
|
||||
* The latest supported Key Vault service API version
|
||||
*/
|
||||
export const LATEST_API_VERSION = "7.5";
|
||||
/** Known values of {@link KeyOperation} that the service accepts. */
|
||||
export var KnownKeyOperations;
|
||||
(function (KnownKeyOperations) {
|
||||
/** Key operation - encrypt */
|
||||
KnownKeyOperations["Encrypt"] = "encrypt";
|
||||
/** Key operation - decrypt */
|
||||
KnownKeyOperations["Decrypt"] = "decrypt";
|
||||
/** Key operation - sign */
|
||||
KnownKeyOperations["Sign"] = "sign";
|
||||
/** Key operation - verify */
|
||||
KnownKeyOperations["Verify"] = "verify";
|
||||
/** Key operation - wrapKey */
|
||||
KnownKeyOperations["WrapKey"] = "wrapKey";
|
||||
/** Key operation - unwrapKey */
|
||||
KnownKeyOperations["UnwrapKey"] = "unwrapKey";
|
||||
/** Key operation - import */
|
||||
KnownKeyOperations["Import"] = "import";
|
||||
})(KnownKeyOperations || (KnownKeyOperations = {}));
|
||||
/** Known values of {@link KeyExportEncryptionAlgorithm} that the service accepts. */
|
||||
export var KnownKeyExportEncryptionAlgorithm;
|
||||
(function (KnownKeyExportEncryptionAlgorithm) {
|
||||
/** CKM_RSA_AES_KEY_WRAP Key Export Encryption Algorithm */
|
||||
KnownKeyExportEncryptionAlgorithm["CkmRsaAesKeyWrap"] = "CKM_RSA_AES_KEY_WRAP";
|
||||
/** RSA_AES_KEY_WRAP_256 Key Export Encryption Algorithm */
|
||||
KnownKeyExportEncryptionAlgorithm["RsaAesKeyWrap256"] = "RSA_AES_KEY_WRAP_256";
|
||||
/** RSA_AES_KEY_WRAP_384 Key Export Encryption Algorithm */
|
||||
KnownKeyExportEncryptionAlgorithm["RsaAesKeyWrap384"] = "RSA_AES_KEY_WRAP_384";
|
||||
})(KnownKeyExportEncryptionAlgorithm || (KnownKeyExportEncryptionAlgorithm = {}));
|
||||
//# sourceMappingURL=keysModels.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/keysModels.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/keysModels.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/@azure/keyvault-keys/dist/browser/log.d.ts
generated
vendored
Normal file
5
node_modules/@azure/keyvault-keys/dist/browser/log.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* The \@azure/logger configuration for this package.
|
||||
*/
|
||||
export declare const logger: import("@azure/logger").AzureLogger;
|
||||
//# sourceMappingURL=log.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/log.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/log.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,MAAM,qCAAsC,CAAC"}
|
||||
8
node_modules/@azure/keyvault-keys/dist/browser/log.js
generated
vendored
Normal file
8
node_modules/@azure/keyvault-keys/dist/browser/log.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createClientLogger } from "@azure/logger";
|
||||
/**
|
||||
* The \@azure/logger configuration for this package.
|
||||
*/
|
||||
export const logger = createClientLogger("keyvault-keys");
|
||||
//# sourceMappingURL=log.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/log.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/log.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"keyvault-keys\");\n"]}
|
||||
35
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.d.ts
generated
vendored
Normal file
35
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { AbortSignalLike } from "@azure/abort-controller";
|
||||
import { OperationOptions } from "@azure/core-client";
|
||||
import { KeyVaultClient } from "../../generated/keyVaultClient.js";
|
||||
import { DeletedKey } from "../../keysModels.js";
|
||||
import { KeyVaultKeyPollOperation, KeyVaultKeyPollOperationState } from "../keyVaultKeyPoller.js";
|
||||
/**
|
||||
* An interface representing the state of a delete key's poll operation
|
||||
*/
|
||||
export interface DeleteKeyPollOperationState extends KeyVaultKeyPollOperationState<DeletedKey> {
|
||||
}
|
||||
export declare class DeleteKeyPollOperation extends KeyVaultKeyPollOperation<DeleteKeyPollOperationState, DeletedKey> {
|
||||
state: DeleteKeyPollOperationState;
|
||||
private vaultUrl;
|
||||
private client;
|
||||
private operationOptions;
|
||||
constructor(state: DeleteKeyPollOperationState, vaultUrl: string, client: KeyVaultClient, operationOptions?: OperationOptions);
|
||||
/**
|
||||
* Sends a delete request for the given Key Vault Key's name to the Key Vault service.
|
||||
* Since the Key Vault Key won't be immediately deleted, we have {@link beginDeleteKey}.
|
||||
*/
|
||||
private deleteKey;
|
||||
/**
|
||||
* The getDeletedKey method returns the specified deleted key along with its properties.
|
||||
* This operation requires the keys/get permission.
|
||||
*/
|
||||
private getDeletedKey;
|
||||
/**
|
||||
* Reaches to the service and updates the delete key's poll operation.
|
||||
*/
|
||||
update(options?: {
|
||||
abortSignal?: AbortSignalLike;
|
||||
fireProgress?: (state: DeleteKeyPollOperationState) => void;
|
||||
}): Promise<DeleteKeyPollOperation>;
|
||||
}
|
||||
//# sourceMappingURL=operation.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../src/lro/delete/operation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAoB,UAAU,EAAwB,MAAM,qBAAqB,CAAC;AAGzF,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,6BAA6B,CAAC,UAAU,CAAC;CAAG;AAEjG,qBAAa,sBAAuB,SAAQ,wBAAwB,CAClE,2BAA2B,EAC3B,UAAU,CACX;IAEU,KAAK,EAAE,2BAA2B;IACzC,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,gBAAgB;gBAHjB,KAAK,EAAE,2BAA2B,EACjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,EACtB,gBAAgB,GAAE,gBAAqB;IAKjD;;;OAGG;IACH,OAAO,CAAC,SAAS;IAOjB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAWrB;;OAEG;IACU,MAAM,CACjB,OAAO,GAAE;QACP,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;KACxD,GACL,OAAO,CAAC,sBAAsB,CAAC;CAmCnC"}
|
||||
71
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.js
generated
vendored
Normal file
71
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { tracingClient } from "../../tracing.js";
|
||||
import { getKeyFromKeyBundle } from "../../transformations.js";
|
||||
import { KeyVaultKeyPollOperation } from "../keyVaultKeyPoller.js";
|
||||
export class DeleteKeyPollOperation extends KeyVaultKeyPollOperation {
|
||||
constructor(state, vaultUrl, client, operationOptions = {}) {
|
||||
super(state, { cancelMessage: "Canceling the deletion of a key is not supported." });
|
||||
this.state = state;
|
||||
this.vaultUrl = vaultUrl;
|
||||
this.client = client;
|
||||
this.operationOptions = operationOptions;
|
||||
}
|
||||
/**
|
||||
* Sends a delete request for the given Key Vault Key's name to the Key Vault service.
|
||||
* Since the Key Vault Key won't be immediately deleted, we have {@link beginDeleteKey}.
|
||||
*/
|
||||
deleteKey(name, options = {}) {
|
||||
return tracingClient.withSpan("DeleteKeyPoller.deleteKey", options, async (updatedOptions) => {
|
||||
const response = await this.client.deleteKey(this.vaultUrl, name, updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* The getDeletedKey method returns the specified deleted key along with its properties.
|
||||
* This operation requires the keys/get permission.
|
||||
*/
|
||||
getDeletedKey(name, options = {}) {
|
||||
return tracingClient.withSpan("DeleteKeyPoller.getDeletedKey", options, async (updatedOptions) => {
|
||||
const response = await this.client.getDeletedKey(this.vaultUrl, name, updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reaches to the service and updates the delete key's poll operation.
|
||||
*/
|
||||
async update(options = {}) {
|
||||
const state = this.state;
|
||||
const { name } = state;
|
||||
if (options.abortSignal) {
|
||||
this.operationOptions.abortSignal = options.abortSignal;
|
||||
}
|
||||
if (!state.isStarted) {
|
||||
const deletedKey = await this.deleteKey(name, this.operationOptions);
|
||||
state.isStarted = true;
|
||||
state.result = deletedKey;
|
||||
if (!deletedKey.properties.recoveryId) {
|
||||
state.isCompleted = true;
|
||||
}
|
||||
}
|
||||
if (!state.isCompleted) {
|
||||
try {
|
||||
state.result = await this.getDeletedKey(name, this.operationOptions);
|
||||
state.isCompleted = true;
|
||||
}
|
||||
catch (error) {
|
||||
if (error.statusCode === 403) {
|
||||
// At this point, the resource exists but the user doesn't have access to it.
|
||||
state.isCompleted = true;
|
||||
}
|
||||
else if (error.statusCode !== 404) {
|
||||
state.error = error;
|
||||
state.isCompleted = true;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=operation.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/operation.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
10
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.d.ts
generated
vendored
Normal file
10
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { DeleteKeyPollOperationState } from "./operation.js";
|
||||
import { DeletedKey } from "../../keysModels.js";
|
||||
import { KeyVaultKeyPoller, KeyVaultKeyPollerOptions } from "../keyVaultKeyPoller.js";
|
||||
/**
|
||||
* Class that creates a poller that waits until a key finishes being deleted.
|
||||
*/
|
||||
export declare class DeleteKeyPoller extends KeyVaultKeyPoller<DeleteKeyPollOperationState, DeletedKey> {
|
||||
constructor(options: KeyVaultKeyPollerOptions);
|
||||
}
|
||||
//# sourceMappingURL=poller.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/delete/poller.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0B,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEtF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,iBAAiB,CAAC,2BAA2B,EAAE,UAAU,CAAC;gBACjF,OAAO,EAAE,wBAAwB;CAuB9C"}
|
||||
20
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.js
generated
vendored
Normal file
20
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { DeleteKeyPollOperation } from "./operation.js";
|
||||
import { KeyVaultKeyPoller } from "../keyVaultKeyPoller.js";
|
||||
/**
|
||||
* Class that creates a poller that waits until a key finishes being deleted.
|
||||
*/
|
||||
export class DeleteKeyPoller extends KeyVaultKeyPoller {
|
||||
constructor(options) {
|
||||
const { vaultUrl, client, name, operationOptions, intervalInMs = 2000, resumeFrom } = options;
|
||||
let state;
|
||||
if (resumeFrom) {
|
||||
state = JSON.parse(resumeFrom).state;
|
||||
}
|
||||
const operation = new DeleteKeyPollOperation(Object.assign(Object.assign({}, state), { name }), vaultUrl, client, operationOptions);
|
||||
super(operation);
|
||||
this.intervalInMs = intervalInMs;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=poller.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/delete/poller.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/delete/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAA+B,MAAM,gBAAgB,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAA4B,MAAM,yBAAyB,CAAC;AAEtF;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,iBAA0D;IAC7F,YAAY,OAAiC;QAC3C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAE9F,IAAI,KAA8C,CAAC;QAEnD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,sBAAsB,iCAErC,KAAK,KACR,IAAI,KAEN,QAAQ,EACR,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DeleteKeyPollOperation, DeleteKeyPollOperationState } from \"./operation.js\";\nimport { DeletedKey } from \"../../keysModels.js\";\nimport { KeyVaultKeyPoller, KeyVaultKeyPollerOptions } from \"../keyVaultKeyPoller.js\";\n\n/**\n * Class that creates a poller that waits until a key finishes being deleted.\n */\nexport class DeleteKeyPoller extends KeyVaultKeyPoller<DeleteKeyPollOperationState, DeletedKey> {\n constructor(options: KeyVaultKeyPollerOptions) {\n const { vaultUrl, client, name, operationOptions, intervalInMs = 2000, resumeFrom } = options;\n\n let state: DeleteKeyPollOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new DeleteKeyPollOperation(\n {\n ...state,\n name,\n },\n vaultUrl,\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
|
||||
63
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.d.ts
generated
vendored
Normal file
63
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.d.ts
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import { OperationOptions } from "@azure/core-client";
|
||||
import { Poller, PollOperation, PollOperationState } from "@azure/core-lro";
|
||||
import { KeyVaultClient } from "../generated/keyVaultClient.js";
|
||||
/**
|
||||
* Common parameters to a Key Vault Key Poller.
|
||||
*/
|
||||
export interface KeyVaultKeyPollerOptions {
|
||||
vaultUrl: string;
|
||||
client: KeyVaultClient;
|
||||
name: string;
|
||||
operationOptions?: OperationOptions;
|
||||
intervalInMs?: number;
|
||||
resumeFrom?: string;
|
||||
}
|
||||
/**
|
||||
* An interface representing the state of a Key Vault Key Poller's operation.
|
||||
*/
|
||||
export interface KeyVaultKeyPollOperationState<TResult> extends PollOperationState<TResult> {
|
||||
/**
|
||||
* The name of the key.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
/**
|
||||
* Common properties and methods of the Key Vault Key Pollers.
|
||||
*/
|
||||
export declare abstract class KeyVaultKeyPoller<TState extends KeyVaultKeyPollOperationState<TResult>, TResult> extends Poller<TState, TResult> {
|
||||
/**
|
||||
* Defines how much time the poller is going to wait before making a new request to the service.
|
||||
*/
|
||||
intervalInMs: number;
|
||||
/**
|
||||
* The method used by the poller to wait before attempting to update its operation.
|
||||
*/
|
||||
delay(): Promise<void>;
|
||||
}
|
||||
/**
|
||||
* Optional parameters to the KeyVaultKeyPollOperation
|
||||
*/
|
||||
export interface KeyVaultKeyPollOperationOptions {
|
||||
cancelMessage?: string;
|
||||
}
|
||||
/**
|
||||
* Common properties and methods of the Key Vault Key Poller operations.
|
||||
*/
|
||||
export declare class KeyVaultKeyPollOperation<TState, TResult> implements PollOperation<TState, TResult> {
|
||||
state: TState;
|
||||
private cancelMessage;
|
||||
constructor(state: TState, options?: KeyVaultKeyPollOperationOptions);
|
||||
/**
|
||||
* Meant to reach to the service and update the Poller operation.
|
||||
*/
|
||||
update(): Promise<PollOperation<TState, TResult>>;
|
||||
/**
|
||||
* Meant to reach to the service and cancel the Poller operation.
|
||||
*/
|
||||
cancel(): Promise<PollOperation<TState, TResult>>;
|
||||
/**
|
||||
* Serializes the Poller operation.
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
//# sourceMappingURL=keyVaultKeyPoller.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"keyVaultKeyPoller.d.ts","sourceRoot":"","sources":["../../../src/lro/keyVaultKeyPoller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,OAAO,CAAE,SAAQ,kBAAkB,CAAC,OAAO,CAAC;IACzF;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,8BAAsB,iBAAiB,CACrC,MAAM,SAAS,6BAA6B,CAAC,OAAO,CAAC,EACrD,OAAO,CACP,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACI,YAAY,EAAE,MAAM,CAAQ;IAEnC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAE,YAAW,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC;IAIrF,KAAK,EAAE,MAAM;IAHtB,OAAO,CAAC,aAAa,CAAc;gBAG1B,KAAK,EAAE,MAAM,EACpB,OAAO,GAAE,+BAAoC;IAO/C;;OAEG;IACU,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAI9D;;OAEG;IACU,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAI9D;;OAEG;IACI,QAAQ,IAAI,MAAM;CAK1B"}
|
||||
55
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.js
generated
vendored
Normal file
55
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { delay } from "@azure/core-util";
|
||||
import { Poller } from "@azure/core-lro";
|
||||
/**
|
||||
* Common properties and methods of the Key Vault Key Pollers.
|
||||
*/
|
||||
export class KeyVaultKeyPoller extends Poller {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
/**
|
||||
* Defines how much time the poller is going to wait before making a new request to the service.
|
||||
*/
|
||||
this.intervalInMs = 2000;
|
||||
}
|
||||
/**
|
||||
* The method used by the poller to wait before attempting to update its operation.
|
||||
*/
|
||||
async delay() {
|
||||
return delay(this.intervalInMs);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Common properties and methods of the Key Vault Key Poller operations.
|
||||
*/
|
||||
export class KeyVaultKeyPollOperation {
|
||||
constructor(state, options = {}) {
|
||||
this.state = state;
|
||||
this.cancelMessage = "";
|
||||
if (options.cancelMessage) {
|
||||
this.cancelMessage = options.cancelMessage;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Meant to reach to the service and update the Poller operation.
|
||||
*/
|
||||
async update() {
|
||||
throw new Error("Operation not supported.");
|
||||
}
|
||||
/**
|
||||
* Meant to reach to the service and cancel the Poller operation.
|
||||
*/
|
||||
async cancel() {
|
||||
throw new Error(this.cancelMessage);
|
||||
}
|
||||
/**
|
||||
* Serializes the Poller operation.
|
||||
*/
|
||||
toString() {
|
||||
return JSON.stringify({
|
||||
state: this.state,
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=keyVaultKeyPoller.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/keyVaultKeyPoller.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"keyVaultKeyPoller.js","sourceRoot":"","sources":["../../../src/lro/keyVaultKeyPoller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAqC,MAAM,iBAAiB,CAAC;AAyB5E;;GAEG;AACH,MAAM,OAAgB,iBAGpB,SAAQ,MAAuB;IAHjC;;QAIE;;WAEG;QACI,iBAAY,GAAW,IAAI,CAAC;IAQrC,CAAC;IANC;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;CACF;AASD;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAGnC,YACS,KAAa,EACpB,UAA2C,EAAE;QADtC,UAAK,GAAL,KAAK,CAAQ;QAHd,kBAAa,GAAW,EAAE,CAAC;QAMjC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;YAC1B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC7C,CAAC;IACH,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport { delay } from \"@azure/core-util\";\nimport { Poller, PollOperation, PollOperationState } from \"@azure/core-lro\";\nimport { KeyVaultClient } from \"../generated/keyVaultClient.js\";\n\n/**\n * Common parameters to a Key Vault Key Poller.\n */\nexport interface KeyVaultKeyPollerOptions {\n vaultUrl: string;\n client: KeyVaultClient;\n name: string;\n operationOptions?: OperationOptions;\n intervalInMs?: number;\n resumeFrom?: string;\n}\n\n/**\n * An interface representing the state of a Key Vault Key Poller's operation.\n */\nexport interface KeyVaultKeyPollOperationState<TResult> extends PollOperationState<TResult> {\n /**\n * The name of the key.\n */\n name: string;\n}\n\n/**\n * Common properties and methods of the Key Vault Key Pollers.\n */\nexport abstract class KeyVaultKeyPoller<\n TState extends KeyVaultKeyPollOperationState<TResult>,\n TResult,\n> extends Poller<TState, TResult> {\n /**\n * Defines how much time the poller is going to wait before making a new request to the service.\n */\n public intervalInMs: number = 2000;\n\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n async delay(): Promise<void> {\n return delay(this.intervalInMs);\n }\n}\n\n/**\n * Optional parameters to the KeyVaultKeyPollOperation\n */\nexport interface KeyVaultKeyPollOperationOptions {\n cancelMessage?: string;\n}\n\n/**\n * Common properties and methods of the Key Vault Key Poller operations.\n */\nexport class KeyVaultKeyPollOperation<TState, TResult> implements PollOperation<TState, TResult> {\n private cancelMessage: string = \"\";\n\n constructor(\n public state: TState,\n options: KeyVaultKeyPollOperationOptions = {},\n ) {\n if (options.cancelMessage) {\n this.cancelMessage = options.cancelMessage;\n }\n }\n\n /**\n * Meant to reach to the service and update the Poller operation.\n */\n public async update(): Promise<PollOperation<TState, TResult>> {\n throw new Error(\"Operation not supported.\");\n }\n\n /**\n * Meant to reach to the service and cancel the Poller operation.\n */\n public async cancel(): Promise<PollOperation<TState, TResult>> {\n throw new Error(this.cancelMessage);\n }\n\n /**\n * Serializes the Poller operation.\n */\n public toString(): string {\n return JSON.stringify({\n state: this.state,\n });\n }\n}\n"]}
|
||||
35
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.d.ts
generated
vendored
Normal file
35
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { AbortSignalLike } from "@azure/abort-controller";
|
||||
import { OperationOptions } from "@azure/core-client";
|
||||
import { KeyVaultClient } from "../../generated/keyVaultClient.js";
|
||||
import { KeyVaultKey } from "../../keysModels.js";
|
||||
import { KeyVaultKeyPollOperation, KeyVaultKeyPollOperationState } from "../keyVaultKeyPoller.js";
|
||||
/**
|
||||
* An interface representing the state of a delete key's poll operation
|
||||
*/
|
||||
export interface RecoverDeletedKeyPollOperationState extends KeyVaultKeyPollOperationState<KeyVaultKey> {
|
||||
}
|
||||
export declare class RecoverDeletedKeyPollOperation extends KeyVaultKeyPollOperation<RecoverDeletedKeyPollOperationState, KeyVaultKey> {
|
||||
state: RecoverDeletedKeyPollOperationState;
|
||||
private vaultUrl;
|
||||
private client;
|
||||
private operationOptions;
|
||||
constructor(state: RecoverDeletedKeyPollOperationState, vaultUrl: string, client: KeyVaultClient, operationOptions?: OperationOptions);
|
||||
/**
|
||||
* The getKey method gets a specified key and is applicable to any key stored in Azure Key Vault.
|
||||
* This operation requires the keys/get permission.
|
||||
*/
|
||||
private getKey;
|
||||
/**
|
||||
* Sends a request to recover a deleted Key Vault Key based on the given name.
|
||||
* Since the Key Vault Key won't be immediately recover the deleted key, we have {@link beginRecoverDeletedKey}.
|
||||
*/
|
||||
private recoverDeletedKey;
|
||||
/**
|
||||
* Reaches to the service and updates the delete key's poll operation.
|
||||
*/
|
||||
update(options?: {
|
||||
abortSignal?: AbortSignalLike;
|
||||
fireProgress?: (state: RecoverDeletedKeyPollOperationState) => void;
|
||||
}): Promise<RecoverDeletedKeyPollOperation>;
|
||||
}
|
||||
//# sourceMappingURL=operation.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../src/lro/recover/operation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAiB,WAAW,EAA4B,MAAM,qBAAqB,CAAC;AAG3F,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,mCACf,SAAQ,6BAA6B,CAAC,WAAW,CAAC;CAAG;AAEvD,qBAAa,8BAA+B,SAAQ,wBAAwB,CAC1E,mCAAmC,EACnC,WAAW,CACZ;IAEU,KAAK,EAAE,mCAAmC;IACjD,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,gBAAgB;gBAHjB,KAAK,EAAE,mCAAmC,EACzC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,EACtB,gBAAgB,GAAE,gBAAqB;IAKjD;;;OAGG;IACH,OAAO,CAAC,MAAM;IAgBd;;;OAGG;YACW,iBAAiB;IAc/B;;OAEG;IACU,MAAM,CACjB,OAAO,GAAE;QACP,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;KAChE,GACL,OAAO,CAAC,8BAA8B,CAAC;CAwC3C"}
|
||||
77
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.js
generated
vendored
Normal file
77
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { tracingClient } from "../../tracing.js";
|
||||
import { getKeyFromKeyBundle } from "../../transformations.js";
|
||||
import { KeyVaultKeyPollOperation } from "../keyVaultKeyPoller.js";
|
||||
export class RecoverDeletedKeyPollOperation extends KeyVaultKeyPollOperation {
|
||||
constructor(state, vaultUrl, client, operationOptions = {}) {
|
||||
super(state, { cancelMessage: "Canceling the recovery of a deleted key is not supported." });
|
||||
this.state = state;
|
||||
this.vaultUrl = vaultUrl;
|
||||
this.client = client;
|
||||
this.operationOptions = operationOptions;
|
||||
}
|
||||
/**
|
||||
* The getKey method gets a specified key and is applicable to any key stored in Azure Key Vault.
|
||||
* This operation requires the keys/get permission.
|
||||
*/
|
||||
getKey(name, options = {}) {
|
||||
return tracingClient.withSpan("RecoverDeleteKeyPoller.getKey", options, async (updatedOptions) => {
|
||||
const response = await this.client.getKey(this.vaultUrl, name, (updatedOptions === null || updatedOptions === void 0 ? void 0 : updatedOptions.version) || "", updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Sends a request to recover a deleted Key Vault Key based on the given name.
|
||||
* Since the Key Vault Key won't be immediately recover the deleted key, we have {@link beginRecoverDeletedKey}.
|
||||
*/
|
||||
async recoverDeletedKey(name, options = {}) {
|
||||
return tracingClient.withSpan("RecoverDeletedKeyPoller.recoverDeleteKey", options, async (updatedOptions) => {
|
||||
const response = await this.client.recoverDeletedKey(this.vaultUrl, name, updatedOptions);
|
||||
return getKeyFromKeyBundle(response);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reaches to the service and updates the delete key's poll operation.
|
||||
*/
|
||||
async update(options = {}) {
|
||||
const state = this.state;
|
||||
const { name } = state;
|
||||
const operationOptions = this.operationOptions;
|
||||
if (options.abortSignal) {
|
||||
operationOptions.abortSignal = options.abortSignal;
|
||||
}
|
||||
if (!state.isStarted) {
|
||||
try {
|
||||
state.result = await this.getKey(name, operationOptions);
|
||||
state.isCompleted = true;
|
||||
}
|
||||
catch (_a) {
|
||||
// Nothing to do here.
|
||||
}
|
||||
if (!state.isCompleted) {
|
||||
state.result = await this.recoverDeletedKey(name, operationOptions);
|
||||
state.isStarted = true;
|
||||
}
|
||||
}
|
||||
if (!state.isCompleted) {
|
||||
try {
|
||||
state.result = await this.getKey(name, operationOptions);
|
||||
state.isCompleted = true;
|
||||
}
|
||||
catch (error) {
|
||||
if (error.statusCode === 403) {
|
||||
// At this point, the resource exists but the user doesn't have access to it.
|
||||
state.isCompleted = true;
|
||||
}
|
||||
else if (error.statusCode !== 404) {
|
||||
state.error = error;
|
||||
state.isCompleted = true;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=operation.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/operation.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
10
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.d.ts
generated
vendored
Normal file
10
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { RecoverDeletedKeyPollOperationState } from "./operation.js";
|
||||
import { KeyVaultKey } from "../../keysModels.js";
|
||||
import { KeyVaultKeyPoller, KeyVaultKeyPollerOptions } from "../keyVaultKeyPoller.js";
|
||||
/**
|
||||
* Class that deletes a poller that waits until a key finishes being deleted
|
||||
*/
|
||||
export declare class RecoverDeletedKeyPoller extends KeyVaultKeyPoller<RecoverDeletedKeyPollOperationState, KeyVaultKey> {
|
||||
constructor(options: KeyVaultKeyPollerOptions);
|
||||
}
|
||||
//# sourceMappingURL=poller.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/recover/poller.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,mCAAmC,EACpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEtF;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,iBAAiB,CAC5D,mCAAmC,EACnC,WAAW,CACZ;gBACa,OAAO,EAAE,wBAAwB;CAuB9C"}
|
||||
20
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.js
generated
vendored
Normal file
20
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { RecoverDeletedKeyPollOperation, } from "./operation.js";
|
||||
import { KeyVaultKeyPoller } from "../keyVaultKeyPoller.js";
|
||||
/**
|
||||
* Class that deletes a poller that waits until a key finishes being deleted
|
||||
*/
|
||||
export class RecoverDeletedKeyPoller extends KeyVaultKeyPoller {
|
||||
constructor(options) {
|
||||
const { vaultUrl, client, name, operationOptions, intervalInMs = 2000, resumeFrom } = options;
|
||||
let state;
|
||||
if (resumeFrom) {
|
||||
state = JSON.parse(resumeFrom).state;
|
||||
}
|
||||
const operation = new RecoverDeletedKeyPollOperation(Object.assign(Object.assign({}, state), { name }), vaultUrl, client, operationOptions);
|
||||
super(operation);
|
||||
this.intervalInMs = intervalInMs;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=poller.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/lro/recover/poller.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/recover/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,8BAA8B,GAE/B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAA4B,MAAM,yBAAyB,CAAC;AAEtF;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iBAG5C;IACC,YAAY,OAAiC;QAC3C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAE9F,IAAI,KAAsD,CAAC;QAE3D,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,8BAA8B,iCAE7C,KAAK,KACR,IAAI,KAEN,QAAQ,EACR,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RecoverDeletedKeyPollOperation,\n RecoverDeletedKeyPollOperationState,\n} from \"./operation.js\";\nimport { KeyVaultKey } from \"../../keysModels.js\";\nimport { KeyVaultKeyPoller, KeyVaultKeyPollerOptions } from \"../keyVaultKeyPoller.js\";\n\n/**\n * Class that deletes a poller that waits until a key finishes being deleted\n */\nexport class RecoverDeletedKeyPoller extends KeyVaultKeyPoller<\n RecoverDeletedKeyPollOperationState,\n KeyVaultKey\n> {\n constructor(options: KeyVaultKeyPollerOptions) {\n const { vaultUrl, client, name, operationOptions, intervalInMs = 2000, resumeFrom } = options;\n\n let state: RecoverDeletedKeyPollOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new RecoverDeletedKeyPollOperation(\n {\n ...state,\n name,\n },\n vaultUrl,\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
|
||||
3
node_modules/@azure/keyvault-keys/dist/browser/package.json
generated
vendored
Normal file
3
node_modules/@azure/keyvault-keys/dist/browser/package.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
2
node_modules/@azure/keyvault-keys/dist/browser/tracing.d.ts
generated
vendored
Normal file
2
node_modules/@azure/keyvault-keys/dist/browser/tracing.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const tracingClient: import("@azure/core-tracing").TracingClient;
|
||||
//# sourceMappingURL=tracing.d.ts.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/tracing.d.ts.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/tracing.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,6CAIxB,CAAC"}
|
||||
10
node_modules/@azure/keyvault-keys/dist/browser/tracing.js
generated
vendored
Normal file
10
node_modules/@azure/keyvault-keys/dist/browser/tracing.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { createTracingClient } from "@azure/core-tracing";
|
||||
import { SDK_VERSION } from "./constants.js";
|
||||
export const tracingClient = createTracingClient({
|
||||
namespace: "Microsoft.KeyVault",
|
||||
packageName: "@azure/keyvault-keys",
|
||||
packageVersion: SDK_VERSION,
|
||||
});
|
||||
//# sourceMappingURL=tracing.js.map
|
||||
1
node_modules/@azure/keyvault-keys/dist/browser/tracing.js.map
generated
vendored
Normal file
1
node_modules/@azure/keyvault-keys/dist/browser/tracing.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,oBAAoB;IAC/B,WAAW,EAAE,sBAAsB;IACnC,cAAc,EAAE,WAAW;CAC5B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants.js\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.KeyVault\",\n packageName: \"@azure/keyvault-keys\",\n packageVersion: SDK_VERSION,\n});\n"]}
|
||||
25
node_modules/@azure/keyvault-keys/dist/browser/transformations.d.ts
generated
vendored
Normal file
25
node_modules/@azure/keyvault-keys/dist/browser/transformations.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { DeletedKeyBundle, DeletedKeyItem, KeyRotationPolicy as GeneratedPolicy, KeyBundle, KeyItem } from "./generated/models/index.js";
|
||||
import { DeletedKey, KeyProperties, KeyRotationPolicy, KeyRotationPolicyProperties, KeyVaultKey } from "./keysModels.js";
|
||||
/**
|
||||
* @internal
|
||||
* Shapes the exposed {@link KeyVaultKey} based on either a received key bundle or deleted key bundle.
|
||||
*/
|
||||
export declare function getKeyFromKeyBundle(bundle: KeyBundle | DeletedKeyBundle): KeyVaultKey | DeletedKey;
|
||||
/**
|
||||
* @internal
|
||||
* Shapes the exposed {@link DeletedKey} based on a received KeyItem.
|
||||
*/
|
||||
export declare function getDeletedKeyFromDeletedKeyItem(keyItem: DeletedKeyItem): DeletedKey;
|
||||
/**
|
||||
* @internal
|
||||
* Shapes the exposed {@link KeyProperties} based on a received KeyItem.
|
||||
*/
|
||||
export declare function getKeyPropertiesFromKeyItem(keyItem: KeyItem): KeyProperties;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const keyRotationTransformations: {
|
||||
propertiesToGenerated: (parameters: KeyRotationPolicyProperties) => Partial<GeneratedPolicy>;
|
||||
generatedToPublic(generated: GeneratedPolicy): KeyRotationPolicy;
|
||||
};
|
||||
//# sourceMappingURL=transformations.d.ts.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user