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.
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.
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
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.
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.
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.
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.
$ git add GTEST.xml
$ tree
midpoint-config-xml
└── objects
└── resources
├── GTEST.xml
├── GYBONID.xml
└── ONIDLDAPDEV.xml
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.
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