- Overview
- Reference Guide
- Setup & Architecture
- Release Notes
- Workflow
- API Reference
- Integration Guide
- Discovery Agent Setup Guide
Azure Key Vault
The Azure Key Vault endpoints register Azure Key Vaults with CertSecure Manager, list and download the certificates they hold, and upload certificates issued by CertSecure Manager to a vault.
For the corresponding user interface, refer to the Utilities > Azure Key Vault section.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /azureKeyVault/all | List Azure Key Vaults. |
| DELETE | /azureKeyVault/delete/{name} | Delete Azure Key Vault. |
| GET | /azureKeyVault/download | Download certificate from vault. |
| GET | /azureKeyVault/get_all_certificates | List all certificates in a vault. |
| GET | /azureKeyVault/get_certificate_info | Get certificate info from vault. |
| POST | /azureKeyVault/register_azure_key_vault | Register Azure Key Vault. |
| PUT | /azureKeyVault/update/{name} | Update Azure Key Vault. |
| POST | /azureKeyVault/upload | Upload issued certificate to vault by EID. |
| POST | /azureKeyVault/upload-with-key | Upload certificate with private key. |
| GET | /azureKeyVault/{name} | Get Azure Key Vault by name. |
GET /azureKeyVault/all
Lists the names of the registered Azure Key Vaults.
Example Request
curl -X GET "https://<certsecure-backend-url>/azureKeyVault/all" \
-H "Authorization: Bearer <token>"
Example Response
[
"example-vault"
]
Responses
| Status Code | Description |
|---|---|
| 200 | Vaults. |
DELETE /azureKeyVault/delete/{name}
Removes a registered Azure Key Vault from CertSecure Manager.
Request Parameters
| Name | Located In | Type | Required | Description |
|---|---|---|---|---|
name |
Path | string | Yes | Name of the resource. |
Example Request
curl -X DELETE "https://<certsecure-backend-url>/azureKeyVault/delete/<name>" \
-H "Authorization: Bearer <token>"
Responses
| Status Code | Description |
|---|---|
| 200 | The resource was deleted. |
| 404 | The resource was not found. |
GET /azureKeyVault/download
Downloads a certificate from an Azure Key Vault.
Request Parameters
| Name | Located In | Type | Required | Description |
|---|---|---|---|---|
vault |
Query | string | Yes | Name of the Azure Key Vault. |
certificate |
Query | string | Yes | - |
format |
Query | string | No | - |
Example Request
curl -X GET "https://<certsecure-backend-url>/azureKeyVault/download?vault=<vault>&certificate=<certificate>" \
-H "Authorization: Bearer <token>"
Responses
| Status Code | Description |
|---|---|
| 200 | Certificate. |
GET /azureKeyVault/get_all_certificates
Lists the certificates stored in an Azure Key Vault.
Request Parameters
| Name | Located In | Type | Required | Description |
|---|---|---|---|---|
vault |
Query | string | Yes | Vault name. |
Example Request
curl -X GET "https://<certsecure-backend-url>/azureKeyVault/get_all_certificates?vault=<vault>" \
-H "Authorization: Bearer <token>"
Responses
| Status Code | Description |
|---|---|
| 200 | Certificates. |
GET /azureKeyVault/get_certificate_info
Returns the details of a certificate stored in an Azure Key Vault.
Request Parameters
| Name | Located In | Type | Required | Description |
|---|---|---|---|---|
vault |
Query | string | Yes | Name of the Azure Key Vault. |
certificate |
Query | string | Yes | Certificate name. |
Example Request
curl -X GET "https://<certsecure-backend-url>/azureKeyVault/get_certificate_info?vault=<vault>&certificate=<certificate>" \
-H "Authorization: Bearer <token>"
Responses
| Status Code | Description |
|---|---|
| 200 | Cert info. |
POST /azureKeyVault/register_azure_key_vault
Registers an Azure Key Vault with CertSecure Manager using the credentials of a Microsoft Entra ID app registration.
Request Body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
client_id |
string | Yes | - |
client_secret |
string | Yes | - |
departments |
array of string | Yes | - |
environment |
string | Yes | Allowed values: commercial, government. |
tenant_id |
string | Yes | - |
vault_name |
string | Yes | Name of the Azure Key Vault. |
Example Request
curl -X POST "https://<certsecure-backend-url>/azureKeyVault/register_azure_key_vault" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"client_id": "string", "client_secret": "string", "departments": ["string"], "environment": "string", "tenant_id": "string", "vault_name": "string"}'
Responses
| Status Code | Description |
|---|---|
| 200 | Registered. |
| 409 | Already exists. |
PUT /azureKeyVault/update/{name}
Updates a registered Azure Key Vault.
Request Parameters
| Name | Located In | Type | Required | Description |
|---|---|---|---|---|
name |
Path | string | Yes | Name of the resource. |
Request Body (application/json)
The request body is a JSON object that contains the settings to save.
Example Request
curl -X PUT "https://<certsecure-backend-url>/azureKeyVault/update/<name>" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{}'
Responses
| Status Code | Description |
|---|---|
| 200 | The resource was updated. |
POST /azureKeyVault/upload
Uploads a certificate issued by CertSecure Manager, identified by its Enrollment ID, to an Azure Key Vault.
Request Body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
cert_name |
string | Yes | Name of the certificate in the vault. |
eid |
integer | Yes | CertSecure Enrollment ID. |
vault_name |
string | Yes | Name of the Azure Key Vault. |
Example Request
curl -X POST "https://<certsecure-backend-url>/azureKeyVault/upload" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"cert_name": "string", "eid": 1, "vault_name": "string"}'
Responses
| Status Code | Description |
|---|---|
| 200 | Uploaded. |
POST /azureKeyVault/upload-with-key
Uploads a certificate and its private key to an Azure Key Vault.
Request Body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
cert_name |
string | Yes | Name of the certificate in the vault. |
eid |
integer | No | Enrollment ID (EID) of the certificate in CertSecure Manager. |
password |
string | Yes | - |
private_key |
string | Yes | - |
task_id |
string | No | - |
vault_name |
string | Yes | Name of the Azure Key Vault. |
Example Request
curl -X POST "https://<certsecure-backend-url>/azureKeyVault/upload-with-key" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"cert_name": "string", "password": "string", "private_key": "string", "vault_name": "string"}'
Responses
| Status Code | Description |
|---|---|
| 200 | Uploaded. |
GET /azureKeyVault/{name}
Returns a registered Azure Key Vault.
Request Parameters
| Name | Located In | Type | Required | Description |
|---|---|---|---|---|
name |
Path | string | Yes | Name of the resource. |
Example Request
curl -X GET "https://<certsecure-backend-url>/azureKeyVault/<name>" \
-H "Authorization: Bearer <token>"
Responses
| Status Code | Description |
|---|---|
| 200 | Vault. |
| 404 | The resource was not found. |