Overview

Connector application is the wrapper application to the different scim adapters

Authentication

  • Basic Authentication is required
  • The encrypted values of username and password will be stored in the properties file

Resource Type

These are the two resource types available for the IDHUB connector. The "resourceName" attribute value in rest api calls will have one of these values.

  • Account - user account in the target system - this will include entitlement membership
  • Entitlement -available entitlements in the target system

REST API for Downstream Synchronization

GET /scim/v2/ServiceProviderConfig

Get Service Provider Configuration

Get the service provider configuration from the file
Return a JSON object with the service provider configuration
VB

GET /scim/v2/ResourceTypes

Get Resource Type

Get all the resource types available for the connector from the file
Return a list of JSON objects with the resource types
VB

GET /scim/v2/Schemas

Get all schemas

Get the list of schemas from the configuration file
Return a list of JSON objects each JSON representing a schema
VB

GET /scim/v2/Schemas/{id}

Get Schema Based on ID

Get the list of schemas from the configuration file
for each schema in schema list
	if name of schema matches the name in request parameter
		return the JSON object with schema details
VB

GET /scim/v2/{resourceName}?filter=

Get Resource Name By Filter

Call the searchResource method of the target system connector with the resource name and filter
VB

GET /scim/v2/{resourceName}/{id}

Get Resource By ID

Call the getResource method of the target system connector with the resource name and id
VB

POST /scim/v2/{resourceName}

Create a new resource

Call createResource method of the target system connector with the resource name and request body
VB

PUT /scim/v2/{resourceName}/{id}

Replace a resource

Call the putResource method in the target system connector with the resource name, id and resource instance (request body)
VB

PATCH /scim/v2/{resourceName}/{id}

Update a resource

Call patchResource method of the target system connector with resource name, id and resource instance(request body)
VB

DELETE /scim/v2/{resourceName}/{id}

Delete a resource

Call the deleteResource method of the target system connector with the resource name and instance id
VB

REST API Implementation

The rest api should route the requests based on the resource name

Sample REST API

@RestController
public class DownstreamController {

    @Autowired
    private ApplicationContext applicationContext;
    
    public TargetSystemConnector targetSystemConnector;

    @GetMapping("/{resourceName}/{id}") //sample api to get the resource object by id
    public String getMethod(@PathVariable(value = "resourceName") String resourceName, @PathVariable(value = "id") String id) {
        targetSystemConnector = (TargetSystemConnector) applicationContext.getBean(resourceName);
        return targetSystemConnector.getResourceById(id);
    }
}
JAVA


REST API for Upstream Synchronization

POST /reconcile-request/{resourceName}?filter=

Incoming Reconcile Event

Use basic authentication (username and password) to authenticate the request
Call the GET "/scim/v2/{resourceName}?filter" api to get the resource details from the target system
for each object in the list returned by the api
	Call the "/reconcile/IDE/{resourceName}" api in Core 
		 // url will be stored in properties file
		 // All the headers obtained in the request will be added to the outgoing request
VB

REST API for actuator

Spring boot actuator can be used for this purpose

GET /actuator/health

Get the health of the application

GET /actuator/httptrace

Get the http trace for the application

Username and password required to access this endpoint

REST API for Connector Initialization

GET /connector/health

call the "/info" api on core to get the version for core microservice
check if the connector is compatible to work with the particular version of the core //the compatipable version is hardcoded
call the Core API "/reconcile/IDE/Account" with additional header dryRun = true
return OK if the version is compatible
JAVA

GET /connector/metadata

Get the name of the target system from the .properties file
Get the schema for the account from the target system metadata from the properties file
Return the name and schema 
VB

Downstream Connector Designs

Connector SPI Design

Splice Design

Future Scope

  • The schema and resource type definitions should be generated automatically instead of configuration files
  • Additional resource type to defined for other resources ( Eg: devices)