Rotating local and remote user accounts on Azure Virtual Machines with Keeper
In this guide, you'll learn how to rotate Azure Virtual Machine local and remote user accounts within the Azure environment using Keeper Rotation. For a high-level overview on the rotation process in the Azure network, visit this page.
This guide assumes the following tasks have already taken place:
Keeper Secrets Manager is enabled for your enterprise and your role
Keeper Rotation is enabled for your role
A Keeper Secrets Manager application has been created.
Your Azure environment is configured
A Keeper Rotation gateway is already installed, running, and is able to communicate via SSH or WinRM with your target Azure Virtual Machine(s).
PowerShell is available on all Windows machines and bash on all Linux machines
Keeper can rotate any local user account on either the Gateway machine or any other machine on the network. A PAM Machine record should be created for every machine. This PAM Machine record should contain an administrative credential that has the rights to change passwords for users on the machine.
Once a PAM Machine record is created for every machine, a PAM User record needs to be created for each user account that will be rotated. The PAM Machine record can also be rotated.
The following table lists all the required fields that needs to be filled on the PAM Machine records.
Title
Name of the Record e.g. Windows Machine 1
Hostname or IP Address
Machine hostname or IP as accessed by the Gateway, e.g. 10.0.1.4
Port
Typically 5985 or 5986 for WinRM, 22 for SSH
Login
Username of the Administrator account
Password
Required for WinRM
Optional for SSH if your setup requires a password, otherwise can use PEM key.
Note: The following chars are restricted: " '
Private PEM Key
Required for SSH if not using a password
Operating System
The VM Operating System: Windows
or Linux
SSL Verification
For WinRM, if selected, will use SSL mode port 5986. Ignored for SSH. See this section for troubleshooting tips
If you already have a PAM Configuration for your Azure environment, you can simply add the additional Resource Credentials required for rotating machine users to the existing PAM Configuration.
Make sure the following items are completed first:
A Keeper Secrets Manager application has been created
A Keeper Rotation gateway is already installed, running, and is provisioned in the Keeper Secrets Manager application you created.
PAM Machine records have been created for each target machine
If you are creating a new PAM Configuration, login to the Keeper Vault and select "Secrets Manager", then select the "PAM Configurations" tab, and click on "New Configuration". The following table lists all the required fields that needs to be filled on the PAM Configuration.
Title
Configuration name, example: Azure Demo
Environment
Select: Azure Network
Gateway
Select the Gateway that is configured on the Keeper Secrets Manager application and has network access to your Active Directory server from the pre-requisites
Application Folder
Select the Shared folder that contains the PAM Machine record(s)
Resource Credential(s)
Select the PAM Machine record containing the admin credentials with sufficient permissions to rotate local user passwords. Important: If there are multiple machines being rotated, each PAM Machine record needs to be added as a Resource Credential.
Azure ID
A unique ID for this instance of Azure. This is for your reference and can be anything, but its recommended to be kept short
Ex: Azure-prod
Client ID
The unique Application (client) ID assigned to your app by Azure AD when the application was registered.
Client Secret
The client credentials secret for the Azure application.
Subscription ID
The UUID that identifies your subscription (i.e. Pay-As-You-GO) to use Azure services.
Tenant ID
The UUID of the Azure Active Directory
For more details on all the configurable fields in the PAM Network Configuration record, visit this page.
If a Gateway has already been deployed to an existing PAM Configuration, you can simply adjust the configuration to include additional Administrative Resource Credentials as needed.
In the example below, there are 5 local admin PAM Machine records, one for each VM in Azure. Each of the accounts is used to rotate credentials for local users in each respective machine.
Keeper Rotation will use the credentials in the PAM Machine record to rotate the credentials of accounts referenced by the PAM User records.
The following table lists all the required fields that need to be filled on the PAM User record:
Title
Keeper record title i.e. Local User1
Login
Case sensitive username of the account being rotated. The username has to be in one of the following formats:
domain\username
username@domain
Password
Account password is optional, rotation will set one if blank
Select the PAM User record(s) from Step 3, edit the record and open the "Password Rotation Settings".
Select the desired schedule and password complexity.
The "Rotation Settings" should use the PAM Configuration setup previously.
The "Resource Credential" field should select the PAM Machine admin credential specific to this user's machine.
Upon saving, the rotation button will be enabled and available to rotate on demand, or via the selected schedule.
Any user with edit
rights to a PAM User record has the ability to setup rotation for that record.
Optionally, the PAM Machine credential can also be rotated. Select the PAM Machine record from Step 1, edit the record and open the "Password Rotation Settings".
Select the desired schedule and password complexity.
The "Rotation Settings" should use the PAM Configuration setup previously.
The "Resource Credential" field should select the PAM Machine which can rotate the credential.
Upon saving, the rotation button will be enabled and available to rotate on demand, or via the selected schedule.