Rotate your Cisco IOS XE Network Credentials
In this guide, you will learn how to set up password rotation to rotate Cisco IOS XE network credentials.
KSM Application: Ensure that the Keeper Secrets Manager (KSM) application is set up.
Shared Folder: A shared folder should be set up where all the records will be stored.
PAM Configuration: Ensure that the PAM Configuration is set up and that the Gateway is running and attached to this configuration.
Requests Library: Ensure that the requests library is installed in your Python environment. This library is necessary for making HTTP requests to Cisco devices.
Setting up AnyConnect Cisco VPN: In order to connect to cisco devices, ensure that the machine hosting Keeper Gateway has Cisco AnyConnect VPN installed and properly configured
Test Cisco Device Connectivity
The Requests library allows you to send HTTP requests easily. Activate a Python virtual environment in your Keeper Gateway environment and install the library using the following command:
Ensure that the machine hosting Keeper Gateway has Cisco AnyConnect VPN installed and properly configured in order to connect to cisco device. This setup is necessary for establishing secure connections to Cisco devices.
Following these steps will allow you to test the Cisco device and create a new user in the Cisco sandbox environment.
Note: If you want to use a virtual environment, add a shebang line at the top of the script as documented here in the Python Environment Setup.
Go to the Cisco DevNet Sandbox
Log in with your Cisco account credentials.
Select and launch the sandbox.
Navigate to the sandbox catalog.
Select the appropriate sandbox for your Cisco device (e.g., Cisco IOS XE, etc.).
Launch the sandbox.
After launching the sandbox, you will receive an email with the connection details or find them in the DevNet Environment under Quick Access.
Download and install the Cisco AnyConnect Secure Mobility Client.
Get detailed connection instructions here.
Open the Cisco AnyConnect Secure Mobility Client.
Enter the VPN connection details provided in the email or from the DevNet Environment.
Connect using the provided username and password.
At this point, you will see Developer Credentials—a host, username, and password. Store these values in a Keeper Security record of type Login
named as Cisco Authentication Record
. You will need this Keeper Security record name in order to run the post-rotation script.
Add a custom field named host_endpoint
to the Cisco Authentication Record and set its value to the host address (e.g., 10.10.20.48
).
Open your terminal or SSH client.
Connect to the Cisco device using the provided IP address and credentials.
Login with Admin User (developer):
Enable privileged commands:
Enter configuration mode:
Create a new user with a password:
Login with the new user:
Note: Replace
<user>
with the username you created and<device-ip>
with the IP address of the Cisco device.
Once you have your prerequisites ready, make sure you cover the following:
Make sure you satisfy all the prerequisites
Ensure that the post-rotation script references the Keeper Security record containing your Cisco admin credentials.
Attach the post-rotation script to a Keeper Security PAM user record using the Keeper Security documentation. When this record has its secrets rotated, the post-rotation script will execute and update the password for the specified Cisco device user.
Create a new PAM User record to store Cisco User details whose password will be rotated.
Set the username to match the Cisco device admin credentials
Set the password to the current password set for the user.
Add a custom field named host_endpoint
to the Cisco Authentication Record and set its value to the host address (e.g., 10.10.20.48
).
Attach the below Python script that will perform the password rotation. The script has additional comments inside that describe each line.
Enable No-Operation (NOOP) atomic execution:
In the current PAM User record where user's details are stored, create a new custom text field labeled NOOP
and set its value to True
.
Rotation Type: Set it to "On-Demand" for this example.
Password Complexity: Leave it as default unless you have specific requirements.
Rotation Settings: Point to the PAM Configuration set up earlier.
Administrative Credentials Record: Can should be left empty
PAM script to rotate Cisco IOS XE user credentials:
The above script for the Cisco Post-Rotation Script can be also found here:
Note: The user whose password is getting rotated should not be an administrator and must be Authorized for Client VPN [While adding the user via user management portal, the authorized option should be selected as 'Yes'].
After successfully setting up Rotation for your Cisco User Credentials on the PAM User Record, clicking on "Run Scripts Only" will rotate the credential:
Rotate your Cisco Meraki Network Credentials
In this guide, you will learn how to set up password rotation to rotate Cisco Meraki network credentials.
KSM Application: Ensure that the Keeper Secrets Manager (KSM) application is set up.
Shared Folder: A shared folder should be set up where all the records will be stored.
PAM Configuration: Ensure that the PAM Configuration is set up and that the Gateway is running and attached to this configuration.
Requests Library: Ensure that the requests library is installed in your Python environment. This library is necessary for making HTTP requests to Cisco devices.
Setting up AnyConnect Cisco VPN: In order to connect to cisco devices, ensure that the machine hosting Keeper Gateway has Cisco AnyConnect VPN installed and properly configured
Test Cisco Device Connectivity
The Requests library allows you to send HTTP requests easily. Activate a Python virtual environment in your Keeper Gateway environment and install the library using the following command:
Ensure that the machine hosting Keeper Gateway has Cisco AnyConnect VPN installed and properly configured inorder to connect to cisco device. This setup is necessary for establishing secure connections to Cisco devices.
Following these steps will allow you to test the Cisco device and create a new user in the Cisco sandbox environment.
Note: If you want to use a virtual environment, add a shebang line at the top of the script as documented here in the Python Environment Setup.
Go to the Cisco DevNet Sandbox
Log in with your Cisco account credentials.
Select and launch the sandbox.
Navigate to the sandbox catalog.
Select the appropriate sandbox for your Cisco device (e.g., Cisco IOS XE, etc.).
Launch the sandbox.
After launching the sandbox, you will receive an email with the connection details or find them in the DevNet Environment under Quick Access.
Download and install the Cisco AnyConnect Secure Mobility Client.
Get detailed connection instructions here.
Open the Cisco AnyConnect Secure Mobility Client.
Enter the VPN connection details provided in the email or from the DevNet Environment.
Connect using the provided username and password.
At this point, you will see Developer Credentials—a host, username, and password. Store these values in a Keeper Security record of type Login
named as Cisco Authentication Record
. You will need this Keeper Security record name in order to run the post-rotation script.
Add a custom field named network_id
to the Cisco Authentication Record and set its value to the host address (e.g., 13.0.0.1
).
Open your terminal or SSH client.
Connect to the Cisco device using the provided IP address and credentials.
Login with Admin User (developer):
Enable privileged commands:
Enter configuration mode:
Create a new user with a password:
Login with the new user:
Note: Replace
<user>
with the username you created and<device-ip>
with the IP address of the Cisco device.
Once you have your prerequisites ready, make sure you cover the following:
Make sure you satisfy all the prerequisites
Ensure that the post-rotation script references the Keeper Security record containing your Cisco admin credentials.
Attach the post-rotation script to a Keeper Security PAM user record using the Keeper Security documentation. When this record has its secrets rotated, the post-rotation script will execute and update the password for the specified Cisco device user.
Create a new PAM User record to store Cisco User details whose password will be rotated.
Set the username to match the Cisco device admin credentials
Set the password to the current password set for the user.
Add a custom field named network_id
to the Cisco Authentication Record and set its value to the host address (e.g., 13.0.0.1
).
Attach the below Python script that will perform the password rotation. The script has additional comments inside that describe each line.
Enable No-Operation (NOOP) atomic execution:
In the current PAM User record where user's details are stored, create a new custom text field labeled NOOP
and set its value to True
.
Rotation Type: Set it to "On-Demand" for this example.
Password Complexity: Leave it as default unless you have specific requirements.
Rotation Settings: Point to the PAM Configuration set up earlier.
Administrative Credentials Record: Can should be left empty
PAM script to rotate Cisco Meraki user credentials:
The above script for the Cisco Post-Rotation Script can be also found here:
Note: The user whose password is getting rotated should not be an administrator and must be Authorized for Client VPN [While adding the user via user management portal, the authorized option should be selected as 'Yes'].
After successfully setting up Rotation for your Cisco User Credentials on the PAM User Record, clicking on "Run Scripts Only" will rotate the credential: