Skip to content

Commit

Permalink
Initial commit for TechEx 2017 demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan committed Oct 3, 2017
1 parent 3a9f50b commit 741705e
Show file tree
Hide file tree
Showing 3 changed files with 559 additions and 0 deletions.
33 changes: 33 additions & 0 deletions grouper-to-midpoint/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Grouper to Midpoint Demonstration Class

This is a class to demonstrate the usage of the
Unicon RabbitMQ plugin for Grouper, in conjuction
with midPoint's rest interface.

The below several static strings for configuration information
are inside the class itself.

EXCHANGE_NAME
EXCHANGE_HOST
EXCHANGE_USER
EXCHANGE_SECRET
MIDPOINT_REST_URL
MIDPOINT_REST_USER
MIDPOINT_REST_SECRET

There is also two HashMaps that can be used to define
which groups membership additions and deletions should
result in adding or removing roles or resources in midPoint.

roleGroups
resourceGroups

For example the mapping:

roleGroups.put("ref:employee","employee");

Would add the midPoint employee role to a user when their subjectId was addedd to the ref:employee Grouper group.

After building you should be able to run with the below syntax.

java -classpath groupermidpoint-0.1-SNAPSHOT-jar-with-dependencies.jar edu.unc.tier.groupermidpoint.GrouperToMidpoint
88 changes: 88 additions & 0 deletions grouper-to-midpoint/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016-2017 Evolveum
~
~ Licensed 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">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.unc.tier</groupId>
<artifactId>groupermidpoint</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Grouper To Midpoint</name>

<build>
<plugins>
<!-- any other plugins -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.rabbitmq/amqp-client -->
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>4.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency>

</dependencies>
</project>
Loading

0 comments on commit 741705e

Please sign in to comment.