Skip to content
/ ex_scim Public

Elixir SCIM 2.0 implementation (RFC 7643/7644) with Ecto and Phoenix integrations

License

Notifications You must be signed in to change notification settings

ExScim/ex_scim

Repository files navigation

ExScim

CI

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 client

Quick 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

Documentation

Full configuration reference, multi-tenancy guide, custom adapter examples, and endpoint listing are available on HexDocs.

Example

The examples/provider app demonstrates a complete SCIM server with Phoenix, Ecto, and SQLite:

cd examples/provider
mix deps.get && mix ecto.setup
mix phx.server

Development

Run all tests from the umbrella root:

mix test

Or test a single package:

cd apps/ex_scim && mix test

License

MIT

About

Elixir SCIM 2.0 implementation (RFC 7643/7644) with Ecto and Phoenix integrations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages