Scim Provisioning
Skill Profile
(Select at least one profile to enable specific modules)
Overview
SCIM (System for Cross-domain Identity Management) 2.0 is a standard protocol for automated user provisioning and deprovisioning. It enables Identity Providers (IdPs) like Okta and Azure AD to push user lifecycle events to your application in real-time, eliminating manual user management and ensuring consistent access control across all enterprise applications.
Why This Matters
- Operational Efficiency: Automates user lifecycle management, saving IT admins hours of manual work
- Security Compliance: Ensures immediate deactivation of departing employees, preventing orphaned accounts
- Data Consistency: Keeps user attributes synchronized across all enterprise applications in real-time
- Enterprise Readiness: SCIM is a standard requirement for large enterprise deals
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- SCIM HTTP requests (POST, PATCH, DELETE)
- Bearer token for authentication
- User/group data in SCIM JSON format
- Filter queries for listing resources
- Entry Conditions:
- Database initialized with users, groups tables
- SSO integration implemented
- Bearer token validation configured
- Outputs:
- SCIM-compliant JSON responses
- Error responses with proper SCIM format
- User/group creation, update, deactivation
- Artifacts Required (Deliverables):
- SCIM server implementation (all required endpoints)
- Database schema for users and groups
- Authentication middleware for bearer tokens
- SCIM filter parser
- IdP configuration documentation
- Acceptance Evidence:
- SCIM test suite passing (Runscope SCIM Validator)
- Integration tests with Okta, Azure AD, OneLogin
- User provisioning/deprovisioning working end-to-end
- Audit logs capturing all SCIM operations
- Success Criteria:
- All SCIM 2.0 required endpoints implemented
- SCIM test suite passes with 100% compliance
- User provisioning works with at least 3 IdPs
- Provisioning success rate > 99%
- Response time < 1 second p95
Skill Composition
- Depends on: SSO (SAML & OIDC), Database Design
- Compatible with: Enterprise RBAC Models, Security Questionnaires, Vendor Onboarding
- Conflicts with: None
- Related Skills: SSO (SAML & OIDC), Enterprise RBAC Models
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: scim-provisioning3description: SCIM (System for Cross-domain Identity Management) 2.0 is a standard Use when this capability is needed.4---56# Scim Provisioning78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17SCIM (System for Cross-domain Identity Management) 2.0 is a standard protocol for automated user provisioning and deprovisioning. It enables Identity Providers (IdPs) like Okta and Azure AD to push user lifecycle events to your application in real-time, eliminating manual user management and ensuring consistent access control across all enterprise applications.1819## Why This Matters20- **Operational Efficiency**: Automates user lifecycle management, saving IT admins hours of manual work21- **Security Compliance**: Ensures immediate deactivation of departing employees, preventing orphaned accounts22- **Data Consistency**: Keeps user attributes synchronized across all enterprise applications in real-time23- **Enterprise Readiness**: SCIM is a standard requirement for large enterprise deals2425---2627## Core Concepts & Rules2829### 1. Core Principles30- Follow established patterns and conventions31- Maintain consistency across codebase32- Document decisions and trade-offs3334### 2. Implementation Guidelines35- Start with the simplest viable solution36- Iterate based on feedback and requirements37- Test thoroughly before deployment383940## Inputs / Outputs / Contracts41* **Inputs**:42 - SCIM HTTP requests (POST, PATCH, DELETE)43 - Bearer token for authentication44 - User/group data in SCIM JSON format45 - Filter queries for listing resources46* **Entry Conditions**:47 - Database initialized with users, groups tables48 - SSO integration implemented49 - Bearer token validation configured50* **Outputs**:51 - SCIM-compliant JSON responses52 - Error responses with proper SCIM format53 - User/group creation, update, deactivation54* **Artifacts Required (Deliverables)**:55 - SCIM server implementation (all required endpoints)56 - Database schema for users and groups57 - Authentication middleware for bearer tokens58 - SCIM filter parser59 - IdP configuration documentation60* **Acceptance Evidence**:61 - SCIM test suite passing (Runscope SCIM Validator)62 - Integration tests with Okta, Azure AD, OneLogin63 - User provisioning/deprovisioning working end-to-end64 - Audit logs capturing all SCIM operations65* **Success Criteria**:66 - All SCIM 2.0 required endpoints implemented67 - SCIM test suite passes with 100% compliance68 - User provisioning works with at least 3 IdPs69 - Provisioning success rate > 99%70 - Response time < 1 second p957172## Skill Composition73* **Depends on**: SSO (SAML & OIDC), Database Design74* **Compatible with**: Enterprise RBAC Models, Security Questionnaires, Vendor Onboarding75* **Conflicts with**: None76* **Related Skills**: [SSO (SAML & OIDC)](file://50-enterprise-integrations/sso-saml-oidc/SKILL.md), [Enterprise RBAC Models](file://50-enterprise-integrations/enterprise-rbac-models/SKILL.md)7778---7980## Quick Start / Implementation Example81821. Review requirements and constraints832. Set up development environment843. Implement core functionality following patterns854. Write tests for critical paths865. Run tests and fix issues876. Document any deviations or decisions8889```python90# Example implementation following best practices91def example_function():92 # Your implementation here93 pass94```959697## Assumptions / Constraints / Non-goals9899* **Assumptions**:100 - Development environment is properly configured101 - Required dependencies are available102 - Team has basic understanding of domain103* **Constraints**:104 - Must follow existing codebase conventions105 - Time and resource limitations106 - Compatibility requirements107* **Non-goals**:108 - This skill does not cover edge cases outside scope109 - Not a replacement for formal training110111112## Compatibility & Prerequisites113114* **Supported Versions**:115 - Python 3.8+116 - Node.js 16+117 - Modern browsers (Chrome, Firefox, Safari, Edge)118* **Required AI Tools**:119 - Code editor (VS Code recommended)120 - Testing framework appropriate for language121 - Version control (Git)122* **Dependencies**:123 - Language-specific package manager124 - Build tools125 - Testing libraries126* **Environment Setup**:127 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)128129130## Test Scenario Matrix (QA Strategy)131132| Type | Focus Area | Required Scenarios / Mocks |133| :--- | :--- | :--- |134| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |135| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |136| **E2E** | User Journey | Critical user flows to test |137| **Performance** | Latency / Load | Benchmark requirements |138| **Security** | Vuln / Auth | SAST/DAST or dependency audit |139| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |140141142## Technical Guardrails & Security Threat Model143144### 1. Security & Privacy (Threat Model)145* **Top Threats**: Injection attacks, authentication bypass, data exposure146- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII147- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager148- [ ] **Authorization**: Validate user permissions before state changes149150### 2. Performance & Resources151- [ ] **Execution Efficiency**: Consider time complexity for algorithms152- [ ] **Memory Management**: Use streams/pagination for large data153- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks154155### 3. Architecture & Scalability156- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection157- [ ] **Modularity**: Decouple logic from UI/Frameworks158159### 4. Observability & Reliability160- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`161- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`162- [ ] **Error Handling**: Standardized error codes, no bare except163- [ ] **Observability Artifacts**:164 - **Log Fields**: timestamp, level, message, request_id165 - **Metrics**: request_count, error_count, response_time166 - **Dashboards/Alerts**: High Error Rate > 5%167168169## Agent Directives & Error Recovery170*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*171172- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.173- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.174- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.175- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.176177178## Definition of Done (DoD) Checklist179180- [ ] Tests passed + coverage met181- [ ] Lint/Typecheck passed182- [ ] Logging/Metrics/Trace implemented183- [ ] Security checks passed184- [ ] Documentation/Changelog updated185- [ ] Accessibility/Performance requirements met (if frontend)186187188## Anti-patterns / Pitfalls189190* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries191* ⚠️ **Watch out for**: Common symptoms and quick fixes192* 💡 **Instead**: Use proper error handling, pagination, and logging193194195## Reference Links & Examples196197* Internal documentation and examples198* Official documentation and best practices199* Community resources and discussions200201202## Versioning & Changelog203204* **Version**: 1.0.0205* **Changelog**:206 - 2026-02-22: Initial version with complete template structure207208---209> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.210<!-- tomevault:4.0:skill_md:2026-04-13 -->