RBAC (Role-Based Access Control) for esysflow Project
Table of Contents
- Overview
- System Roles and Responsibilities
- Permission Matrix
- Resource Access Control
- Implementation Guide
- User Workflows
- Access Management Procedures
1. Overview
What is RBAC?
RBAC is a security model that controls system access based on user roles. Instead of giving each user individual permissions, we assign them to roles, and each role has a defined set of permissions.
Why RBAC for esysflow?
esysflow is a complex software development platform with multiple user types: - Engineers: Need to write and review code - Managers: Need oversight and decision authority - QA/Testers: Need testing permissions - DevOps: Need deployment permissions - Admins: Need system management access - Stakeholders: Need read-only dashboards
RBAC ensures: - β Each user gets access they NEED (not everything) - β Automatic consistency across the platform - β Easy to audit who can access what - β Secure by default - β Scales to hundreds of users
RBAC Hierarchy for esysflow
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β System Admin (Root - Access to everything) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β User Management | Security | Infrastructure β
β | & Audit | & Backup β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Engineering Team Structure β
ββββββββββββββ¬βββββββββββββ¬ββββββββββ¬βββββββββββββββββ€
β Tech Lead β Developers β QA Team β DevOps / Ops β
β (Manager) β β β β
β β β β β
β ββSenior β ββMid Dev β ββQA β ββDevOps Eng β
β ββMid Dev β ββJr Dev β ββAutomationβ ββSys Admin β
β ββJr Dev β ββInterns β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Business / Management Layer β
ββββββββββββββ¬βββββββββββββ¬ββββββββββ¬βββββββββββββββββ€
β Product Mgrβ Manager β Analyst β Executive β
ββββββββββββββ΄βββββββββββββ΄ββββββββββ΄βββββββββββββββββ
2. System Roles and Responsibilities
Level 1: System Administrator
Description: Complete system access and control
Typical Responsibilities: - User account management (create/delete/modify) - Role and permission management - System configuration - Server/infrastructure management - Database administration - Security policy enforcement - Audit log management - Backup and recovery - System monitoring and alerts
Who Should Have This: 1-2 trusted senior IT staff members only
Key Permissions:
USER MANAGEMENT:
β CREATE_USER
β DELETE_USER
β MODIFY_USER_PROFILE
β RESET_PASSWORD
β SUSPEND_USER_ACCOUNT
β MANAGE_ROLES
β ASSIGN_ROLES_TO_USERS
SYSTEM ADMINISTRATION:
β MANAGE_SYSTEM_CONFIGURATION
β MANAGE_SECURITY_POLICIES
β CONFIGURE_BACKUP_SYSTEMS
β MANAGE_SERVER_INFRASTRUCTURE
β MANAGE_API_KEYS
β MANAGE_INTEGRATIONS
β CONFIGURE_NOTIFICATIONS
AUDIT & COMPLIANCE:
β VIEW_AUDIT_LOG (complete)
β VIEW_USER_ACTIVITY_LOG
β GENERATE_COMPLIANCE_REPORTS
β EXPORT_LOGS
β MANAGE_RETENTION_POLICIES
SECURITY:
β MANAGE_SECURITY_CERTIFICATES
β MANAGE_ENCRYPTION_KEYS
β MANAGE_FIREWALL_RULES
β MANAGE_IP_WHITELIST
β MANAGE_VPN_ACCESS
What They CANNOT Do:
β Cannot be audited by themselves (must use audit system)
β Cannot override security policies (they enforce them)
Level 2: Engineering Manager / Tech Lead
Description: Team leadership and technical oversight
Team Responsibility: Manages 5-15 engineers
Typical Responsibilities: - Code review and quality approval - Technical architecture decisions - Team work assignment and planning - Release approvals - Performance reviews for team - Setting coding standards - Risk assessment for changes - Mentoring junior developers
Key Permissions:
CODE MANAGEMENT:
β READ_CODE_REPOSITORY
β APPROVE_PULL_REQUESTS
β REJECT_PULL_REQUESTS
β MERGE_TO_MAIN_BRANCH
β CREATE_RELEASE_CANDIDATE
β APPROVE_RELEASE_TO_PRODUCTION
β MANAGE_BRANCH_POLICIES
TEAM MANAGEMENT:
β CREATE_TASKS_FOR_TEAM
β ASSIGN_TASKS_TO_TEAM_MEMBERS
β REASSIGN_TASKS
β CLOSE_TASKS
β CREATE_PROJECT_MILESTONES
β SET_PROJECT_DEADLINES
β MANAGE_TEAM_MEMBERS_ACCESS (limited)
β VIEW_TEAM_PERFORMANCE_METRICS
DOCUMENTATION:
β CREATE_TECHNICAL_DOCUMENTATION
β MODIFY_TECHNICAL_DOCUMENTATION
β DELETE_DOCUMENTATION (own team's only)
β CREATE_ARCHITECTURE_DIAGRAMS
TESTING & DEPLOYMENT:
β DEPLOY_TO_STAGING
β RUN_INTEGRATION_TESTS
β APPROVE_DEPLOYMENT_STAGING
VISIBILITY:
β VIEW_AUDIT_LOG (team actions only)
β VIEW_CODE_QUALITY_REPORTS
β VIEW_BUILD_LOGS
β VIEW_TEST_RESULTS
What They CANNOT Do:
β Cannot deploy to production (DevOps does that)
β Cannot manage other teams
β Cannot create new roles
β Cannot delete repositories
β Cannot access admin settings
Real-World Example:
Sarah is Tech Lead for the Backend Team (8 engineers)
Monday Morning:
1. Receives 4 pull requests from team members
2. Reviews each PR (reads code, checks for bugs)
3. Approves 3 PRs, asks for changes on 1
4. Merges the 3 approved PRs to main branch
5. Runs integration tests - all pass β
Wednesday:
1. Approves feature for staging deployment
2. DevOps engineer deploys to staging
3. Reviews test results from QA team
4. All tests pass β
Friday:
1. Approves release to production
2. DevOps engineer deploys to production
3. Monitors system for issues
4. Everything stable β
Level 3: Senior Developer
Description: Advanced software engineer with code review authority
Typical Responsibilities: - Write high-quality production code - Review junior developers' code - Mentor team members - Debug complex issues - Write integration tests - Create technical documentation - Suggest architectural improvements - Lead features/modules
Key Permissions:
CODE MANAGEMENT:
β READ_CODE_REPOSITORY
β WRITE_CODE_TO_BRANCHES
β CREATE_FEATURE_BRANCHES
β DELETE_PERSONAL_BRANCHES
β SUBMIT_PULL_REQUESTS
β REVIEW_PULL_REQUESTS (can comment, approve)
β RUN_LOCAL_BUILDS
β RUN_UNIT_TESTS
TESTING:
β RUN_TEST_SUITES
β RUN_INTEGRATION_TESTS
β VIEW_TEST_RESULTS
β CREATE_TEST_CASES
β MODIFY_TEST_CASES
DEBUGGING:
β ACCESS_STAGING_ENVIRONMENT
β DEBUG_IN_STAGING
β VIEW_STAGING_LOGS
β VIEW_ERROR_REPORTS
DOCUMENTATION:
β CREATE_API_DOCUMENTATION
β CREATE_TECHNICAL_DOCUMENTATION
β MODIFY_TECHNICAL_DOCUMENTATION
β CREATE_CODE_EXAMPLES
VISIBILITY:
β VIEW_BUILD_LOGS
β VIEW_PROJECT_STATUS
β VIEW_TEAM_TASKS
What They CANNOT Do:
β Cannot merge code to main (Tech Lead does that)
β Cannot deploy to staging or production
β Cannot delete repositories
β Cannot access admin settings
β Cannot create/modify roles
β Cannot view production database
Real-World Example:
John is a Senior Developer on the Backend Team
Tuesday:
1. Writes code for payment processing feature
2. Commits to feature/payment-processing branch
3. Runs local unit tests - all pass β
4. Creates pull request for review
Wednesday:
1. Receives review from another senior dev
2. Updates code based on feedback
3. Other senior dev approves β
Thursday:
1. Tech Lead merges PR to main
2. Automated tests run and pass β
Friday:
1. New code deploys to production β
2. John monitors for issues
3. System stable β
Level 4: Mid-Level Developer
Description: Software engineer with 2-5 years experience
Typical Responsibilities: - Write production code under guidance - Fix bugs assigned to them - Write unit tests - Participate in code reviews - Learn from senior developers - Document their code - Ask questions when uncertain
Key Permissions:
CODE MANAGEMENT:
β READ_CODE_REPOSITORY
β WRITE_CODE_TO_BRANCHES
β CREATE_FEATURE_BRANCHES
β DELETE_PERSONAL_BRANCHES
β SUBMIT_PULL_REQUESTS
β RUN_LOCAL_BUILDS
β RUN_UNIT_TESTS
TESTING:
β RUN_TEST_SUITES
β VIEW_TEST_RESULTS
β CREATE_TEST_CASES
β MODIFY_OWN_TEST_CASES
DEBUGGING:
β ACCESS_STAGING_ENVIRONMENT
β DEBUG_IN_STAGING
β VIEW_STAGING_LOGS
β VIEW_ERROR_REPORTS
VISIBILITY:
β VIEW_BUILD_LOGS
β VIEW_PROJECT_STATUS
β VIEW_ASSIGNED_TASKS
What They CANNOT Do:
β Cannot approve pull requests
β Cannot merge code
β Cannot delete code
β Cannot deploy to staging
β Cannot deploy to production
β Cannot modify test cases by others
β Cannot access production environment
Level 5: Junior Developer / Intern
Description: Entry-level software engineer or intern
Typical Responsibilities: - Write simple features - Fix simple bugs - Write unit tests - Learn coding standards - Get reviewed heavily by seniors - Ask for help when needed - Document their learning
Key Permissions:
CODE MANAGEMENT:
β READ_CODE_REPOSITORY
β WRITE_CODE_TO_OWN_BRANCHES
β CREATE_FEATURE_BRANCHES
β DELETE_PERSONAL_BRANCHES
β SUBMIT_PULL_REQUESTS
β RUN_LOCAL_BUILDS
β RUN_UNIT_TESTS
TESTING:
β RUN_TEST_SUITES
β VIEW_TEST_RESULTS
β CREATE_SIMPLE_TEST_CASES
VISIBILITY:
β VIEW_BUILD_LOGS
β VIEW_ASSIGNED_TASKS
β VIEW_DOCUMENTATION
What They CANNOT Do:
β Cannot delete any code
β Cannot modify branches
β Cannot approve pull requests
β Cannot merge code
β Cannot deploy anywhere
β Cannot modify code by others
β Cannot access production/staging
β Cannot run integration tests
Real-World Example:
Alex is a Junior Developer
Monday:
1. Gets assigned: "Add logout button to navigation"
2. Creates branch: feature/logout-button
3. Writes code for button
4. Writes unit tests for button
5. Runs tests locally - all pass β
6. Commits code and creates PR
7. Asks for review: "Senior devs, please review"
Tuesday:
1. Gets feedback from senior dev
2. Updates code based on feedback
3. Commits updated code
Wednesday:
1. Senior dev approves β
2. Tech Lead merges to main
3. Code automatically tests β
Friday:
1. New button deployed to production β
Level 6: QA Engineer / Test Engineer
Description: Quality assurance and testing specialist
Typical Responsibilities: - Write test plans - Execute manual tests - Create automated test scripts - Find and report bugs - Test on multiple browsers/devices - Verify fixes work - Create test documentation - Ensure code quality
Key Permissions:
TESTING:
β READ_CODE_REPOSITORY (understand what to test)
β RUN_TEST_SUITES
β RUN_INTEGRATION_TESTS
β RUN_PERFORMANCE_TESTS
β VIEW_TEST_RESULTS
β CREATE_TEST_CASES
β CREATE_TEST_PLANS
β MODIFY_TEST_CASES
β EXECUTE_MANUAL_TESTS
ENVIRONMENT ACCESS:
β ACCESS_STAGING_ENVIRONMENT
β ACCESS_DEVELOPMENT_ENVIRONMENT
β VIEW_STAGING_LOGS
β VIEW_ERROR_REPORTS
BUG MANAGEMENT:
β CREATE_BUG_REPORT
β UPDATE_BUG_REPORT (own)
β ASSIGN_BUG_TO_DEVELOPER
β CLOSE_BUG_AFTER_VERIFICATION
β VIEW_BUG_HISTORY
DOCUMENTATION:
β CREATE_TEST_DOCUMENTATION
β VIEW_TECHNICAL_DOCUMENTATION
β MODIFY_TEST_DOCUMENTATION
VISIBILITY:
β VIEW_BUILD_LOGS
β VIEW_PROJECT_STATUS
β VIEW_TEST_COVERAGE_REPORTS
What They CANNOT Do:
β Cannot write production code
β Cannot approve/merge code
β Cannot deploy anywhere
β Cannot modify code by developers
β Cannot access production database
β Cannot delete test cases
Level 7: DevOps / System Operations Engineer
Description: Infrastructure, deployment, and system operations
Typical Responsibilities: - Deploy code to staging/production - Manage servers and infrastructure - Monitor system health - Handle backups and recovery - Manage CI/CD pipelines - Scale systems as needed - Respond to production incidents - Create deployment procedures
Key Permissions:
DEPLOYMENT:
β VIEW_BUILD_LOGS
β APPROVE_DEPLOYMENT_TO_STAGING
β DEPLOY_TO_STAGING
β DEPLOY_TO_PRODUCTION (with approval)
β PERFORM_ROLLBACK
β MANAGE_DEPLOYMENT_PIPELINES
INFRASTRUCTURE:
β MANAGE_SERVERS
β MANAGE_DATABASES
β MANAGE_STORAGE
β CONFIGURE_NETWORKS
β MANAGE_LOAD_BALANCERS
β MANAGE_CACHING_SYSTEMS
MONITORING:
β VIEW_SERVER_LOGS
β VIEW_ERROR_LOGS
β VIEW_SYSTEM_METRICS
β VIEW_PERFORMANCE_DATA
β CREATE_ALERTS
β MODIFY_ALERTS
BACKUP & RECOVERY:
β CREATE_BACKUPS
β RESTORE_FROM_BACKUPS
β MANAGE_BACKUP_POLICIES
β TEST_DISASTER_RECOVERY
VISIBILITY:
β VIEW_AUDIT_LOG (deployment related)
β VIEW_APPLICATION_LOGS
β VIEW_SYSTEM_HEALTH_STATUS
What They CANNOT Do:
β Cannot modify code
β Cannot approve code changes
β Cannot create roles/users
β Cannot access customer data
β Cannot modify security policies
Level 8: Product Manager
Description: Business and product decision maker
Typical Responsibilities: - Decide what features to build - Prioritize work based on business value - Communicate with stakeholders - Define requirements - View progress and metrics - Make release decisions
Key Permissions:
PROJECT MANAGEMENT:
β CREATE_PROJECTS
β MODIFY_PROJECT_DETAILS
β VIEW_PROJECT_STATUS
β CREATE_MILESTONES
β SET_RELEASE_DATES
β PRIORITIZE_FEATURES
β UPDATE_ROADMAP
TASK MANAGEMENT:
β CREATE_TASKS
β MODIFY_TASK_DESCRIPTION
β ASSIGN_TASKS_TO_TEAMS
β SET_TASK_PRIORITY
β VIEW_ALL_TASKS
β TRACK_TASK_STATUS
REQUIREMENTS:
β CREATE_REQUIREMENTS
β MODIFY_REQUIREMENTS
β VIEW_REQUIREMENTS_TRACEABILITY
β APPROVE_REQUIREMENTS
REPORTING:
β VIEW_PROJECT_METRICS
β VIEW_BURN_DOWN_CHARTS
β VIEW_VELOCITY_REPORTS
β GENERATE_STATUS_REPORTS
β VIEW_ROADMAP
VISIBILITY:
β VIEW_TEAM_ASSIGNMENTS
β VIEW_PROJECT_BACKLOG
β VIEW_RELEASE_PLANS
What They CANNOT Do:
β Cannot write code
β Cannot modify code
β Cannot deploy
β Cannot modify technical documentation
β Cannot access system admin features
Level 9: Executive / Stakeholder
Description: High-level visibility and decision authority
Typical Responsibilities: - View project status and KPIs - Make strategic decisions - See financial impacts - Approve major releases - Attend status meetings
Key Permissions:
VISIBILITY:
β VIEW_PROJECT_SUMMARIES
β VIEW_KEY_METRICS
β VIEW_EXECUTIVE_DASHBOARD
β VIEW_ROADMAP
β VIEW_RELEASE_SCHEDULE
β VIEW_BUDGET_INFORMATION
β VIEW_RISK_ASSESSMENTS
REPORTING:
β VIEW_STATUS_REPORTS
β VIEW_KPI_DASHBOARDS
β VIEW_FINANCIAL_SUMMARIES
β GENERATE_EXECUTIVE_REPORTS
DECISIONS:
β APPROVE_MAJOR_FEATURES
β APPROVE_LARGE_EXPENDITURES
β APPROVE_ORGANIZATIONAL_CHANGES
What They CANNOT Do:
β Cannot write code
β Cannot modify requirements
β Cannot assign work
β Cannot deploy
β Cannot access detailed technical information
β Cannot modify system settings
3. Permission Matrix Quick Reference
Code Repository Access
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CODE REPOSITORY PERMISSIONS MATRIX β
ββββββββββββββββββββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββββ€
β Permission βAdmin βTLead βSr. βMid βJr. βQA β
ββββββββββββββββββββββββΌβββββββΌβββββββΌβββββββΌβββββββΌβββββββΌβββββββββ€
β READ_CODE β β β β β β β β β β β β β
β WRITE_CODE β β β β β β β β β β β β β
β APPROVE_CODE β β β β β β β β β β β β β
β MERGE_TO_MAIN β β β β β β β β β β β β β
β DELETE_CODE β β β β β β β β β β β β β
β MANAGE_BRANCHES β β β β β β β β β β β β β
β DELETE_REPOSITORY β β β β β β β β β β β β β
ββββββββββββββββββββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββββββ
Testing and Deployment Access
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TESTING & DEPLOYMENT PERMISSIONS MATRIX β
ββββββββββββββββββββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββ¬βββββ€
β Permission βAdmin βTLead βSr. βQA βDevOpsβJr. β
ββββββββββββββββββββββββΌβββββββΌβββββββΌβββββββΌβββββββΌβββββββΌβββββ€
β RUN_UNIT_TESTS β β β β β β β β β β β β β
β RUN_INTEGRATION_TEST β β β β β β β β β β β β β
β RUN_PERFORMANCE_TEST β β β β β β β β β β β β β
β DEPLOY_TO_STAGING β β β β β β β β β β β β β
β DEPLOY_TO_PRODUCTION β β β β β β β β β β β β β
β APPROVE_DEPLOYMENT β β β β β β β β β β β β β
β PERFORM_ROLLBACK β β β β β β β β β β β β β
ββββββββββββββββββββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββββ΄βββββ
Management and Administration
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β MANAGEMENT & ADMIN PERMISSIONS MATRIX β
ββββββββββββββββββββββββ¬βββββββ¬βββββββ¬βββββββββββ€
β Permission βAdmin βMgr βExec β
ββββββββββββββββββββββββΌβββββββΌβββββββΌβββββββββββ€
β CREATE_USER β β β β β β β
β DELETE_USER β β β β β β β
β MANAGE_ROLES β β β β β β β
β ASSIGN_ROLES β β β β* β β β
β VIEW_AUDIT_LOG β β β β** β β β
β SYSTEM_CONFIGURATION β β β β β β β
β APPROVE_MAJOR_RELEASEβ β β β β β β
β APPROVE_LARGE_SPEND β β β β** β β β
ββββββββββββββββββββββββ΄βββββββ΄βββββββ΄βββββββββββ
* Manager can assign to team members only
** Manager can view own team's activities only
4. Resource Access Control
Code Repositories
Resource: Source code in Git repositories
Access Control:
Public Repositories:
ββ Read: Everyone (all authenticated users)
ββ Write: Developers only
ββ Approve: Senior devs and above
ββ Delete: Admins only
Private Repositories:
ββ Read: Team members + managers
ββ Write: Team members
ββ Approve: Senior devs / Tech leads
ββ Delete: Admins only
Sensitive Repositories (security, keys, etc.):
ββ Read: Authorized personnel only
ββ Write: Restricted to specific people
ββ Approve: Security team + admin
ββ Delete: Admin only with audit trail
Databases
Resource: Production and staging databases
Access Control:
Production Database:
ββ Read: Only DevOps (with logged queries)
ββ Write: DevOps only (for maintenance)
ββ Delete: Never (archive instead)
ββ Access: Restricted IP, VPN, MFA required
Staging Database:
ββ Read: DevOps, QA (with approval)
ββ Write: DevOps, limited QA
ββ Delete: DevOps only
ββ Access: Team network only
Development Database:
ββ Read: All developers
ββ Write: All developers
ββ Delete: All developers
Servers and Infrastructure
Resource: Production and staging servers
Access Control:
Production Servers:
ββ Read: DevOps only (with logging)
ββ Configure: DevOps with approval
ββ Deploy: DevOps with approval
ββ Access: SSH key + MFA required
ββ Monitoring: All ops staff
Staging Servers:
ββ Read: DevOps, QA
ββ Configure: DevOps
ββ Deploy: DevOps, Tech Lead
ββ Access: VPN + SSH key
Development Servers:
ββ Read: All developers
ββ Configure: Senior devs
ββ Deploy: All developers
ββ Access: Network login
Project Management
Resource: Tasks, issues, milestones
Access Control:
All Tasks:
ββ Read: All team members
ββ Create: Tech lead, Product manager
ββ Modify: Owner, Tech lead, Manager
ββ Assign: Tech lead, Manager
ββ Close: Owner, Tech lead
Sensitive Tasks (security, financials):
ββ Read: Authorized personnel only
ββ Create: Manager + security team
ββ Modify: Restricted access
ββ Assign: Manager approval needed
Documentation
Resource: Technical docs, API docs, wikis
Access Control:
Technical Documentation:
ββ Read: All team members
ββ Create: Any developer
ββ Modify: Author, Senior devs, Tech lead
ββ Delete: Tech lead, Admin
API Documentation:
ββ Read: All developers, QA
ββ Create: Senior devs, Tech lead
ββ Modify: Author, Tech lead
ββ Delete: Admin only
Sensitive Documentation (security, architecture):
ββ Read: Senior devs, Tech lead, Managers
ββ Create: Tech lead, Architects
ββ Modify: Tech lead, Architects
ββ Delete: Admin only
5. Implementation Guide
Step 1: Set Up Roles in Your System
In esysflow or your identity management system:
1. System Administrator
- ID: sys_admin
- Level: 1 (highest)
- Parent: None
2. Engineering Manager / Tech Lead
- ID: tech_lead
- Level: 2
- Parent: sys_admin
3. Senior Developer
- ID: senior_dev
- Level: 3
- Parent: tech_lead
4. Mid-Level Developer
- ID: mid_dev
- Level: 4
- Parent: senior_dev
5. Junior Developer
- ID: jr_dev
- Level: 5
- Parent: mid_dev
6. QA Engineer
- ID: qa_eng
- Level: 3
- Parent: tech_lead
7. DevOps Engineer
- ID: devops_eng
- Level: 2
- Parent: sys_admin
8. Product Manager
- ID: product_mgr
- Level: 2
- Parent: None
9. Executive / Stakeholder
- ID: executive
- Level: 2
- Parent: None
Step 2: Assign Permissions to Roles
Example: Senior Developer Role
role:
id: senior_dev
name: Senior Developer
description: Advanced developer with code review authority
permissions:
code_management:
- READ_CODE_REPOSITORY
- WRITE_CODE_TO_BRANCHES
- CREATE_FEATURE_BRANCHES
- DELETE_PERSONAL_BRANCHES
- SUBMIT_PULL_REQUESTS
- REVIEW_PULL_REQUESTS
testing:
- RUN_UNIT_TESTS
- RUN_INTEGRATION_TESTS
- VIEW_TEST_RESULTS
- CREATE_TEST_CASES
environment:
- ACCESS_STAGING_ENVIRONMENT
- DEBUG_IN_STAGING
- VIEW_STAGING_LOGS
documentation:
- CREATE_API_DOCUMENTATION
- MODIFY_API_DOCUMENTATION
visibility:
- VIEW_BUILD_LOGS
- VIEW_PROJECT_STATUS
Step 3: Assign Users to Roles
Example User Assignments:
Users:
ββ john@company.com
β ββ Role: Tech Lead (senior_dev + management permissions)
β
ββ priya@company.com
β ββ Role: Senior Developer (sr_dev)
β
ββ alex@company.com
β ββ Role: Mid-level Developer (mid_dev)
β
ββ emma@company.com
β ββ Role: Junior Developer (jr_dev)
β
ββ sam@company.com
β ββ Role: QA Engineer (qa_eng)
β
ββ marcus@company.com
β ββ Role: DevOps Engineer (devops_eng)
β
ββ rachel@company.com
β ββ Role: Product Manager (product_mgr)
β
ββ david@company.com
ββ Role: System Administrator (sys_admin)
Step 4: Configure Access for Each Environment
Development Environment:
Access:
ββ Developers: Full access (read/write/delete)
ββ QA: Read/test access
ββ Product: Read-only
ββ Managers: Read-only
SSH Access: All developers
VPN: Required
Auth: Username/password or SSH key
Staging Environment:
Access:
ββ Developers: Limited (read only usually)
ββ QA: Full testing access
ββ DevOps: Full access
ββ Managers: Read-only
ββ Product: Read-only
SSH Access: DevOps only
VPN: Required
Auth: SSH key + MFA
Logging: All access logged
Production Environment:
Access:
ββ Developers: NO direct access
ββ QA: NO access
ββ DevOps: Full access (with approval)
ββ Managers: NO access
ββ Product: NO access
ββ Executive: Monitoring dashboard only
SSH Access: DevOps only
VPN: Required
Auth: SSH key + MFA + 2FA
Logging: All access logged, reviewed monthly
Approval: Change approvals required
Audit Trail: Complete and immutable
6. User Workflows
Workflow 1: New Feature Development
Timeline: 2-3 weeks Team: Senior Dev, 2 Mid-level Devs, Tech Lead, QA, DevOps
WEEK 1: PLANNING
βββββββββββββββββ
Product Manager:
1. Creates feature requirement
2. Gets tech lead approval on approach
3. Assigns to tech lead for scheduling
Tech Lead:
1. Reviews requirements
2. Creates tasks for team
3. Assigns developers (1 senior, 2 mid-level)
4. Sets deadlines
WEEK 2: DEVELOPMENT
ββββββββββββββββββββ
Senior Developer:
1. Creates architecture
2. Writes core logic
3. Writes integration tests
4. Reviews junior devs' code
Mid-level Devs (2 people):
1. Create feature branches
2. Write features following architecture
3. Write unit tests
4. Submit pull requests
5. Address code review feedback
All Developers:
1. Run local unit tests: β Pass
2. Commit to feature branches
3. Submit PRs for review
Tech Lead:
1. Reviews all pull requests
2. Approves/requests changes
3. Merges approved PRs to main branch
4. Verifies automated tests pass
QA:
1. Starts testing in development
2. Finds minor bugs
3. Reports to developers
4. Developers fix bugs
WEEK 3: TESTING & RELEASE
ββββββββββββββββββββββββββ
QA:
1. Comprehensive testing in staging
2. Tests on Chrome, Firefox, Safari
3. Tests on desktop and mobile
4. Tests all edge cases
5. Reports all bugs found
Developers:
1. Fix bugs reported by QA
2. Update code in main branch
Tech Lead:
1. Reviews final code quality
2. Confirms all tests pass
3. Approves feature for release
DevOps:
1. Creates deployment package
2. Deploys to staging for QA
3. QA verifies feature in staging β
Tech Lead:
1. Approves release to production
DevOps:
1. Creates backup
2. Deploys to production
3. Monitors system health
4. Verifies feature live β
Product Manager:
1. Communicates feature to customers
2. Updates website/marketing
RESULT: Feature successfully released β
Workflow 2: Bug Fix (Critical Production Bug)
Timeline: 4 hours (emergency) Team: Tech Lead, Senior Dev, QA, DevOps
HOUR 0: ALERT
ββββββββββββββ
Alert System:
1. Monitoring detects error spike
2. Alerts DevOps immediately
DevOps:
1. Investigates issue
2. Isolates to payment module
3. Creates emergency ticket
4. Notifies tech lead
Tech Lead:
1. Receives urgent notification
2. Calls emergency meeting
3. Assigns senior dev immediately
Product Manager:
1. Gets notified
2. Prepares customer communication
HOUR 1: DIAGNOSIS
ββββββββββββββββββ
Senior Developer:
1. Reviews error logs
2. Identifies root cause: payment API timeout
3. Creates hotfix branch: hotfix/payment-timeout
4. Writes fix
5. Writes test case that catches this bug
6. Tests locally: β Passes
Tech Lead:
1. Reviews code immediately
2. Approves quickly β
HOUR 2: TESTING
ββββββββββββββββ
QA:
1. Tests fix in staging
2. Verifies payment now works
3. Confirms no side effects
4. Signs off β
DevOps:
1. Creates backup of production
2. Reviews deployment plan
HOUR 3: DEPLOYMENT
ββββββββββββββββββββ
Tech Lead:
1. Approves emergency deployment
DevOps:
1. Deploys hotfix to production
2. Monitors closely
3. Confirms fix working β
4. Rolls back if issues (automatic)
Tech Lead:
1. Verifies payment working
2. Closes emergency ticket
Product Manager:
1. Sends customer update: "Issue resolved"
HOUR 4: FOLLOW-UP
ββββββββββββββββββ
Tech Lead:
1. Schedules post-mortem
2. Plans permanent fix
Senior Dev:
1. Creates backlog item for better monitoring
2. Plans additional tests
DevOps:
1. Creates alert for future issues
2. Updates incident log
RESULT: Production issue fixed in 4 hours β
Workflow 3: Security Vulnerability Found
Timeline: 2-4 hours (urgent)
Alert Source:
- Automated security scan
- Penetration tester
- Bug bounty report
- Code review finding
STEP 1: CLASSIFICATION (15 min)
βββββββββββββββββββββββββββββββββ
Security Team:
1. Receives vulnerability report
2. Assesses severity (Critical, High, Medium, Low)
3. Creates urgent ticket if Critical/High
4. Notifies tech lead immediately
Tech Lead:
1. Reviews vulnerability details
2. Confirms impact
3. Prioritizes above all other work
STEP 2: FIX DEVELOPMENT (30-60 min)
ββββββββββββββββββββββββββββββββββββ
Senior Developer:
1. Gets detailed vulnerability description
2. Locates affected code
3. Develops fix
4. Writes test that catches vulnerability
5. Tests fix locally
Code Review:
1. Tech lead + security team review
2. Approve quickly if fix is solid
STEP 3: TESTING (15-30 min)
ββββββββββββββββββββββββββββββ
QA + Security Team:
1. Test that fix works
2. Confirm vulnerability is gone
3. Verify no side effects
DevOps:
1. Prepares emergency deployment
STEP 4: DEPLOYMENT (15-30 min)
ββββββββββββββββββββββββββββββββ
Tech Lead:
1. Approves emergency deployment
DevOps:
1. Creates backup
2. Deploys fix to production immediately
3. Monitors closely
4. Verifies fix working
Security Team:
1. Re-runs security scan
2. Confirms vulnerability fixed β
STEP 5: COMMUNICATION (ongoing)
βββββββββββββββββββββββββββββββββ
Security Team:
1. Documents vulnerability
2. Updates security log
3. Prepares incident report
Executives:
1. Get notified if breach occurred
2. Customer communication prepared
Product Manager:
1. Updates status if needed
RESULT: Security vulnerability patched β
Audit Trail: Complete documentation of fix
7. Access Management Procedures
Adding a New User
Process: HR β System Admin β Role Assignment
STEP 1: HR SUBMITS REQUEST
ββββββββββββββββββββββββββ
HR Department:
1. New employee starts date: 2025-12-16
2. Position: Mid-level Developer
3. Team: Backend Team
4. Manager: Sarah (Tech Lead)
5. Submits to System Admin via form
STEP 2: SYSTEM ADMIN CREATES ACCOUNT
ββββββββββββββββββββββββββββββββββββββ
System Admin:
1. Creates user account in system
- Username: priya.singh@company.com
- Email: priya.singh@company.com
- Full Name: Priya Singh
- Department: Engineering
- Manager: Sarah
2. Assigns default password (expires on first login)
3. Sets role: Mid-level Developer (mid_dev)
- Automatically grants permissions:
β READ_CODE_REPOSITORY
β WRITE_CODE_TO_BRANCHES
β CREATE_FEATURE_BRANCHES
β RUN_UNIT_TESTS
etc.
4. Adds to team in project management
- Backend Team Project
- Access level: Developer
5. Logs action in audit trail:
"User 'priya.singh@company.com' created by system_admin
Role assigned: mid_dev
Date: 2025-12-16"
STEP 3: USER CONFIRMS ACCESS
ββββββββββββββββββββββββββββββ
New Employee (Priya):
1. Receives email with temporary password
2. Logs in to esysflow
3. Changes password to permanent one
4. Enables MFA (if required)
5. Tests access:
- Can access code repository? β
- Can see assigned tasks? β
- Can access development environment? β
Manager (Sarah):
1. Confirms Priya has correct access
2. Provides team overview
3. Assigns first task
STEP 4: ONBOARDING COMPLETE
ββββββββββββββββββββββββββββ
Tech Lead (Sarah):
1. Verifies permissions are correct
2. Adds Priya to team meetings
3. Assigns mentor (senior dev)
System Admin:
1. Logs onboarding completion
2. Updates access records
3. Sends security training email
RESULT: New user successfully onboarded with correct access β
Changing User Role
Process: Manager β Tech Lead β System Admin
Scenario: Priya promoted from Mid-level to Senior Developer
STEP 1: APPROVAL
ββββββββββββββββ
Tech Lead (Sarah):
1. Decides Priya is ready for promotion
2. Sends promotion approval form
3. HR approves promotion
4. Sets effective date: 2025-12-31
STEP 2: SYSTEM ADMIN UPDATES
ββββββββββββββββββββββββββββββ
System Admin:
1. Updates user role:
FROM: mid_dev (Mid-level Developer)
TO: senior_dev (Senior Developer)
2. Automatically grants new permissions:
+ REVIEW_PULL_REQUESTS
+ APPROVE_CODE_QUALITY
+ MENTOR_JUNIOR_DEVS
+ RUN_INTEGRATION_TESTS
+ ACCESS_STAGING_ENVIRONMENT
3. Logs role change in audit trail:
"User 'priya.singh@company.com' promoted
Old Role: mid_dev
New Role: senior_dev
Changed by: system_admin
Date: 2025-12-31
Reason: Promotion to Senior Developer"
STEP 3: VERIFICATION
βββββββββββββββββββββ
Priya:
1. Logs in and confirms new permissions
2. Can now review pull requests β
3. Can access staging environment β
Tech Lead (Sarah):
1. Confirms Priya can perform new role duties
2. Adjusts assignments as needed
STEP 4: CELEBRATION
ββββββββββββββββββββ
Team:
1. Acknowledges Priya's promotion
2. Mentions in team meeting
System Admin:
1. Logs completion in HR system
RESULT: User successfully promoted with correct new permissions β
Removing User Access (Termination)
Process: HR β Manager β System Admin β DevOps
Scenario: Developer John is leaving company
STEP 1: HR NOTIFIES (T-2 weeks)
βββββββββββββββββββββββββββββββββ
HR:
1. Informs tech lead of departure date: 2025-12-31
2. Schedules exit interview
3. Notifies system admin
Tech Lead (Sarah):
1. Plans knowledge transfer
2. Reassigns tasks
3. Collects work files
4. Schedules final code review
STEP 2: SYSTEM ADMIN PREPARES (T-1 day)
ββββββββββββββββββββββββββββββββββββββββ
System Admin:
1. Creates backup of John's files:
- Commits in repository
- Email archive
- Project files
2. Notifies all services:
- Git repository host (GitHub/GitLab)
- Project management tool (Jira)
- Collaboration tool (Slack)
- Email system
- VPN system
- All applications
3. Prepares deprovisioning checklist
STEP 3: TERMINATION DATE (T+0)
ββββββββββββββββββββββββββββββ
System Admin (IMMEDIATE):
1. Disables all accounts:
- esysflow account: DISABLED β
- Email: DISABLED β
- GitHub access: REMOVED β
- VPN access: REVOKED β
- Physical badge: DEACTIVATED β
2. Revokes all permissions:
- Removes from all roles
- Removes from all teams
- Revokes API keys
- Removes SSH keys
- Clears session tokens
3. Logs all deprovisioning:
"User 'john.smith@company.com' deprovisioned
Termination date: 2025-12-31
All access removed: [lists all]
Performed by: system_admin
Time: 16:00"
DevOps (Marcus):
1. Removes John's SSH keys from servers
2. Revokes access tokens
3. Backs up any relevant logs
4. Confirms removal:
- John cannot SSH into production β
- John cannot access staging β
- John cannot deploy anything β
STEP 4: VERIFICATION (T+1 day)
βββββββββββββββββββββββββββββββ
System Admin:
1. Verifies John's account completely disabled
2. Tests each system:
- Can he log in? NO β
- Can he access code? NO β
- Can he access projects? NO β
- Can he send email? NO β
3. Confirms all data archived:
- Email backed up β
- Files backed up β
- Code committed β
- Audit trail complete β
Tech Lead (Sarah):
1. Confirms all knowledge transferred
2. Reassigned work complete
3. Confirms John's access removed
STEP 5: FINAL CLEANUP (T+30 days)
ββββββββββββββββββββββββββββββββββ
System Admin:
1. After 30 days, permanently remove account
(keeping archive)
2. Final audit:
- No stray access remaining
- Complete audit trail maintained
- All data properly archived
HR:
1. Confirms employee records updated
2. Archives employment records
RESULT: User access completely removed while maintaining audit trail β
Emergency Access (Crisis Response)
Process for critical production incidents
Scenario: Production database corruption at 2 AM
STEP 1: EMERGENCY ALERT
ββββββββββββββββββββββββ
Monitoring System:
1. Detects issue at 02:15 AM
2. Alerts on-call DevOps engineer
3. Pages entire on-call team
STEP 2: CRISIS TEAM ACTIVATED
ββββββββββββββββββββββββββββββ
On-call Team:
1. Senior DevOps: On-call manager
2. Database Admin: On-call specialist
3. Tech Lead: Senior engineer on-call
STEP 3: EMERGENCY ACCESS GRANTED
ββββββββββββββββββββββββββββββββββ
On-call Manager:
1. Identifies who needs access
2. Calls System Admin (or uses emergency protocol)
System Admin (or automated emergency system):
1. Grants temporary elevated access
2. Database Admin gets:
- FULL_PRODUCTION_DATABASE_ACCESS (temporary)
- PRODUCTION_SERVER_ROOT_ACCESS (temporary)
3. Tech Lead gets:
- PRODUCTION_ACCESS_FOR_DEBUGGING (temporary)
4. Logs emergency access:
"EMERGENCY ACCESS GRANTED
User: Database Admin
Resources: Production database
Reason: Database corruption - 02:15 AM incident
Duration: 1 hour
Approved by: On-call Manager
Timestamp: 02:16 AM"
STEP 4: CRISIS RESPONSE
ββββββββββββββββββββββββ
Database Admin:
1. Investigates corruption
2. Identifies root cause
3. Restores from backup
4. Verifies data integrity
Tech Lead:
1. Monitors recovery
2. Confirms system stability
3. Validates application working
STEP 5: POST-INCIDENT
ββββββββββββββββββββββ
When emergency resolved (03:30 AM):
1. Emergency access AUTOMATICALLY EXPIRES
2. System logs all actions taken
3. Complete audit trail created
STEP 6: INVESTIGATION
ββββββββββββββββββββββ
Next business day:
1. System Admin reviews emergency access logs
2. Tech Lead explains incident details
3. Root cause analysis conducted
4. Prevention plan created
5. Documentation updated
6. Emergency access procedures reviewed
RESULT: Critical incident resolved with documented emergency access β
8. Security Best Practices
Password Policy
Requirements:
- Minimum 12 characters
- Must include: UPPERCASE, lowercase, numbers, special chars
- No dictionary words
- No consecutive characters (aaa, 123)
- Cannot reuse last 5 passwords
- Must change every 90 days
- Expires after 90 days of inactivity
- Account locks after 5 failed attempts (30-min lockout)
Multi-Factor Authentication (MFA)
Required for:
β System Administrators: REQUIRED
β Tech Leads: REQUIRED
β Senior Developers: REQUIRED (especially for production)
β DevOps Engineers: REQUIRED
β All production access: REQUIRED
β All admin access: REQUIRED
Supported Methods:
- Authenticator app (Google Authenticator, Authy)
- SMS text message (as backup only)
- Hardware security keys (FIDO2)
- Biometric (fingerprint, face ID)
Audit Logging
Log all:
β User login/logout
β Permission changes
β Role assignments
β Access to sensitive data
β Code deployments
β Database modifications
β Configuration changes
β Access denials
β Emergency access grants/revokes
β Failed access attempts
Keep for:
- 7 years for compliance
- Immutable (cannot be deleted or modified)
- Encrypted at rest
- Stored in multiple locations
Access Review Schedule
Frequency:
- Weekly: Monitor failed login attempts
- Monthly: Review emergency access grants
- Quarterly: User-level access reviews (managers sign off)
- Semi-annual: Role-based access audits
- Annual: Comprehensive access audit + compliance review
Process:
1. Generate access report
2. Distribute to managers/owners
3. They verify access is current and appropriate
4. Flag any unnecessary access
5. Remove unnecessary access
6. Document findings
Summary
RBAC in esysflow ensures:
β Security: Only authorized people can access sensitive systems β Efficiency: Easy to onboard/offboard users β Accountability: Complete audit trail of who did what β Compliance: Meets regulatory requirements β Scalability: Works from 5 to 5000 users β Consistency: Same rules apply to everyone
Key Takeaways:
- Principle of Least Privilege: Give users only what they need
- Segregation of Duties: One person can't do both sides of a transaction
- Audit Everything: Log all important actions
- Review Regularly: Quarterly access reviews catch problems
- Emergency Procedures: Have processes for critical incidents
- Documentation: Keep everything documented for compliance
Next Steps:
- Implement roles in your system
- Assign permissions to each role
- Train team on their access levels
- Establish audit procedures
- Review quarterly and adjust as needed