MidPoint configuration is maintained in XML files by default. This post describes how Oregon State University is managing our midPoint resource configuration files by leveraging git for storage and change tracking, and Eclipse as an IDE for editing the configuration and applying it to the midPoint server.

Assumptions

  • You are running midPoint 3.6+
  • You are familiar with the basic operation of git
  • You have git and Eclipse installed

midPoint Eclipse Plugin

  1. Install the midPoint Eclipse Plugin by following Evolveum's Eclipse Plugin Installation HOWTO.
  2. Configure the plugin to connect to your midPoint server. See the "Configuring Connections" section in Evolveum's Eclipse Plugin HOWTO.
  3. Create a new project in Eclipse with a type of "General". This project will contain the midPoint configuration files. In this guide, our project is called "midpoint-config-xml".

Git Repository Layout

The git repository layout for our midPoint configuration files follows the folder structure created by the midPoint Eclipse plugin. Here is an example repo layout:

.
├── README.md
└── objects
    └── resources
        ├── GYBONID.xml
        └── ONIDLDAPDEV.xml

GYBONID and ONIDLDAPDEV are midPoint resources, and their configurations are maintained in the corresponding XML files.

Tutorial: Adding a New Resource

In this tutorial, you will add a new resource in midPoint for Google Apps, use Eclipse to make changes to its configuration, and use git to store those changes.

Suppose you have a midPoint configuration project in Eclipse that points to files stored in the following git repo:

midpoint-config-xml
└── objects
    └── resources
        ├── GYBONID.xml
        └── ONIDLDAPDEV.xml

Step 1. Download sample resource XML

Most midPoint connectors provide a sample resource XML file to use as a configuration starting point. Click here to download the Google Apps sample XML.

Step 2. Import the sample resource XML file into midPoint

In midPoint, use the "Import object" tool to import the XML file you downloaded in step 1.

This will add a new "Google Apps" resource in the Resources list.

3. Download the resource configuration from the server

In Eclipse, right-click on the "midpoint-config-xml" project name in Package Explorer and use the midPoint plugin to "Browse server objects".

Select "Resource" in the object types list, then click Search.

Select the "Google Apps" resource and click Download.

4. Rename the downloaded XML file (optional)

We recommend that you rename the downloaded file to something that better reflects your organization's resources. In this example, our test Google Apps instance is called GTest, so we've renamed the configuration file to GTEST.xml.

5. Add the new resource configuration XML to the git repo


$ git add GTEST.xml
$ tree
midpoint-config-xml
└── objects
    └── resources
        ├── GTEST.xml
        ├── GYBONID.xml
        └── ONIDLDAPDEV.xml

6. Modify the resource

Now you can start making configuration changes to the resource XML in Eclipse. For example, change the domain to something other than the default.

Save the file. Depending on your workflow, you may want to test your changes before committing them to git.

7. Upload the configuration change to midPoint

In Eclipse, select the modified XML file in the project explorer, right-click on it, select "Server-side actions" from the midPoint plugin menu, and then select "Upload, test, and validate".

If there are no errors, the new configuration will be applied to the resource in midPoint.


Stacy Brock, Oregon State University