ExScim
SCIM 2.0 implementation for Elixir. Adapter-based and modular - bring your own storage, authentication, and resource mapping. Built on RFC 7643, RFC 7644, and RFC 6902.
Packages
| Package | Description |
|---|---|
ex_scim | Core SCIM logic, operations, filter/path parsers |
ex_scim_ecto | Ecto storage adapter (PostgreSQL, MySQL, SQLite) |
ex_scim_phoenix | Phoenix controllers, router, and plugs |
ex_scim_client | HTTP client for consuming SCIM APIs |
Installation
Add the packages you need to mix.exs:
{:ex_scim, "~> 0.1.1"},
{:ex_scim_ecto, "~> 0.1.1"}, # optional: Ecto storage
{:ex_scim_phoenix, "~> 0.1.1"}, # optional: Phoenix endpoints
{:ex_scim_client, "~> 0.1.1"} # optional: HTTP clientQuick Start
Configure ExScim and mount the SCIM routes:
# config/config.exs
config :ex_scim,
base_url: "https://your-domain.com",
storage_strategy: ExScimEcto.StorageAdapter,
storage_repo: MyApp.Repo,
user_model: MyApp.Accounts.User,
group_model: MyApp.Accounts.Group,
auth_provider_adapter: MyApp.Scim.AuthProvider# lib/my_app_web/router.ex
pipeline :scim_api do
plug :accepts, ["json", "scim+json"]
plug ExScimPhoenix.Plugs.ScimContentType
plug ExScimPhoenix.Plugs.ScimAuth
end
scope "/scim/v2" do
pipe_through :scim_api
use ExScimPhoenix.Router
end
All SCIM endpoints are now available under /scim/v2.
Features
- User and Group CRUD with search, filtering, sorting, and pagination
- Bulk operations
- JSON Patch (RFC 6902)
- Discovery endpoints (ServiceProviderConfig, ResourceTypes, Schemas)
- Multi-tenancy support with pluggable tenant resolution
- Replaceable adapters for storage, resource mapping, authentication, and validation
- RFC-compliant error responses
Next Steps
- Configuration & Guides - full config reference, multi-tenancy, custom adapters, endpoint listing