scim-server 0.3.1

A comprehensive SCIM 2.0 server library for Rust with multi-tenant support and type-safe operations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# SCIM Server

[![Crates.io](https://img.shields.io/crates/v/scim-server.svg)](https://crates.io/crates/scim-server)
[![Documentation](https://docs.rs/scim-server/badge.svg)](https://docs.rs/scim-server)
[![Downloads](https://img.shields.io/crates/d/scim-server.svg)](https://crates.io/crates/scim-server)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Rust](https://img.shields.io/badge/rust-1.75+-blue.svg)](https://www.rust-lang.org)

A comprehensive **SCIM 2.0 server library** for Rust that makes identity provisioning simple, type-safe, and stable.

> **⚠️ DEVELOPMENT WARNING:** This library is under active development and subject to breaking changes until version 0.9.0. Breaking changes will be signaled by semver minor version increments (0.3.0, 0.4.0, etc.), with patch releases (0.3.1, 0.3.2) being non-breaking. Please pin to exact minor versions in production deployments.

> **SCIM (System for Cross-domain Identity Management)** is the industry standard for automating user provisioning between identity providers and applications. Think automatic user onboarding/offboarding across your entire tech stack.

## πŸ—οΈ How It Works: Client β†’ Server β†’ Provider Architecture

The SCIM Server acts as an **intelligent middleware** that handles all provisioning complexity so your applications don't have to:

### **Multiple Ways to Connect**

Connect any type of client through standardized interfaces:

- **🌐 Web Applications** - REST APIs for admin portals, user dashboards, and sync tools
- **πŸ€– AI Assistants** - Natural language provisioning via Model Context Protocol (Claude, ChatGPT, custom bots)
- **⚑ Automation Tools** - CLI scripts for bulk imports, migrations, and DevOps pipelines
- **πŸ”§ Custom Integrations** - GraphQL, gRPC, message queues, webhooks, or any protocol you need

### **The Intelligence Layer**

The SCIM Server core provides enterprise-grade capabilities that would take months to build yourself:

- **πŸ“‹ Dynamic Schema Management** - Define custom resource types with automatic validation
- **πŸ›‘οΈ Type-Safe Validation** - Comprehensive error checking with detailed reporting
- **βš™οΈ Standardized Operations** - Consistent CRUD, filtering, and bulk operations across all resources
- **🏒 Multi-Tenant Architecture** - Built-in organization isolation and configuration management
- **πŸ” Automatic Capabilities** - Self-documenting API features and service provider configuration

### **Flexible Storage Backend**

Choose your data storage strategy without changing your application code:

- **πŸš€ Development** - In-memory providers for testing and prototyping
- **🏒 Enterprise** - Database providers with full ACID compliance
- **☁️ Cloud-Native** - Custom providers for S3, DynamoDB, or any storage system
- **πŸ”„ Multi-Tenant** - Automatic tenant isolation with shared or dedicated infrastructure
- **🏷️ ETag Concurrency Control** - Built-in optimistic locking prevents lost updates

### πŸ’‘ **Value Proposition: Offload Complexity from Your SaaS**

Instead of building provisioning logic into every Rust application:

| **Without SCIM Server** | **With SCIM Server** |
|-------------------------|----------------------|
| ❌ Custom validation in each app | βœ… **Centralized validation engine** |
| ❌ Manual concurrency control | βœ… **Automatic ETag versioning with optimistic locking** |
| ❌ Manual schema management | βœ… **Dynamic schema registry** |
| ❌ Ad-hoc API endpoints | βœ… **Standardized SCIM protocol** |
| ❌ Reinvent capability discovery | βœ… **Automatic capability construction** |
| ❌ Build multi-tenancy from scratch | βœ… **Built-in tenant isolation** |
| ❌ Custom error handling per resource | βœ… **Consistent error semantics with conflict resolution** |
| ❌ Lost updates in concurrent scenarios | βœ… **Version conflict detection and prevention** |

**Result**: Your SaaS applications focus on business logic while the SCIM server handles all provisioning complexity with enterprise-grade capabilities.

## ✨ Why Choose This Library?

- πŸ›‘οΈ **Type-Safe by Design** - Leverage Rust's type system to prevent runtime errors
- 🏒 **Multi-Tenant Ready** - Built-in support for multiple organizations/tenants
- πŸ“‹ **Full SCIM 2.0 Compliance** - Comprehensive implementation of RFC 7643 and RFC 7644
- ⚑ **High Performance** - Async-first with minimal overhead
- πŸ”Œ **Framework Agnostic** - Works with any HTTP framework (Axum, Warp, Actix, etc.)
- 🧩 **Provider Flexibility** - In-memory, database, or custom backends
- πŸ€– **AI-Ready with MCP** - Built-in Model Context Protocol for AI tool integration
- 🎯 **Beyond Users & Groups** - Extensible schema system for any resource type
- πŸ”„ **ETag Concurrency Control** - Optimistic locking prevents lost updates in multi-client scenarios
- 🧡 **Thread-Safe Operations** - Concurrent access safety with atomic version checking
- πŸ“– **Stable & Complete** - Extensive testing (863 tests), logging, and comprehensive error handling

## πŸš€ Quick Start

Add to your `Cargo.toml`:

```toml
[dependencies]
# Pin to exact version for stability during active development
scim-server = "=0.2.3"
tokio = { version = "1.0", features = ["full"] }
serde_json = "1.0"
```

> **Version Pinning Recommended**: Use `=0.2.3` (exact version) instead of `0.2.3` (compatible) to avoid breaking changes during active development.
</newtext>

<old_text>
**Timeline:** Q2 2025 - This will be a breaking change requiring migration

### Minimal Example

```rust
use scim_server::{ScimServer, providers::StandardResourceProvider, storage::InMemoryStorage, resource::RequestContext};
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a SCIM server with in-memory storage
    let storage = InMemoryStorage::new();
    let provider = StandardResourceProvider::new(storage);
    let server = ScimServer::new(provider)?;

    // Create a user with automatic ETag versioning
    let context = RequestContext::with_generated_id();
    let user_data = json!({
        "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
        "userName": "john.doe@example.com",
        "active": true
    });

    let versioned_user = server.provider()
        .create_versioned_resource("User", user_data, &context)
        .await?;

    println!("Created user with ETag: {}", versioned_user.version().to_http_header());
    Ok(())
}
```

### Complete HTTP Server Example

```rust
use scim_server::{ScimServer, providers::StandardResourceProvider, storage::InMemoryStorage, ScimUser};
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let storage = InMemoryStorage::new();
    let provider = StandardResourceProvider::new(storage);
    let server = ScimServer::new(provider);

    // Create a user
    let user_data = json!({
        "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
        "userName": "alice@example.com",
        "name": {
            "givenName": "Alice",
            "familyName": "Smith"
        },
        "emails": [{
            "value": "alice@example.com",
            "primary": true
        }]
    });

    let user = server.create_user("tenant-1", user_data).await?;
    println!("Created user: {}", user.id);

    // Server integrates with your HTTP framework of choice
    // See examples/ for Axum, Warp, and Actix integrations
    Ok(())
}
```

## 🎯 Key Features

### Core SCIM 2.0 Support
- βœ… **Users & Groups** - Full lifecycle management (CRUD operations)
- βœ… **Schema Validation** - Automatic validation against SCIM schemas
- βœ… **Filtering & Pagination** - Efficient queries with SCIM filter syntax
- βœ… **Bulk Operations** - Handle multiple operations in a single request
- βœ… **PATCH Operations** - Complete RFC 7644 PATCH implementation with add/remove/replace operations

### Advanced Capabilities
- πŸ—οΈ **Multi-Tenant Architecture** - Isolate data between organizations
- πŸ” **Automatic Discovery** - Service provider configuration and schema endpoints
- πŸŽ›οΈ **Provider Capabilities** - Automatic feature detection and advertisement
- πŸ“ **Comprehensive Logging** - Structured logging with multiple backends
- πŸ”§ **Value Objects** - Type-safe domain modeling with compile-time validation

### πŸ”„ ETag Concurrency Control

**Enterprise-Grade Optimistic Locking** - Prevent lost updates in multi-client environments:

```rust
use scim_server::{ScimServer, providers::StandardResourceProvider, storage::InMemoryStorage, resource::RequestContext};
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let storage = InMemoryStorage::new();
    let provider = StandardResourceProvider::new(storage);
    let server = ScimServer::new(provider)?;
    let context = RequestContext::with_generated_id();

    // Create user with automatic versioning
    let user_data = json!({
        "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
        "userName": "alice@example.com",
        "active": true
    });

    let versioned_user = server.provider()
        .create_versioned_resource("User", user_data, &context)
        .await?;

    println!("User ETag: {}", versioned_user.version().to_http_header());
    // Output: User ETag: W/"abc123def456"

    // Conditional update - only succeeds if version matches
    let update_data = json!({"active": false});
    let current_version = versioned_user.version();

    match server.provider()
        .conditional_update("User", "123", update_data, current_version, &context)
        .await?
    {
        ConditionalResult::Success(updated) => {
            println!("Update successful! New ETag: {}", updated.version().to_http_header());
        },
        ConditionalResult::VersionMismatch(conflict) => {
            println!("Version conflict detected!");
            println!("Expected: {}, Current: {}", conflict.expected, conflict.current);
            // Handle conflict: refresh, merge, or retry
        },
        ConditionalResult::NotFound => {
            println!("Resource no longer exists");
        }
    }

    Ok(())
}
```

**ETag Features:**
- πŸ”’ **Weak ETags** - Semantic equivalence versioning (`W/"version"`)
- ⚑ **Atomic Operations** - Thread-safe version checking and updates
- πŸ€– **AI Agent Safe** - MCP integration with conflict resolution workflows
- 🏒 **Multi-Tenant** - Version isolation across tenant boundaries
- πŸ“Š **Conflict Resolution** - Structured error responses with resolution guidance

### πŸ” Compile-Time Authentication (NEW in 0.2.1)

**Zero-Cost Security Enforcement** - Catch authentication bugs at compile time, not runtime:

```rust
use scim_server::auth::{
    AuthenticationState, Unauthenticated, Authenticated,
    LinearCredentials, AuthenticationWitness, TenantAuthority
};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Start with unauthenticated state - compile-time enforced
    let mut credentials: LinearCredentials<Unauthenticated> =
        LinearCredentials::new("user123", "tenant456");

    // Authentication consumes credentials (can only happen once)
    let auth_witness: AuthenticationWitness<Authenticated> =
        credentials.authenticate("valid_token").await?;

    // Tenant authority proves compile-time tenant access rights
    let tenant_authority: TenantAuthority =
        auth_witness.verify_tenant_access("tenant456")?;

    // Operations require authentication witness - impossible to bypass
    let protected_data = server
        .get_protected_resource(&auth_witness, &tenant_authority)
        .await?;

    // ❌ This would be a compile error:
    // let data = server.get_protected_resource(); // Missing auth witness

    Ok(())
}
```

**Authentication Features:**
- πŸ›‘οΈ **Compile-Time Security** - Authentication bugs caught during compilation
- πŸ”„ **Linear Credentials** - Can only be used once, preventing replay attacks
- 🏒 **Tenant Isolation** - Type-safe multi-tenant access control
- ⚑ **Zero Runtime Cost** - All checks happen at compile time
- 🎯 **RBAC Support** - Role-based access control with type safety

### Framework Integration
- 🌐 **HTTP Framework Agnostic** - Bring your own web framework
- πŸ”Œ **Operation Handler Foundation** - Clean abstraction for SCIM operations
- πŸ€– **MCP Integration** - Model Context Protocol support for AI tools

### πŸ”§ PATCH Operations (NEW in 0.2.3)

**Complete RFC 7644 PATCH Implementation** - Granular resource updates with full SCIM compliance:

```rust
use scim_server::{ScimServer, providers::StandardResourceProvider, storage::InMemoryStorage, resource::RequestContext};
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let storage = InMemoryStorage::new();
    let provider = StandardResourceProvider::new(storage);
    let server = ScimServer::new(provider)?;
    let context = RequestContext::with_generated_id();

    // Create a user first
    let user_data = json!({
        "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
        "userName": "alice@example.com",
        "active": true,
        "emails": [{"value": "alice@example.com", "primary": true}]
    });

    let user = server.provider()
        .create_resource("User", user_data, &context)
        .await?;

    // PATCH operations: add, remove, replace
    let patch_request = json!({
        "Operations": [
            {
                "op": "replace",
                "path": "active",
                "value": false
            },
            {
                "op": "add",
                "path": "emails",
                "value": {"value": "alice.work@example.com", "type": "work"}
            },
            {
                "op": "remove",
                "path": "emails[type eq \"work\"]"
            }
        ]
    });

    let patched_user = server.provider()
        .patch_resource("User", &user.id, patch_request, &context)
        .await?;

    println!("User updated via PATCH: {}", patched_user.id);
    Ok(())
}
```

**PATCH Features:**
- βœ… **Three Operations** - `add`, `remove`, and `replace` operations per RFC 7644
- βœ… **Path Expressions** - Complex path syntax for nested attributes and arrays
- βœ… **Multi-valued Attributes** - Safe operations on emails, phone numbers, addresses
- βœ… **Schema Validation** - Automatic validation against SCIM schemas
- βœ… **ETag Integration** - Works seamlessly with concurrency control
- βœ… **Atomic Operations** - All-or-nothing PATCH application with rollback

### πŸ€– AI-Powered Identity Management

**Built-in MCP (Model Context Protocol) Support** - Connect AI assistants directly to your identity data:

```rust
use scim_server::{McpServer, ScimServer, providers::StandardResourceProvider, storage::InMemoryStorage};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let storage = InMemoryStorage::new();
    let provider = StandardResourceProvider::new(storage);
    let scim_server = ScimServer::new(provider);

    // Enable MCP for AI tool integration
    let mcp_server = McpServer::new(scim_server);
    mcp_server.start("stdio").await?;

    // Now AI assistants can:
    // - Query users: "Find all users in the engineering department"
    // - Manage groups: "Add Alice to the admin group"
    // - Audit access: "Who has access to the finance system?"
    // - Automate onboarding: "Create accounts for new hire John Doe"

    Ok(())
}
```

**AI Use Cases Enabled:**
- πŸ” **Intelligent Queries** - Natural language user/group searches
- ⚑ **Automated Provisioning** - AI-driven user onboarding/offboarding
- πŸ›‘οΈ **Security Auditing** - AI-powered access reviews and compliance checks
- πŸ“Š **Identity Analytics** - Smart insights into user patterns and group dynamics
- 🀝 **Conversational Admin** - Chat-based identity management operations

**MCP Tools Provided:**
- `list_users` - Query users with natural language filters
- `create_user` - Provision new users with AI validation
- `manage_groups` - Intelligent group membership management
- `audit_access` - Security and compliance reporting
- `bulk_operations` - AI-optimized batch processing

Perfect for building AI-enhanced admin dashboards, chatbots, and automated identity workflows!

### 🎯 Beyond Identity: Custom Resource Management

**SCIM isn't just for users and groups** - it's a powerful foundation for managing ANY structured resource:

```rust
use scim_server::{ScimServer, CustomSchema, ResourceType};
use serde_json::json;

// Define custom schemas for your domain
let device_schema = CustomSchema::builder()
    .id("urn:example:schemas:Device")
    .add_attribute("serialNumber", AttributeType::String, true)
    .add_attribute("manufacturer", AttributeType::String, false)
    .add_attribute("location", AttributeType::Complex, false)
    .add_sub_attribute("location", "building", AttributeType::String)
    .add_sub_attribute("location", "room", AttributeType::String)
    .build();

let mut server = ScimServer::new(provider);
server.register_schema(device_schema)?;

// Now manage devices with full SCIM capabilities
let device = server.create_resource("devices", json!({
    "schemas": ["urn:example:schemas:Device"],
    "serialNumber": "DEV-001",
    "manufacturer": "Acme Corp",
    "location": {
        "building": "HQ",
        "room": "Server Room A"
    }
})).await?;
```

**Real-World Custom Schema Use Cases:**

| Domain | Schema Example | Business Value |
|--------|----------------|----------------|
| πŸ–₯️ **IT Asset Management** | Devices, Software Licenses, Certificates | Automated asset lifecycle, compliance tracking |
| 🏒 **Facility Management** | Rooms, Equipment, Access Cards | Smart building automation, space optimization |
| πŸ“š **Learning Management** | Courses, Certifications, Learning Paths | Skill tracking, compliance training automation |
| πŸ” **Access Control** | Permissions, Roles, Entitlements | Fine-grained authorization, audit trails |
| πŸ’Ό **Business Resources** | Projects, Budgets, Approvals | Workflow automation, resource allocation |
| 🌐 **Cloud Resources** | VMs, Databases, Storage Buckets | Infrastructure as Code, cost management |

**Why SCIM for Custom Resources?**
- βœ… **Standardized API** - Consistent CRUD, filtering, and bulk operations
- βœ… **Schema Validation** - Type safety and data integrity out of the box
- βœ… **Multi-Tenant Ready** - Isolate resources by organization/tenant
- βœ… **Audit & Compliance** - Built-in change tracking and versioning
- βœ… **AI Integration** - Custom resources become AI-queryable via MCP
- βœ… **Enterprise Integration** - Standard protocol for system interoperability

**Transform any data model into a fully-featured API with enterprise-grade capabilities!**

## πŸ“š Examples

| Example | Description |
|---------|-------------|
| [`basic_server`]examples/basic_usage.rs | Simple SCIM server setup |
| [`multi_tenant`]examples/multi_tenant_example.rs | Multi-organization support |
| [`custom_provider`]examples/provider_modes.rs | Custom storage backends |
| [`mcp_integration`]examples/mcp_server_example.rs | AI assistant integration via MCP |
| [`compile_time_auth`]examples/compile_time_auth_example.rs | Type-safe authentication at compile time |
| [`compile_time_rbac`]examples/compile_time_rbac_example.rs | Role-based access control with type safety |
| [`etag_concurrency`]examples/etag_concurrency_example.rs | ETag-based optimistic locking |

## πŸ—οΈ Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   HTTP Layer    β”‚    β”‚   SCIM Server    β”‚    β”‚   Provider      β”‚
β”‚                 β”‚    β”‚                  β”‚    β”‚                 β”‚
β”‚  β€’ Axum         │───▢│  β€’ Validation    │───▢│  β€’ In-Memory    β”‚
β”‚  β€’ Warp         β”‚    β”‚  β€’ Operations    β”‚    β”‚  β€’ Database     β”‚
β”‚  β€’ Actix        β”‚    β”‚  β€’ Multi-tenant  β”‚    β”‚  β€’ Custom       β”‚
β”‚  β€’ Custom       β”‚    β”‚  β€’ Type Safety   β”‚    β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

The library provides a clean separation between:
- **HTTP handling** (your choice of framework)
- **SCIM logic** (validation, operations, multi-tenancy)
- **Data storage** (pluggable providers)

## πŸ“– Documentation

| Resource | Description |
|----------|-------------|
| [πŸ“š API Documentation]https://docs.rs/scim-server | Complete API reference with examples |
| [πŸš€ Quick Start]docs/guides/quick-start.md | Get running in 5 minutes |
| [πŸ”§ PATCH Operations]docs/guides/patch-operations.md | Complete guide to PATCH operations |
| [πŸ“– User Guide]docs/guides/user-guide.md | Step-by-step tutorials |
| [πŸ—οΈ Architecture Guide]docs/guides/architecture.md | Design decisions and patterns |
| [βœ… SCIM Compliance]docs/reference/scim-compliance.md | RFC 7644 implementation details |
| [πŸ“Œ Versioning Strategy]VERSIONING.md | Version pinning and stability guide |

## πŸ—ΊοΈ What's Coming Next

### Version 0.4.0: Additional Storage Backends (Planned)

The next major release will add concrete storage implementations:

```rust
// SQLite storage for local persistence
let storage = SqliteStorage::new("scim.db").await?;
let provider = StandardResourceProvider::new(storage);

// PostgreSQL for enterprise deployments
let storage = PostgresStorage::new("postgresql://...").await?;
let provider = StandardResourceProvider::new(storage);

// Redis for high-performance scenarios
let storage = RedisStorage::new("redis://...").await?;
let provider = StandardResourceProvider::new(storage);
```

**Planned Features:**
- πŸ—„οΈ **SQLite Storage** - Local file-based persistence with migrations
- 🐘 **PostgreSQL Storage** - Enterprise database with connection pooling
- πŸ”΄ **Redis Storage** - High-performance caching and distributed scenarios
- πŸ“„ **MongoDB Storage** - Document-based storage with flexible schemas

**Timeline:** Q4 2025

| Resource | Description |
|----------|-------------|
| [🏒 Multi-Tenancy]docs/api/multi-tenancy.md | Multi-tenant setup and usage |
| [πŸ” Compile-Time Authentication]docs/COMPILE_TIME_AUTHENTICATION.md | Type-safe authentication system |

## πŸ› οΈ Development

```bash
# Clone the repository
git clone https://github.com/pukeko37/scim-server.git
cd scim-server

# Run tests
cargo test

# Run with logging
RUST_LOG=debug cargo run --example basic_usage

# Generate documentation
cargo doc --open
```

### Testing
- **100%** documentation test coverage
- **Comprehensive** integration test suite
- **Multi-tenant** validation scenarios
- **Performance** benchmarks included

## 🀝 Contributing

We welcome contributions! Here's how you can help:

1. πŸ› **Report bugs** via GitHub Issues
2. πŸ’‘ **Suggest features** or improvements
3. πŸ“– **Improve documentation**
4. πŸ”§ **Submit pull requests**

See the repository's contributing guidelines for detailed information on how to contribute.

### Development Principles
- **Type safety first** - Leverage Rust's type system
- **YAGNI compliance** - Build only what's needed now
- **Functional patterns** - Immutable data and pure functions
- **Comprehensive testing** - Every feature thoroughly tested

### πŸ† Stable & Enterprise-Ready

This library is designed for production use with:

- βœ… **Extensive error handling** with detailed error types
- βœ… **Performance optimizations** and benchmarking
- βœ… **Memory safety** guaranteed by Rust
- βœ… **Concurrent access** patterns handled safely
- βœ… **Logging integration** for observability
- βœ… **Documentation** for all public APIs

## πŸ“‹ SCIM 2.0 Compliance

| Feature | Status | RFC Section |
|---------|--------|-------------|
| User Resources | βœ… Complete | RFC 7643 Β§4.1 |
| Group Resources | βœ… Complete | RFC 7643 Β§4.2 |
| Schema Discovery | βœ… Complete | RFC 7644 Β§4 |
| Resource CRUD | βœ… Complete | RFC 7644 Β§3.2-3.5 |
| Filtering | βœ… Complete | RFC 7644 Β§3.4.2.2 |
| Bulk Operations | βœ… Complete | RFC 7644 Β§3.7 |
| Patch Operations | βœ… Complete | RFC 7644 Β§3.5.2 |

**94% SCIM 2.0 Compliance** - See [compliance report](ReferenceNotes/SCIM_2_0_COMPLIANCE_SUMMARY.md) for details.

## πŸ“ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## πŸ™ Acknowledgments

- [SCIM 2.0 Specification]https://tools.ietf.org/html/rfc7644 - The foundation this library implements
- [Rust Community]https://www.rust-lang.org/community - For the amazing ecosystem and support

---

**Ready to get started?** Check out the [Quick Start Guide](docs/guides/quick-start.md) or browse the [examples](examples/).