Giter VIP home page Giter VIP logo

scimono's Introduction

SAP SCIMono Library

Open source SCIM 2.0 client and server library.

Description

Features

SCIMono provides drop-in support for serving a SCIM v2 API. Supported features:

  • Fully SCIM v2 compliant
  • Support for the following resources: Users, Groups, Schemas
  • Resource paging (index-based as required by SCIM spec. & id-based for custom scenarios)
  • Filtering (full support for SCIM filtering syntax spec.)
  • Any auth method (OAuth, by default)
  • Patch support (complex single-/multi-resource updated)
  • ETags

Requirements

Download and Installation

Download

Clone the repository to your local machine.

git clone https://github.com/SAP/scimono.git
cd scimono

Installation

mvn clean install

Usage

To use it, you need the following Maven dependency:

  <dependency>
      <groupId>com.sap.scimono</groupId>
      <artifactId>scimono-server</artifactId>
      <version>${project.version}</version>
  </dependency>

Exposing an API endpoint is then as easy as:

  import com.sap.scimono.SCIMApplication;
  
  import javax.ws.rs.ApplicationPath;
  
  @ApplicationPath("scim")
  public class MySCIMApi extends SCIMApplication {}

Configuration

Out of the box, you get a default configuration (exposed via the standard /ServiceProvider):

  • 100 resources per page
  • OAuth auth

The default implementation will return 501 Not Implemented for resource operations.

The library provides 5 standard callbacks that plug into the default resources:

  • UsersCallback
  • GroupsCallback
  • SchemasCallback (for exposing custom schemas)
  • ConfigurationCallback
  • ResourceTypesCallback (for exposing custom resource types)

They are instantiated on a per-request basis (multi-tenancy support is straightforward to achieve) and are cached for the lifetime of the request. To use them, override the corresponding methods exposed by SCIMApplication:

import com.sap.scimono.SCIMApplication;
import com.sap.scimono.callback.config.SCIMConfigurationCallback;
import com.sap.scimono.callback.groups.GroupsCallback;
import com.sap.scimono.callback.schemas.SchemasCallback;
import com.sap.scimono.callback.users.UsersCallback;
import com.sap.scimono.callback.users.ResourceTypesCallback;

import javax.ws.rs.ApplicationPath;

@ApplicationPath("scim")
public class MySCIMApi extends SCIMApplication {
  @Override
  public UsersCallback getUsersCallback() {
    return new MongoUserStorage(currentTenant);
  }

  @Override
  public GroupsCallback getGroupsCallback() {
    return new MongoGroupStorage(currentTenant);
  }

  @Override
  public SchemasCallback getSchemasCallback() {
    return new MongoSchemaStorage(currentTenant);
  }

  @Override
  public SCIMConfigurationCallback getConfigurationCallback() {
    return new MySCIMConfiguration();
  }

  @Override
  public ResourceTypesCallback getResourceTypesCallback() {
      return new new MongoResourceTypeStorage(currentTenant);
  }
}

The library also provides an extension point for custom resources. Example snippet:

import com.sap.scimono.SCIMApplication;

import javax.ws.rs.ApplicationPath;
import java.util.Set;

@ApplicationPath("scim")
public class TestApplication extends SCIMApplication {

  @Override
  public Set<Class<?>> getAdditionalResourceProviders() {
    return super.getAdditionalResourceProviders();
  }
}

Limitations

The current features are not currently supported but might be in the future:

  • Passwords
  • Sorting
  • Bulk operations

Known Issues

A list of known issues is available on the GitHub issues page of this project.

How to obtain support

For any question please open an issue in GitHub and make use of the labels in order to refer to the sample and to categorize the kind of the issue.

Contributing

Our aim is to build a lively community, hence, we welcome any exchange and collaboration with individuals and organizations interested in the use, support and extension of the open-source SAP SCIMono Library.

Please follow this document for more information on the process.

To-Do (upcoming changes)

  • We are currently working on client-side support for the SAP SCIMono Library. This will allow easy SCIM 2.0 client implementations.

License

Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file

scimono's People

Contributors

hborisov avatar karaimin avatar vladislavstefanov avatar jorjich avatar parvandobrev avatar andreyakostov avatar jasssonpet avatar priyankasakundarwar avatar sebastien-savalle avatar pskamburov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.