Child pages
  • Restoring the Admin UI and Lite UI in Grouper 2.4+
Skip to end of metadata
Go to start of metadata

The Admin and Lite interfaces that were available in Grouper UI versions up to 2.3.0 have been removed by default in Grouper 2.4.0. For installations that still need this functionality, the source code for these modules has been moved to a legacy directory, and a download patch is available which can be applied directly to a war directory to restore those pages.  Note, in 2.4 you should have patch 2.4.0 ui patch #28

Installing

1) First, please archive your existing web application. While this process works at the point in time of the 2.4.0 release, future changes to the UI module may adversely affect this legacy code. It may also overwrite custom code for your institution.

2) Download the patch distribution grouper-legacy-ui.tar.gz into a temporary directory.

3) In the base of your grouper web application (there should be a WEB-INF subfolder here), unpack the grouper-legacy-ui.tar.gz archive. This will add in the legacy files, and replace other files with the older legacy versions of the file.

cd $TOMCAT/webapps/grouper
tar xzf $DL/grouper-legacy-ui.tar.gz


If done correctly, you should see a newly create file WEB-INF/classes/LEGACY-UI-INSTALLED.txt.

4) Manually update WEB-INF/web.xml to restore the legacy servlet and Struts filters. Near the end of the file (before </web-app>), add in the following xml fragments. This template uses grouperRole=* for security. If you have a custom setting to allow specific roles into the application, set the grouperRole to the correct value.


<filter>
    <filter-name>Error Catcher</filter-name>
    <filter-class>edu.internet2.middleware.grouper.ui.ErrorFilter</filter-class>
</filter>
<filter>
    <filter-name>Caller page</filter-name>
    <filter-class>edu.internet2.middleware.grouper.ui.CallerPageFilter</filter-class>
</filter>
<filter>
   <filter-name>Login check</filter-name>
   <filter-class>edu.internet2.middleware.grouper.ui.LoginCheckFilter</filter-class>
   <init-param>
           <param-name>failureUrl</param-name>
           <param-value>/index.jsp</param-value>
   </init-param>
           <init-param>
   <param-name>ignore</param-name>
           <param-value>:/populateIndex.do:/callLogin.do:/error.do:/logout.do:/status:</param-value>
   </init-param>
   <init-param>
           <param-name>grouperRole</param-name>
           <param-value>*</param-value>
   </init-param>
</filter>

<filter-mapping>
    <filter-name>GrouperUi</filter-name>
    <url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>GrouperUi</filter-name>
    <url-pattern>/grouperExternal/appHtml/*</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>Error Catcher</filter-name>
    <url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>Error Catcher</filter-name>
    <url-pattern>/gotoCallerPage</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>Caller page</filter-name>
    <url-pattern>/gotoCallerPage</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>Login check</filter-name>
    <url-pattern>*.do</url-pattern>
</filter-mapping>

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
</servlet-mapping>

<security-constraint>
    <web-resource-collection>
        <web-resource-name>UI</web-resource-name>
        <url-pattern>/grouperExternal/appHtml/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>*</role-name>
    </auth-constraint>
</security-constraint>

<security-constraint>
    <web-resource-collection>
        <web-resource-name>Tomcat login</web-resource-name>
        <url-pattern>/login.do</url-pattern>
    </web-resource-collection>
    <auth-constraint>
         <!-- NOTE:  This role is not present in the default users file -->
         <role-name>*</role-name>
    </auth-constraint>
</security-constraint>


Accessing the source code

The legacy code that was originally in the group-ui subproject can now be found in the Git repository under grouper-misc/grouper-legacy-ui

Rebuilding the patch distribution from source

The ant settings for this folder are set up to compile the classes and package everything into the grouper-legacy-ui.tar.gz file. From the command line:

ant distPackage


The process will clean out any existing compiled files and staging files, and then rebuild the output file into dist/grouper-legacy-ui.tar.gz. The compilation requires the presence of a grouper.jar and grouper-ui.jar file, and the default settings assume that these exist in ../../grouper/dist/lib and ../../grouper-ui/dist/grouper/WEB-INF/lib, respectively. These will be the default locations or these files if the full Grouper project is checked out, so the grouper and grouper-ui projects will just need to be built. Otherwise, the paths to the grouper jar and grouper-ui.jar can be specified with the ant parameters -Dgrouper.jar.name=<path to grouper jar> and -Dgrouperui.jar.name=<path to grouperUi>.

Experience from Penn

At penn we use some pickers and screens from the lite-UI.  We do not need or want the admin ui.

Unzip the tarball


Copy the grouper-legacy-ui.jar to the WEB-INF/lib


Note: all the lite UI jsps were there already from before the upgrade, otherwise would need: WEB-INF/grouperUi


Adjust the Owasp config
org.owasp.csrfguard.unprotected.GrouperHome=%servletContext%/home.do

org.owasp.csrfguard.unprotected.GrouperExternal=%servletContext%/grouperExternal/index.html
org.owasp.csrfguard.unprotected.GrouperExternalAppHtml=%servletContext%/grouperExternal/appHtml/*

org.owasp.csrfguard.unprotected.GrouperUi=%servletContext%/grouperUi/
org.owasp.csrfguard.unprotected.GrouperUiIndex=%servletContext%/grouperUi/index.html
org.owasp.csrfguard.unprotected.GrouperUiAppHtml=%servletContext%/grouperUi/appHtml/*
org.owasp.csrfguard.unprotected.GrouperI2mi=%servletContext%/i2mi/*
org.owasp.csrfguard.unprotected.GrouperScripts=%servletContext%/scripts/*








Links from main grouper page

If you want to restore links from main grouper page, add these in WEB-INF/grouperUi2/index/index.jsp (below the misc button)

                  <c:if test="${grouperRequestContainer.indexContainer.adminUIQuickLinkDisplayed=='true'}">
                  	<li><a id="adminiu-link" href="../../populateAllGroups.do">${textContainer.text['ui-lite.fromInvite-admin-link'] }</a></li>
                  </c:if>
                  <c:if test="${grouperRequestContainer.indexContainer.liteUIQuickLinkDisplayed=='true'}">
                  	<li><a id="liteiu-link" href="../../grouperUi/appHtml/grouper.html?operation=Misc.index">${textContainer.text['ui-lite.fromInvite-link'] }</a></li>
                  </c:if>



  • No labels