Skip to content
Captain-P-Goldfish edited this page Nov 2, 2019 · 12 revisions

SCIM Wiki

This wiki shall provide a description how this project works and how it can be used.

This project is highly generic and allows you to define your own custom endpoints with custom resources by simply creating json documents. It is also possible to add new endpoints to your application during runtime which depends on your customized setup.

The implementation allows you to setup several endpoints that are seperated from one another which allows you to provide several different configurations for different realms. So you might be able to create a realm for managing users, groups, roles etc. and a second realm that is used for handling other resources as OpenID Connect clients or other resources that might be important for your application.

How to start

Create a new instance of ResourceEndpoint and give it a ServiceProvider instance which represents the current ServiceProviderConfiguration.

By default the following endpoints will be registered automatically on the ResourceEndpoint and be available. You do not need to change anything on these endpoints. These endpoints do have full reading access to all registered resource-types schemas and the service provider configuration.

  1. /ServiceProviderConfig
  2. /ResourceTypes
  3. /Schemas

If you for some reason do not want to provide these endpoints you will be able to disable them by overriding their EndpointDefinitions.

So back to the ResourceEndpoint it also needs EndpointDefinitions. An EndpointDefinition is registration type that contains a resource-type schema the main-schema definition of the resource and optional schema-extensions as well as a custom implementation that will handle the resource by storing, reading, updating or deleting it from a database.

defining new endpoints

How to define new endpoints can be looked up here.

how to use the ResourceEndpoint

using the resource endpoint could not be any easier. Create a webapplication that has a single endpoint that reacts on all requests to your SCIM baseUrl e.g.: https://example.com/scim/v2/* So the endpoint should get all calls that extend this URI

now call the method resourceEndpoint.handleRequest("https://example.com/scim/v2/Users?startIndex=1&count=50", HttpMethod.GET, null).

The request will automatically be parsed processed and delegate to your ResourceHandler implemantation for User instances. Eventually a ScimResponse is returned. Any exceptions that extend 'java.lang.Exception' will be catched and be wrapped by a ScimResponse. the ScimResponse object allows you to build a a jax-rs Response that can be used to directly return it from your defined endoint.


NOTE

do not worry, this framework does not deliver a jax-rs provider so you can choose the implementation yourself