ausaccessfed / aaf-shib-ext

Shibboleth extension for auEduPersonSharedToken
Apache License 2.0
0 stars 0 forks source link
web

AAF Shibboleth Extensions

A Shibboleth IdP custom extension which enables auEduPersonSharedToken for Shibboleth IdP 3.3.1.

The following features are provided:

IMPORTANT: The generation of the auEduPersonSharedToken relies on the user's identifier (sourceAttributeID),
the IdP's Entity ID and the private seed (salt). Change of the inputs will change the auEduPersonSharedToken value. This is likely to happen due to the change of the user's identifier, home institution, upgrade of the IdP and so on. In a production environment, the auEduPersonSharedToken must be only generated once then persisted in the institution's database for future use.

Requirements

Deployment

1. Configure database

Set up your database with the following schema db/schema.sql.

For example, to configure a local MySQL instance:

$ mysql
mysql> create database idp_db;
mysql> grant all privileges on idp_db.* to idp_admin@localhost identified by '<your_password>';
mysql> \u idp_db
mysql> (Paste db/schema.sql)

2. Configure resolvers

in $IDP_HOME/conf/attribute-resolver.xml:

Import the definition

xsi:schemaLocation="...
                    urn:mace:aaf.edu.au:shibboleth:2.0:resolver:dc classpath:/schema/aaf-shib-ext-dc.xsd

Define the DataConnector

<resolver:DataConnector xsi:type="SharedToken" xmlns="urn:mace:aaf.edu.au:shibboleth:2.0:resolver:dc"
                    id="sharedToken"
                    sourceAttributeId="uniqueIdentifier"
                    salt="Ez8m1HDSLBxu0JNcPEywmOpy+apq4Niw9kEMmAyWbhJqcfAb"
                    dataSource="jdbc/DS_idp_admin"
                    primaryKeyName="uid">
                    <resolver:Dependency ref="..." />
</resolver:DataConnector>

Attributes:

3. Configure logging

Use the pattern: "au.edu.aaf.shibext" in your logging configuration to enable logging.

For example, Shibboleth's $IDP_HOME/conf/logback.xml can use the configuration:

    <logger name="au.edu.aaf.shibext" level="DEBUG"/>

Unless specified, the log information will appear in $IDP_HOME/logs/idp-process.log.

4. Building the library

  1. Install Gradle
  2. Run the command ./gradlew clean build
  3. Generated jar will be in build/libs

5. Installing the library

  1. Copy the jar file to $IDP_HOME/edit-webapp/WEB-INF/lib/
  2. Re-run the installer sh $IDP_HOME/bin/build.sh
  3. Restart the app server