Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create outbound provisioning connector for Choreo #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Ignore everything in this directory
target
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# identity-outbound-provisioning-choreo
Outbound Provisioning Connector for Choreo
Outbound Provisioning Connector for Choreo.
This connector can be use to enable outbound provisioning in the WSO2 identity server with the Choreo APIs.

# Pluggimg the connector to the Identity Server
## Step 1
First download the ZIP file or clone the repository into your PC. Then build the connector using `mvn clean install`
## Step 2
Navigate to the `<Connector_Home> -> Components -> org.wso2.carbon.identity.provisioning.choreo.connector.scim -> target` directory and get the created `JAR` file.
## Step 3
Navigate to the `<IS_HOME> -> repository -> components -> dropins` directory in your Identity Server and put the `JAR` file into that floder and restart the server.
## Step 4
Log into the WSO2 Identity Server management console, and click create new Identity provider. Fill the required details and expand the outbound provisioning connectors.
You will see `scim-choreo` connector is listed under the outbound connectors.

# Outbound Provisioning with `choreo-API`
To configure an identity provider for outbound provisioning with choreo-API, first you need to create a API in [Choreo](https://wso2.com/choreo/) platform. Then get the API endpoint and a token and configure the `scim-choreo` connector with `API End-point` & `API Key`.

Reffer this [example](https://docs.google.com/document/d/11FSXV6oD1TJVI8GdPXcg68wZDCHrBWOtNUI4aXKCqs0/edit?usp=sharing) to create an API for outbound provisioning with `scim-choreo` connector.
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<artifactId>identity-outbound-provisioning-choreo-connector</artifactId>
<groupId>org.wso2.carbon.identity.outbound.provisioning.choreo</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.identity.provisioning.choreo.connector.scim</artifactId>
<name>WSO2 Carbon - SCIM - Provisioning Choreo Module</name>

<packaging>bundle</packaging>

<repositories>
<repository>
<id>grouper.internet2.edu</id>
<name>Internet2</name>
<layout>default</layout>
<url>http://www.internet2.edu/grouper/downloads/maven2</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>commons-lang.wso2</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.user.core</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.core</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.charon</groupId>
<artifactId>org.wso2.charon.core</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.inbound.provisioning.scim</groupId>
<artifactId>org.wso2.carbon.identity.scim.common</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.core</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.provisioning</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.application.common</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.outbound.provisioning.scim</groupId>
<artifactId>org.wso2.carbon.identity.provisioning.connector.scim</artifactId>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>1.7.2</version>
<executions>
<execution>
<id>generate-scr-scrdescriptor</id>
<goals>
<goal>scr</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Private-Package>
org.wso2.carbon.identity.provisioning.choreo.connector.scim.internal
</Private-Package>
<Import-Package>
org.apache.commons.logging; version="${commons-logging.osgi.version.range}",
org.apache.commons.collections; version="${commons-collections.wso2.osgi.version.range}",
org.apache.commons.lang; version="${commons-lang.wso2.osgi.version.range}",
org.osgi.framework; version="${osgi.framework.imp.pkg.version.range}",
org.osgi.service.component; version="${osgi.service.component.imp.pkg.version.range}",
org.wso2.carbon.identity.application.common.model;
version="${carbon.identity.framework.import.version.range}",
org.wso2.carbon.identity.provisioning;
version="${carbon.identity.framework.import.version.range}",
org.wso2.carbon.identity.scim.common.*;
version="${identity.inbound.provisioning.scim.import.version.range}",
org.wso2.charon.core.config; version="${charon.core.imp.pkg.version.range}",
org.wso2.charon.core.objects; version="${charon.core.imp.pkg.version.range}",
org.wso2.charon.core.exceptions; version="${charon.core.imp.pkg.version.range}",
org.wso2.charon.core.schema; version="${charon.core.imp.pkg.version.range}",
org.wso2.carbon.identity.provisioning.connector.scim; version="${carbon.identity.provisioning.connector.version.range}",
org.wso2.charon.core.client;,
org.apache.http.*
ViduraRavihansa marked this conversation as resolved.
Show resolved Hide resolved
</Import-Package>
<Export-Package>
!org.wso2.carbon.identity.provisioning.choreo.connector.scim.internal,
org.wso2.carbon.identity.provisioning.choreo.connector.scim.*;
version="${identity.outbound.provisioning.scim.export.version}"
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<maven.compiler.source>8</maven.compiler.source>
ViduraRavihansa marked this conversation as resolved.
Show resolved Hide resolved
<maven.compiler.target>8</maven.compiler.target>
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.wso2.carbon.identity.provisioning.choreo.connector.scim;

/**
*The constants needed for configuration.
*/
public class SCIMChoreoConfigConstants {
ViduraRavihansa marked this conversation as resolved.
Show resolved Hide resolved

public static final String ELEMENT_NAME_API_ENDPOINT = "apiEndpoint";
ViduraRavihansa marked this conversation as resolved.
Show resolved Hide resolved
public static final String ELEMENT_NAME_API_TOKEN = "apiToken";
public static final String ELEMENT_NAME_JSON_TYPE = "application/json";
public static final String ELEMENT_NAME_TOKEN_TYPE = "Bearer ";
public static final String ELEMENT_NAME_ACCEPT_TYPE = "text/plain";
public static final String ELEMENT_NAME_CONTENT_TYPE = "Content-Type";
public static final String ELEMENT_NAME_ACCEPT = "Accept";
public static final String ELEMENT_NAME_AUTHORIZATION = "Authorization";

public SCIMChoreoConfigConstants() {
ViduraRavihansa marked this conversation as resolved.
Show resolved Hide resolved
}
}
Loading