From 068da60712ce8ccc260513b564bd862b110deadd Mon Sep 17 00:00:00 2001 From: Jim Kalafut Date: Fri, 19 Oct 2018 13:48:15 -0700 Subject: [PATCH] Update Azure Secrets docs (#5554) Add coverage of application_object_id parameter. --- website/source/api/secret/azure/index.html.md | 12 ++-- .../source/docs/secrets/azure/index.html.md | 70 +++++++++++++++---- 2 files changed, 64 insertions(+), 18 deletions(-) diff --git a/website/source/api/secret/azure/index.html.md b/website/source/api/secret/azure/index.html.md index 7fba82016c..f51832ccdf 100644 --- a/website/source/api/secret/azure/index.html.md +++ b/website/source/api/secret/azure/index.html.md @@ -112,9 +112,10 @@ $ curl \ ## Create/Update Role -Create or update a Vault role. The provided Azure roles must exist -for this call to succeed. See the Azure secrets [roles docs][roles] -for more information about roles. +Create or update a Vault role. Either `application_object_id` or +`azure_roles` must be provided, and these resources must exist for this +call to succeed. See the Azure secrets [roles docs][roles] for more +information about roles. | Method | Path | Produces | | :------- | :------------------------| :------------------------ | @@ -123,9 +124,12 @@ for more information about roles. ### Parameters -- `azure_roles` (`string: `) - List of Azure roles to be assigned to the generated service +- `azure_roles` (`string: ""`) - List of Azure roles to be assigned to the generated service principal. The array must be in JSON format, properly escaped as a string. See [roles docs][roles] for details on role definition. +- `application_object_id` (`string: ""`) - Application Object ID for an existing service principal that will + be used instead of creating dynamic service principals. If present, `azure_roles` will be ignored. See + [roles docs][roles] for details on role definition. - `ttl` (`string: ""`) – Specifies the default TTL for service principals generated using this role. Accepts time suffixed strings ("1h") or an integer number of seconds. Defaults to the system/engine default TTL time. - `max_ttl` (`string: ""`) – Specifies the maximum TTL for service principals generated using this role. Accepts time diff --git a/website/source/docs/secrets/azure/index.html.md b/website/source/docs/secrets/azure/index.html.md index 90eb26f5c2..6ce133ac7c 100644 --- a/website/source/docs/secrets/azure/index.html.md +++ b/website/source/docs/secrets/azure/index.html.md @@ -19,6 +19,10 @@ Each service principal is associated with a Vault lease. When the lease expires (either during normal revocation or through early revocation), the service principal is automatically deleted. +If an existing service principal is specified as part of the role configuration, +a new password will be dynamically generated instead of a new service principal. +The password will be deleted when the lease is revoked. + ## Setup Most secrets engines must be configured in advance before they can perform their @@ -50,10 +54,16 @@ management tool. If you are running Vault inside an Azure VM with MSI enabled, `client_id` and `client_secret` may be omitted. For more information on authentication, see the [authentication](#authentication) section below. -1. Configure a role. Roles determine the permissions that the service principal -generated by Vault will have to Azure resources. +1. Configure a role. A role may be set up with either an existing service principal, or +a set of Azure roles that will be assigned to a dynamically created service principal. - To configure a role called "my-role": +To configure a role called "my-role" with an existing service principal: + + ```text + $ vault write azure/roles/my-role application_object_id= ttl=1h + ``` + + Alternatively, to configure the role to create a new service principal with Azure roles: ```text $ vault write azure/roles/my-role ttl=1h azure_roles=-<