System for Cross-domain Identity Management (SCIM) specification is designed to make managing user identities in cloud-based applications and services easier. The specification suite seeks to build upon experience with existing schemas and deployments, placing specific emphasis on simplicity of development and integration, while applying existing authentication, authorization, and privacy models.
Its intent is to reduce the cost and complexity of user management operations by providing a common user schema and extension model, as well as binding documents to provide patterns for exchanging this schema using standard protocols. In essence: make it fast, cheap, and easy to move users in to, out of, and around the cloud.
More Info on:
https://tools.ietf.org/html/rfc7644
https://tools.ietf.org/html/rfc7643
You can find Java SDK here
https://github.com/suvera/scim2-sdk
This repo contains three components client and server that supports scim2 protocol.
These libraries can be included in any of your GO applications.
go get -u github.com/suvera/goScim2
This library contains SCIM 2.0 compatible Http client.
You can build a client object like below.
TODO: working on
scim can be enabled in your server like below
import (
"http"
"github.com/gorilla/mux"
"github.com/suvera/goScim2/scim2"
)
r := mux.NewRouter()
d := scim2.DefaultHandler{}
# API path prefix "/scim2"
scim2.Server("/scim2", r, d)
http.ListenAndServe(":8090", r)
- You need to implement interface defined in scim2.RequestHandler for full compatibility. scim2.DefaultHandler is default implementation.
curl http://localhost:8090/scim2/ServiceProviderConfig
curl http://localhost:8090/scim2/Schemas
curl http://localhost:8090/scim2/Users
curl http://localhost:8090/scim2/Groups
SCIM search filter parsing capability also provided. You can convert SCIM filter to SQL where clause.
Check the mysql_filter.go for example implementation.
c := mysql.NewMysqlFilterConverter();
c.convert("userName co \"bjensen\"", Map.of("userName", "user_name"));
clause := c.GetClause();
fmt.printf("WHERE clause: %v\n", clause.WhereClause);
fmt.printf("Bind Variables: %v\n", clause.Binds);
Here is the tool to test the compliance level https://github.com/suvera/scim2-compliance-test-utility