This repository contains Python scripts designed to automate administrative tasks for Duo Security, including creating admins and generating reports.
Here’s a list of all the scripts in this repository along with their descriptions:
- duo_bulk_create_admins.py: Automates the bulk creation of Duo admins using a list of admin data, useful for onboarding new admins at scale.
- duo_create_admin.py: Creates a single Duo admin, allowing for individual admin onboarding.
- duo_report_users_and_phones.py: Generates a report of all Duo users and their associated phone numbers for security and audit purposes.
- Python 3.x: Ensure that Python 3 is installed on your system.
- Duo SDK: Install the Duo Python SDK to interact with the Duo Admin API.
- API Keys: You will need Duo API credentials (Integration Key, Secret Key, API Hostname) to authenticate API requests.
- Clone this repository:
git clone https://github.com/your-repo-name/duo-automation-scripts.git
- Install the required dependencies:
pip install -r requirements.txt
- Set up your Duo API credentials and other necessary environment variables:
export DUO_INTEGRATION_KEY="your-integration-key" export DUO_SECRET_KEY="your-secret-key" export DUO_API_HOSTNAME="your-api-hostname"
Run the desired script from the command line or integrate it into your existing automation workflows.
Example:
python3 duo_create_admin.py --email "[email protected]" --role "Owner"
Feel free to submit issues or pull requests to improve the functionality or add new features.
This project is licensed under the MIT License.