Definitions for @turbot/azure-keyvault

key

{
"type": "object",
"properties": {
"vaultUrl": {
"type": "string"
},
"kid": {
"type": "string"
},
"name": {
"$ref": "#/definitions/keyName"
},
"enabled": {
"type": "boolean"
},
"created": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"updated": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"recoveryLevel": {
"type": "string"
},
"version": {
"type": "string"
},
"key": {
"type": "object"
},
"turbot": {
"type": "object",
"properties": {
"title": {
"$ref": "#/definitions/keyName"
},
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/keyAka"
}
},
"custom": {
"type": "object",
"properties": {
"vaultName": {
"type": "string"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "all properties provided",
"input": {
"kid": "https://keys-discovery.vault.azure.net/keys/key1",
"vaultUrl": "https://keys-discovery.vault.azure.net",
"name": "key1",
"enabled": true,
"created": "2019-10-01T11:19:36.000Z",
"updated": "2019-10-01T11:19:36.000Z",
"recoveryLevel": "Purgeable",
"turbot": {
"title": "key1",
"akas": [
"azure:///subscriptions/4a7939ca-f468-41b8-aa72-1651b9c321c4/resourceGroups/ind008/providers/Microsoft.KeyVault/vaults/keys-discovery/keys/key1"
],
"custom": {
"createTimestamp": "2019-10-01T11:19:36.000Z",
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1",
"regionName": "southeastasia"
}
}
}
}
},
{
"description": "invalid - missing required property name",
"input": {
"tags": {
"key01": "value01"
},
"turbot": {
"title": "test01",
"tags": {
"key01": "value01"
},
"akas": [
"azure:///subscriptions/4a7939ca-f468-41b8-aa72-1651b9c321c4/resourceGroups/ind008/providers/Microsoft.KeyVault/vaults/test01/keys/test01"
],
"custom": {
"azure": {
"subscriptionId": "4a7939ca-f468-41b8-aa72-1651b9c321c4",
"resourceGroupName": "ind008",
"regionName": "southeastasia"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/key",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

keyAka

{
"type": "string",
"pattern": "^azure:///subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/resourceGroups/[A-Za-z0-9-_().]*[A-Za-z0-9-_()]/providers/Microsoft.KeyVault/vaults/(?!.*--)[a-zA-z][a-zA-z0-9-]{1,23}[^-]/keys/[0-9a-zA-Z-]{1,127}$",
"tests": [
{
"description": "base",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.KeyVault/vaults/test01/keys/test01"
},
{
"description": "invalid aka",
"input": "gcp://serviceusage.googleapis.com/projects/cse-legolas-2/services/compute.googleapis.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/keyAka",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

keyName

{
"type": "string",
"pattern": "^[0-9a-zA-Z-]{1,127}$",
"tests": [
{
"description": "min length",
"input": "a"
},
{
"description": "max length",
"input": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvw"
},
{
"description": "invalid - exceeds max length",
"input": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
"expected": false
},
{
"input": "pratiks07"
},
{
"description": "invalid - can not contain dollar symbol",
"input": "aaa$bbb",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/keyName",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

keyServiceNow

{
"defaultColumns": {
"region": {
"column": "enabled",
"path": "metadata.azure.regionName"
},
"resource_group": {
"type": "string",
"size": 200,
"column": "enabled",
"path": "metadata.azure.resourceGroupName"
},
"subscription_id": {
"column": "enabled",
"label": "Subscription ID",
"path": "metadata.azure.subscriptionId"
},
"created_at": {
"column": "enabled",
"path": "data.created"
},
"enabled": {
"column": "enabled",
"type": "boolean"
},
"id": {
"column": "enabled",
"label": "ID"
},
"key_ops": {
"column": "enabled",
"path": "data.keyOperations",
"label": "Key Operations",
"type": "string",
"size": 1000
},
"key_type": {
"column": "enabled"
},
"key_name": {
"column": "enabled",
"path": "data.name"
},
"key_uri": {
"column": "enabled",
"path": "data.kid",
"label": "Key URI"
},
"recovery_level": {
"column": "enabled"
},
"tags": {
"column": "enabled",
"type": "string",
"size": 1000
},
"updated_at": {
"column": "enabled",
"path": "data.updated"
}
},
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/keyServiceNow",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

keyVault

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"const": "Key Vault"
},
"namespace": {
"const": "Microsoft.KeyVault"
},
"registrationState": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/keyVaultAka"
}
},
"title": {
"const": "Key Vault"
},
"custom": {
"type": "object",
"properties": {
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"additionalProperties": true,
"tests": [
{
"description": "All details provided",
"input": {
"name": "Key Vault",
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.KeyVault/services/keyVault"
],
"title": "Key Vault",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7"
}
}
}
}
},
{
"description": "Invalid - Name is not as declared",
"input": {
"name": "keyvault",
"turbot": {
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.KeyVault/services/keyVault"
],
"title": "key Vault",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7"
}
}
}
},
"expected": false
},
{
"description": "Invalid - Service name missing",
"input": {
"turbot": null,
"akas": [
"azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.KeyVault/services/keyVault"
],
"title": "Key Vault",
"custom": {
"azure": {
"subscriptionId": "9e3548cf-17e2-4751-b87e-b72bdd2c77f7"
}
}
},
"expected": false
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/keyVault",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

keyVaultAka

{
"type": "string",
"pattern": "^azure:///subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/providers/Microsoft.KeyVault/services/keyVault$",
"tests": [
{
"description": "base",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.KeyVault/services/keyVault"
},
{
"description": "invalid service name",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/providers/Microsoft.keys/services/keyVault",
"expected": false
},
{
"description": "invalid subscription id",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-12345-b72bdd2c77f7/providers/Microsoft.KeyVault/services/keyVault",
"expected": false
},
{
"description": "invalid provider name",
"input": "gcp:///subscriptions/9e3548cf-17e2-4751-12345-b72bdd2c77f7/providers/Microsoft.KeyVault/services/keyVault",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/keyVaultAka",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

recoveryLevel

{
"type": "string",
"enum": [
"Purgeable",
"Recoverable+Purgeable",
"Recoverable",
"Recoverable+ProtectedSubscription"
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/recoveryLevel",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

secret

{
"type": "object",
"properties": {
"vaultUrl": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"$ref": "#/definitions/secretName"
},
"enabled": {
"type": "boolean"
},
"created": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"updated": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"recoveryLevel": {
"type": "string"
},
"version": {
"type": "string"
},
"notBefore": {
"type": "string"
},
"expires": {
"type": "string"
},
"turbot": {
"type": "object",
"properties": {
"title": {
"$ref": "#/definitions/secretName"
},
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/secretAka"
}
},
"custom": {
"type": "object",
"properties": {
"vaultName": {
"type": "string"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "all properties provided",
"input": {
"vaultUrl": "https://keys-discovery.vault.azure.net",
"name": "secret01",
"enabled": true,
"version": "85035c9d45be41089826486d347e5b3b",
"notBefore": "2019-10-10T08:26:25.000Z",
"expires": "2021-10-10T07:01:46.000Z",
"created": "2019-10-01T11:19:36.000Z",
"updated": "2019-10-01T11:19:36.000Z",
"recoveryLevel": "Purgeable",
"id": "https://keyvault-lalit.vault.azure.net/secrets/secret01/85035c9d45be41089826486d347e5b3b",
"turbot": {
"title": "secret01",
"akas": [
"azure:///subscriptions/4a7939ca-f468-41b8-aa72-1651b9c321c4/resourceGroups/ind008/providers/Microsoft.KeyVault/vaults/keys-discovery/secrets/secret01"
],
"custom": {
"createTimestamp": "2019-10-01T11:19:36.000Z",
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1",
"regionName": "southeastasia"
}
}
}
}
},
{
"description": "invalid - missing required property name",
"input": {
"vaultUrl": "https://keys-discovery.vault.azure.net",
"name": "secret01",
"enabled": true,
"created": "2019-10-01T11:19:36.000Z",
"updated": "2019-10-01T11:19:36.000Z",
"recoveryLevel": "Purgeable",
"turbot": {
"title": "secret01",
"akas": [
"azure:///subscriptions/4a7939ca-f468-41b8-aa72-1651b9c321c4/resourceGroups/ind008/providers/Microsoft.KeyVault/vaults/keys-discovery/secrets/secret01"
],
"custom": {
"createTimestamp": "2019-10-01T11:19:36.000Z",
"azure": {
"subscriptionId": "3510ae4d-530b-497d-8f30-53b9616fc6c1",
"regionName": "southeastasia"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/secret",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

secretAka

{
"type": "string",
"pattern": "^azure:///subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/resourceGroups/[A-Za-z0-9-_().]*[A-Za-z0-9-_()]/providers/Microsoft.KeyVault/vaults/(?!.*--)[a-zA-z][a-zA-z0-9-]{1,23}[^-]/secrets/[0-9a-zA-Z-]{1,127}$",
"tests": [
{
"description": "base",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.KeyVault/vaults/test01/secrets/secret01"
},
{
"description": "invalid aka",
"input": "gcp://serviceusage.googleapis.com/projects/cse-legolas-2/services/compute.googleapis.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/secretAka",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

secretName

{
"type": "string",
"pattern": "^[0-9a-zA-Z-]{1,127}$",
"tests": [
{
"description": "min length",
"input": "a"
},
{
"description": "max length",
"input": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvw"
},
{
"description": "invalid - exceeds max length",
"input": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
"expected": false
},
{
"input": "pratiks07"
},
{
"description": "invalid - can not contain dollar symbol",
"input": "aaa$bbb",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/secretName",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

secretServiceNow

{
"defaultColumns": {
"region": {
"column": "enabled",
"path": "metadata.azure.regionName"
},
"resource_group": {
"type": "string",
"size": 200,
"column": "enabled",
"path": "metadata.azure.resourceGroupName"
},
"subscription_id": {
"column": "enabled",
"label": "Subscription ID",
"path": "metadata.azure.subscriptionId"
},
"enabled": {
"column": "enabled",
"type": "boolean"
},
"expires_at": {
"column": "enabled",
"path": "data.expires"
},
"id": {
"column": "enabled",
"label": "ID"
},
"secret_name": {
"column": "enabled",
"path": "data.name"
},
"not_before": {
"path": "data.notBefore",
"column": "enabled"
},
"recovery_level": {
"path": "data.recoveryLevel",
"column": "enabled"
},
"tags": {
"column": "enabled",
"type": "string",
"size": 1000
},
"vault_name": {
"column": "enabled",
"path": "metadata.vaultName"
}
},
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/secretServiceNow",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

vault

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/vaultName"
},
"id": {
"type": "string"
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"location": {
"type": "string"
},
"properties": {
"type": "object"
},
"diagnosticSettings": {
"type": "array"
},
"turbot": {
"type": "object",
"properties": {
"title": {
"$ref": "#/definitions/vaultName"
},
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/vaultAka"
}
},
"tags": {
"$ref": "azure#/definitions/tags"
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"azure": {
"$ref": "azure#/definitions/azureMetadata"
}
}
}
}
}
},
"additionalProperties": true,
"tests": [
{
"description": "all properties provided",
"input": {
"name": "test01",
"tags": {
"key01": "value01"
},
"id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/test/providers/Microsoft.KeyVault/vaults/chandratest",
"location": "eastasia",
"properties": {
"tenantId": "cdffd708-7da0-4cea-abeb-0a4c334d7f64",
"sku": {
"family": "A",
"name": "Standard"
},
"accessPolicies": [
{
"tenantId": "cdffd708-7da0-4cea-abeb-0a4c334d7f64",
"objectId": "b73ad6dd-24f9-4d12-8194-0974a9bf16f6",
"permissions": {
"keys": [
"Get",
"List",
"Update",
"Create",
"Import",
"Delete",
"Recover",
"Backup",
"Restore"
],
"secrets": [
"Get",
"List",
"Set",
"Delete",
"Recover",
"Backup",
"Restore"
],
"certificates": [
"Get",
"List",
"Update",
"Create",
"Import",
"Delete",
"Recover",
"Backup",
"Restore",
"ManageContacts",
"ManageIssuers",
"GetIssuers",
"ListIssuers",
"SetIssuers",
"DeleteIssuers"
]
}
}
],
"vaultUri": "https://chandratest.vault.azure.net/",
"enabledForDeployment": false,
"enabledForDiskEncryption": false,
"enabledForTemplateDeployment": false,
"provisioningState": "Succeeded"
},
"diagnosticSettings": [
{
"id": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourcegroups/test/providers/microsoft.keyvault/vaults/chandratest/providers/microsoft.insights/diagnosticSettings/test",
"name": "test",
"type": null,
"storageAccountId": "/subscriptions/3510ae4d-530b-497d-8f30-53b9616fc6c1/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/testsayan",
"serviceBusRuleId": null,
"eventHubAuthorizationRuleId": null,
"eventHubName": null,
"metrics": [
{
"category": "AllMetrics",
"enabled": false,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
],
"logs": [
{
"category": "AuditEvent",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
],
"workspaceId": null,
"location": null,
"kind": null,
"tags": null,
"identity": null
}
],
"turbot": {
"title": "test01",
"tags": {
"key01": "value01"
},
"akas": [
"azure:///subscriptions/4a7939ca-f468-41b8-aa72-1651b9c321c4/resourceGroups/ind008/providers/Microsoft.KeyVault/vaults/test01"
],
"custom": {
"azure": {
"subscriptionId": "4a7939ca-f468-41b8-aa72-1651b9c321c4",
"resourceGroupName": "ind008",
"regionName": "southeastasia"
}
}
}
}
},
{
"description": "invalid - missing required property name",
"input": {
"tags": {
"key01": "value01"
},
"turbot": {
"title": "test01",
"tags": {
"key01": "value01"
},
"akas": [
"azure:///subscriptions/4a7939ca-f468-41b8-aa72-1651b9c321c4/resourceGroups/ind008/providers/Microsoft.KeyVault/vaults/test01"
],
"custom": {
"azure": {
"subscriptionId": "4a7939ca-f468-41b8-aa72-1651b9c321c4",
"resourceGroupName": "ind008",
"regionName": "southeastasia"
}
}
}
}
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/vault",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

vaultAka

{
"type": "string",
"pattern": "^azure:///subscriptions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/resourceGroups/[A-Za-z0-9-_().]*[A-Za-z0-9-_()]/providers/Microsoft.KeyVault/vaults/(?!.*--)[a-zA-z][a-zA-z0-9-]{1,23}[^-]",
"tests": [
{
"description": "base",
"input": "azure:///subscriptions/9e3548cf-17e2-4751-b87e-b72bdd2c77f7/resourceGroups/dev/providers/Microsoft.KeyVault/vaults/test01"
},
{
"description": "invalid aka",
"input": "gcp://serviceusage.googleapis.com/projects/cse-legolas-2/services/compute.googleapis.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/vaultAka",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

vaultName

{
"type": "string",
"pattern": "^(?!.*--)[a-zA-z][a-zA-z0-9-]{1,23}[^-]$",
"tests": [
{
"input": "test01"
},
{
"input": "pratiks07"
},
{
"description": "invalid - can not start with numbers",
"input": 111111,
"expected": false
},
{
"description": "invalid - can not contain dollar symbol",
"input": "aaa$bbb",
"expected": false
},
{
"description": "invalid - must not contain consecutive hyphens",
"input": "test0----5",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/vaultName",
"modUri": "tmod:@turbot/azure-keyvault"
}
}

vaultServiceNow

{
"defaultColumns": {
"region": {
"column": "enabled",
"path": "data.location"
},
"resource_group": {
"type": "string",
"size": 200,
"column": "enabled",
"path": "metadata.azure.resourceGroupName"
},
"subscription_id": {
"column": "enabled",
"label": "Subscription ID",
"path": "metadata.azure.subscriptionId"
},
"access_policies": {
"column": "enabled",
"path": "data.properties.accessPolicies",
"label": "Access Policies",
"type": "string",
"size": 1000
},
"diagnostic_settings": {
"column": "enabled",
"type": "string",
"size": 1000
},
"enable_rbac_authorization": {
"column": "enabled",
"path": "data.properties.enableRbacAuthorization",
"label": "Enable RBAC Authorization",
"type": "boolean"
},
"enabled_for_deployment": {
"column": "enabled",
"path": "data.properties.enabledForDeployment",
"type": "boolean"
},
"enabled_for_disk_encryption": {
"column": "enabled",
"path": "data.properties.enabledForDiskEncryption",
"type": "boolean"
},
"enabled_for_template_deployment": {
"column": "enabled",
"path": "data.properties.enabledForTemplateDeployment",
"type": "boolean"
},
"id": {
"column": "enabled",
"label": "ID"
},
"vault_name": {
"column": "enabled",
"path": "data.name"
},
"sku_family": {
"column": "enabled",
"path": "data.properties.sku.family",
"label": "SKU Family"
},
"sku_name": {
"column": "enabled",
"path": "data.properties.sku.name",
"label": "SKU Name"
},
"soft_delete_enabled": {
"column": "enabled",
"path": "data.properties.enableSoftDelete",
"type": "boolean"
},
"soft_delete_retention_in_days": {
"column": "enabled",
"type": "integer",
"path": "data.properties.softDeleteRetentionInDays"
},
"tags": {
"column": "enabled",
"label": "Tags",
"type": "string",
"size": 1000
},
"tenant_id": {
"column": "enabled",
"path": "data.properties.tenantId",
"label": "Tenant ID"
},
"type": {
"column": "enabled"
},
"vault_uri": {
"column": "enabled",
"path": "data.properties.vaultUri",
"label": "Vault URI"
}
},
".turbot": {
"uri": "tmod:@turbot/azure-keyvault#/definitions/vaultServiceNow",
"modUri": "tmod:@turbot/azure-keyvault"
}
}