Installation of uApprove.jp with uApprove-2.1.3 // ---------------------------------------------------------------------------- 0. Reference You may want to refer installation manual for original uApprove-2.1.3: https://www.switch.ch/aai/downloads/uApprove-2.1.3-manual.html // ---------------------------------------------------------------------------- 1. Installation of Shibboleth IdP 2.1.3 After installation of the Shibboleth IdP, run tomcat once to deploy files in $TOMCAT_HOME/webapps/idp.war. // ---------------------------------------------------------------------------- 2. Installation of database The uApprove uses database to preserve user preferences. Use of MySQL is recommended. File-base DB is also provided for small sites of less than 100 users. Basic configuration of DB is as same as the manual of uApprove-2.1.3 by SWITCH. https://www.switch.ch/aai/downloads/uApprove-2.1.3-manual.html The uApprove.jp uses another table name of DB. // ---------------------------------------------------------------------------- 3. Installation of the original uApprove with uApprove.jp 3-1. create a directory for configurations mkdir /opt/shibboleth-idp/uApprove (can be changed) 3-2. get uApprove.jp-2.1.3-bin.zip and unzip 3-3. unzip 2 archives included in uApprove.jp-2.1.3-bin.zip cd uApprove.jp-2.1.3 unzip idp-plugin-2.1.3-bin.zip unzip viewer-2.1.3-bin.zip 3-4. copy IdP plugin files into the IdP system cp idp-plugin-2.1.3/conf-template/* /opt/shibboleth-idp/uApprove cp idp-plugin-2.1.3/lib/* $TOMCAT_HOME/webapps/idp/WEB-INF/lib/ The following files are stored in the idp-plugin-2.1.3/lib directory bcprov-jdk15-140.jar commons-cli-1.1.jar idp-plugin-2.1.3.jar mysql-connector-java-5.1.6.jar common-2.1.3.jar commons-logging-1.1.1.jar json-simple-1.0.jar vt-crypt-2.0.jar shibboleth-uApprove-1.0.0.jar (new module for uApprove.jp) 3-5. copy viewer files into the IdP system cp viewer-2.1.3/conf-template/* /opt/shibboleth-idp/uApprove (There are some duplicated files which has same content as files of IdP plugin.) cp -r viewer-2.1.3/webapp $TOMCAT_HOME/webapps/uApprove // ---------------------------------------------------------------------------- 4. Configuration of uApprove.jp 4-1. edit path in config files copied into /opt/shibboleth-idp/uApprove (default is /path/to/config) 4-2. edit /opt/shibboleth-idp/uApprove/common.properties termsOfUse=/opt/shibboleth-idp/uApprove/terms-of-use.xml <= HERE (DIR) storageType=database <= ENABLE databaseConfig=/opt/shibboleth-idp/uApprove/database.properties <= HERE (ENABLE) #storageType=file <= DISABLE #flatFile=/path/to/config/uApprove-log.xml <= DISABLE 4-3. edit /opt/shibboleth-idp/uApprove/database.properties parameters to access DB password=uApprove <= HERE sqlCommands=/opt/shibboleth-idp/uApprove/mysql.commands <= HERE (DIR) 4-4. edit /opt/shibboleth-idp/uApprove/idp-plugin.properties spBlacklist = /opt/shibboleth-idp/uApprove/sp-blacklist <= HERE (DISABLE) uApproveViewer=https://idp.example.org/uApprove/Controller <= HERE (URL) 4-5. edit /opt/shibboleth-idp/uApprove/viewer.properties useLocale = en_US <= HERE (CHARSET) attributeList=/opt/shibboleth-idp/uApprove/attribute-list <= HERE (DIR) loggingConfig=/opt/shibboleth-idp/uApprove/logging.xml <= HERE (DIR) 4-6. edit /opt/shibboleth-idp/uApprove/attribute-list Attributes described in this list will be shown for user consent before release. Attribute names must be same as id of defined in attribute-resolver.xml. Adding prefix "!" on attribute names to hide from list shown for user consent, to release without user consent according to policy of attribute-filter. The following attribute names should be defined: eduPersonPrincipalName eduPersonTargetedID organizationName organizationalUnit eduPersonEntitlement eduPersonAffiliation eduPersonScopedAffiliation email givenName surname displayName jasurname jagivenName jadisplayName jaorganizationName jaorganizationalUnit uApprove.jp will require re-consent when any value of attribute to be released is changed even if the user already allowed once to relase. But attributes with prefix "!" will not cause re-consent. 4-7. edit /opt/shibboleth-idp/uApprove/logging.xml /opt/shibboleth-idp/log/uApprove.log <= HERE (DIR) // ---------------------------------------------------------------------------- 5. Configuration of IdP 5-1. Add settings for tomcat configuration to work with uApprove plugin edit $TOMCAT_HOME/webapps/idp/WEB-INF/web.xml and add and element in the definition. : uApprove IdP plugin ch.SWITCH.aai.uApprove.idpplugin.Plugin Config /opt/shibboleth-idp/uApprove/idp-plugin.properties; /opt/shibboleth-idp/uApprove/common.properties; uApprove IdP plugin /profile/* REQUEST FORWARD : ... 5-2. Add a checkbox to reset previous consent edit $TOMCAT_HOME/webapps/idp/login.jsp 5-3. How to configure attribute-filter to utilize uApprove.jp uApprove.jp provides a new filter "AttributeUpprove". Configure /opt/shibboleth-idp/conf/attribute-filter.xml according to policy of your site. Define namespace "http://upki-portal.nii.ac.jp/docs/fed/ns/uapprove-jp" in to enable "AttributeUpprove" <=HERE add AttributeFilterPlicy for uApprove in Pattern A: "permit by uApprove.jp" - only one AttributeRule is applied to the SP : Pattern B: "deny by uApprove.jp" - combination of AttributeRule is applied to the SP : : : isApproved boolean of uApprove:AttributeUapprove will be set true - if user allows to release the attribute false - if user denies to release the attribute // ---------------------------------------------------------------------------- 6. Configuration of uApprove web 6-1. Configuration in $TOMCAT_HOME/webapps/uApprove/WEB-INF/web.xml (change directory location) : Config /opt/shibboleth-idp/uApprove/viewer.properties; <= HERE /opt/shibboleth-idp/uApprove/common.properties; <= HERE : 6-2. Configuration in Apache Add the following configuration in /etc/httpd/conf.d/ssl.conf : ProxyPass /uApprove/ ajp://localhost:8009/uApprove/ <= HERE : 7. Specifing mandatory attributes in SP matadata Add element in of Mandatory attributes must have isRequired="true" setting in the element. Example: Sample Service An example service that requires a human-readable identifier and optional name and e-mail address. // ---------------------------------------------------------------------------- 8. Restart of tomcat, httpd // ---------------------------------------------------------------------------- A. Appendix A-1. compilation of uApprove.jp unzip uApprove-2.1.3-src.zip apply uApprove-jp-2.1.3.patch in the uApprove-2.1.3 directory cd uApprove-2.1.3 patch -p1 < $WORKDIR/uApprove-jp-2.1.3.patch compile source files mvn clean compile jar:jar (Maven must be installed to compile) A-2. compilation of shibboleth-uApprove extract files from shibboleth-uApprove-1.0.0.tgz compile source files in shibboleth-uApprove-1.0.0 directory cd shibboleth-uApprove-1.0.0 mvn clean compile jar:jar [EOF]