MDR Bundle

This package includes all necessary projects to build the Samply Metadata Repository applications, including the Graphical User Interface and REST interface.


Before you can build the application, it is necessary to build and install the maven POMs:

mvn -P parent clean install

This will build and install four POMs into your local maven repository. Now you can build the Metadata Repository:

mvn clean install

This will compile and install all projects. The important files are:



See the MDR Bundle install guide to see how to install this application.

Before you deploy this application, install and configure the required components:

  • Postgresql (>=9.3)
    • With a user that has write-access to a database
  • Tomcat (>=7)
    • the role mdr-admin and a user with this role is required to access the admin interface (/admin/), use the tomcat-users.xml to configure the role and user.

Here is a sample tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?>
    <role rolename="mdr-admin"/>
    <user username="admin" password="kdkjweijofwe12390yxc" roles="mdr-admin"/>

Configure the password to your needs.


The application uses the following files:

  • /etc/samply/mdr.postgres.xml for the database configuration
  • /etc/samply/mdr.oauth2.xml for the central authentication configuration


Set the Registry Key HKEY_LOCAL_MACHINE\SOFTWARE\SAMPLY\ConfDir to a path on your hard drive, e.g. C:\Samply\ and put the following configuration files in there:

  • mdr.postgres.xml for the database configuration
  • mdr.oauth2.xml for the central authentication configuration

Database (/etc/samply/mdr.postgres.xml)

Here is a sample database configuration file:

<?xml version="1.0" encoding="UTF-8"?>


    <database>the database</database>

    <username>the database user</username>



If your PostgreSQL server listens on a different port than the default port, you can append the port in the host tag, e.g. localhost:9586. Please make sure, that the database exists and the user has write access in this database (the user must be able to create new tables).

Central authentication (/etc/samply/mdr.oauth2.xml)

The central authentication mechanism (OpenID-Connet) used in this project relies on the public key of the central authentication. Also your instance must be a registered client with a client ID and a client secret, without those values you can not use this application. Once you get the public key, you must convert it into a base64 encoded X509 public key format.

openssl genrsa 4096 2>/dev/null | openssl rsa -pubout -outform DER 2>/dev/null | base64

The output of this one-line-command is an acceptable format. Currently the MDR does not support loading the public key on startup, although it is possible.

Here is a sample authentication configuration file:

<?xml version="1.0" encoding="UTF-8"?>

    <host></host> <!-- The default hostname -->

    <!-- Additional hostnames depend on the servername that is used in the request. Don't use this if you don't need it. -->



Copy the following files


into the webapps folder of your application server and rename them if required, e.g. mdr-gui-$VERSION.war to ROOT.war, mdr-rest-$VERSION.war to v2.war. This way the web application is accessible with the URL $HOST/ and the REST interface is accessible with the URL $HOST/v2/.

See this website for more informations about context containers in tomcat.

Start the server.

Central authentication

With this setup the MDR is running, but it is not possible to login because the central authentication service does not know your application. In order to register your new MDR in Samply Auth, please write us an email with the following informations:

  • The URL(s) to the graphical user interface of your MDR (e.g., localhost is acceptable in a development environment only (e.g. http://localhost:8080/)

We will register your client in our application and write you an email with:

  • your client ID
  • your client secret
  • the public key of the central authentication service (the key above is the public key of
  • the URL of the central authentication service

The authentication with the DFN-AAI is currently not possible, we are still working on it.


Open your web browser and navigate to the application, e.g. $HOST/. The admin interface is available under the /admin/ path, e.g. $HOST/admin or http://localhost:8080/admin/.