This project implements an automated audit system for change management processes, focusing on segregation of duties (SOD) validation, approver authorization, and deployer verification. The system uses AI-powered agents to analyze change management data and identify compliance issues.
The Change Management Audit Automation system consists of a data extraction agent and several AI-powered validation agents that work together to validate different aspects of the change management process:
- IdentifyChangeMigrationAgent: Extracts and prepares the population of change management records for analysis (non-AI)
- ApproverValidationAgent: Uses AI to validate if approvers have proper authorization
- DeployerValidationAgent: Uses AI to validate if deployers have proper authorization
- SODViolationDetectionAgent: Uses AI to detect segregation of duties violations
- AI-powered analysis using Azure AI Foundry for validation agents
- Data extraction and preparation through non-AI processing
- Asynchronous batch processing for efficient data handling
- Comprehensive validation against IAM user roles and DOA matrices
- Detailed reporting with exception reasons
- Flexible scheduling for periodic execution
The system follows a sequential architecture where data is first extracted and then analyzed:
┌─────────────────────┐ ┌─────────────────────┐
│ Workflow Scheduler │────▶│ Audit Workflow │
└─────────────────────┘ └──────────┬──────────┘
│
▼
┌─────────────────────┐ ┌─────────────────────┐
│ Data Extractor │────▶│ Identify Agent │ (Non-AI data extraction)
└─────────────────────┘ └──────────┬──────────┘
│
│ Extracted Data
▼
┌─────────────────────┐
│ AI-Powered Agents │
│ │
│ - SOD Agent │
│ - Approver Agent │
│ - Deployer Agent │
└─────────────────────┘
This agent is responsible for:
- Loading extraction parameters
- Extracting change migration data based on period and filters
- Validating and cleaning the data
- Computing record count and hash total
- Assembling metadata
- Saving the verified population file for use by AI agents
This agent uses Azure AI Foundry to:
- Load verified population data extracted by the Identify Agent
- Load IAM users data
- Validate approvers against IAM users list using AI analysis
- Check if approvers have the correct role
- Flag unauthorized approvers
- Generate a report with flagged records and reason codes
This agent uses Azure AI Foundry to:
- Load verified population data extracted by the Identify Agent
- Load CI/CD deployment logs
- Load IAM users data
- Validate deployers against IAM users list using AI analysis
- Check if deployers have the correct role
- Flag unauthorized deployers
- Generate a report with flagged records and reason codes
This agent uses Azure AI Foundry to:
- Load verified population data extracted by the Identify Agent
- Identify when the same person performs multiple roles
- Check for violations of role separation principles
- Generate violation reports with detailed reasons
- Save the violation report with metadata
The system supports two execution modes:
- Single Execution: Run a specific workflow once
- Scheduled Execution: Run a workflow periodically at specified intervals
- SOD Workflow: Runs the identification agent to extract data, followed by the SOD violation detection agent
- Approver Validation Workflow: Runs the identification agent to extract data, followed by the approver validation agent
- Deployer Validation Workflow: Runs the identification agent to extract data, followed by the deployer validation agent
python main.py --mode [run|schedule] --workflow [sod|approver|deployer] --interval 5 --duration 60--mode: Operation mode (runfor single execution,schedulefor periodic execution)--workflow: Workflow to execute (sod,approver, ordeployer)--interval: Interval in minutes for periodic execution (default: 5)--duration: Duration in minutes to run the scheduler (default: 60, 0 for indefinite)
- Python 3.8+
- Azure AI Foundry client
- Azure CLI credentials
- Pandas
- Azure Identity
The following environment variables are required:
PROJECT_ENDPOINT: Azure AI Foundry project endpointAGENT_MODEL_DEPLOYMENT_NAME: Azure AI Foundry model deployment name
The system expects the following data files:
- Change migration data
- IAM users data
- CI/CD deployment logs
- DOA matrix data
Each agent generates reports in Excel format with detailed findings and metadata:
- SOD violation reports
- Approver validation reports
- Deployer validation reports
The system logs detailed information about its operations to both the console and a log file (audit_agents.log).
- Create Resource Group
- Create AI Hub (Foundry)
- Create Project (Inside AI Hub - Foundry Project)
- Open "Go To Foundry Portal"
- Create MODEL + ENDPOINTS : GPT -4o
- Provide RBAC access inside Foundry project
- Access Control IAM
- View Access (search "Cognitive Services User")
- Not present, then "Add Role Assignment"
- Click Next, then assign it to: Your user (email)
- Click Review + assign
This guide will help you set up and run the Change Management Automation project after pulling it from GitHub.
Before you begin, ensure you have the following installed:
- Python 3.8 or higher
- Git
- Azure CLI
git clone https://github.com/monaliaich/Change_Management.git
cd Change_Management# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
#Powershell :
.\.venv\Scripts\Activate.ps1
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txt-
Log in to Azure
az login
-
Set up environment variables
Create a
.envfile in the project root with the following variables:PROJECT_ENDPOINT=your_foundry_project_endpoint AGENT_MODEL_DEPLOYMENT_NAME=your_model_deployment_name
Ensure you have the required data files in the appropriate format:
- Place change migration data in the
data/input/directory - Place IAM users data in the
data/input/directory - Place CI/CD deployment logs in the
data/input/directory - Place DOA matrix data in the
data/input/directory
-
Create Resource Group in Azure Portal
-
Create AI Hub (Foundry)
-
Create Project inside AI Hub
-
Open "Go To Foundry Portal"
-
Create MODEL + ENDPOINTS
- Select GPT-4o as the model
- Note the endpoint URL for your
.envfile
-
Provide RBAC access inside Foundry project
- Go to Access Control (IAM)
- View Access (search "Cognitive Services User")
- If not present, click "Add Role Assignment"
- Click Next, then assign it to your user (email)
- Click Review + assign
python src/main.py --workflow sod --mode run
python src/main.py --workflow deployer --mode run
python src/main.py --workflow approver --mode runpython main.py --mode schedule --workflow sod --interval 5 --duration 60
python main.py --mode schedule --workflow deployer --interval 5 --duration 60
python main.py --mode schedule --workflow approver --interval 5 --duration 60Available workflows:
sod: Runs SOD violation detectionapprover: Runs approver validationdeployer: Runs deployer validation
After execution, check the output directory for generated reports:
ls data/output/The reports will be in Excel format with detailed findings and metadata.
-
Authentication Errors:
- Ensure you're logged in with Azure CLI:
az login - Verify your user has the "Cognitive Services User" role in the Foundry project
- Ensure you're logged in with Azure CLI:
-
Missing Environment Variables:
- Check that your
.envfile or system environment variables are correctly set
- Check that your
-
Data Format Issues:
- Ensure your input data files follow the expected format
- Check the logs for any data validation errors
The system logs detailed information to both the console and a log file:
cat audit_agents.log