Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

uPortal 4.1+ DB-backed PAGS store

With uPortal 4.1 the default configuration for PAGS is a database-backed storage.  To use the previous XML-based configuration  alter the file pags.properties to set the property org.jasig.portal.groups.pags.PersonAttributesGroupStore.configurationClass=org.jasig.portal.groups.pags.XMLPersonAttributesConfiguration, then follow the uPortal 4.0 instructions below.

Step 1: Modify default.person-attribute-group-store.xml

1. Open uportal-war/src/main/data/default_entities/pags-store/Default.pags-store.xml
2. Declare a new group.

  • Below is an example of an "All Staff" group that groups users based on if the attribute eduPersonAffiliation=staff
<!-- Example Group Declarations --> 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pags-store xmlns="https://source.jasig.org/schemas/uportal/io/pags" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://source.jasig.org/schemas/uportal/io/pags https://source.jasig.org/schemas/uportal/io/pags/pags-4.1.xsd">
    <name>Default</name>
    <description>Default Person Attribute Group Store</description>

<!-- Group declarations: -->

<!--
  Group pags_root: "PAGS Root"
  IMPORTANT: The PAGS Root group is REQUIRED for uPortal to function. It Must be a member of the Everyone group in the
  local group store
-->
  <pags-group>
    <name>PAGS Root</name>
    <description>Root group for all PAGS groups.  Convenience for adding PAGS groups to a local group.</description>
    <members>
      <member-key>All Users (PAGS)</member-key>
      <member-key>Authenticated Users</member-key>
      <member-key>Desktop Device Access</member-key>
      <member-key>Mobile Device Access</member-key>
      <member-key>Respondr Theme Users</member-key>
    </members>
  </pags-group>

<!--
  Group all_users: "All Users (PAGS)"
  All IPersons are members of this group
  IMPORTANT: The All Users group is REQUIRED for uPortal to function. It Must be a member of the PAGS Root group
-->
  <pags-group>
    <name>All Users (PAGS)</name>
    <description>All Portal Users</description>
    <members>
      <member-key>All Staff (PAGS)</member-key>
    </members>
    <selection-test>
      <test-group>
        <name></name>
        <description></description>
        <test>
          <name></name>
          <description></description>
          <attribute-name></attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.AlwaysTrueTester</tester-class>
          <test-value></test-value>
        </test>
      </test-group>
    </selection-test>
  </pags-group>

<!-- ********** Here's our new "All Staff" group we are declaring *********** -->
  <pags-group>
    <name>All Staff (PAGS)</name>
    <description>All Staff Users</description>
    <selection-test>
      <test-group>
        <name></name>
        <description></description>
        <test>
          <name></name>
          <description></description>
          <attribute-name>eduPersonAffiliation</attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.StringEqualsTester</tester-class>
          <test-value>staff</test-value>
        </test>
      </test-group>
    </selection-test>
  </pags-group>

...

<!-- End Group declarations: -->
</pags-store>
  • Now, what if I wanted to refine the staff group into departments? Below is an additional example that groups "All Staff" users from above into departments based on if the attribute ou=ITS (Information Technology Services)
<!-- Example Group Declarations --> 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pags-store xmlns="https://source.jasig.org/schemas/uportal/io/pags" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://source.jasig.org/schemas/uportal/io/pags https://source.jasig.org/schemas/uportal/io/pags/pags-4.1.xsd">
    <name>Default</name>
    <description>Default Person Attribute Group Store</description>

<!-- Group declarations: -->

<!--
  Group pags_root: "PAGS Root"
  IMPORTANT: The PAGS Root group is REQUIRED for uPortal to function. It Must be a member of the Everyone group in the
  local group store
-->
  <pags-group>
    <name>PAGS Root</name>
    <description>Root group for all PAGS groups.  Convenience for adding PAGS groups to a local group.</description>
    <members>
      <member-key>All Users (PAGS)</member-key>
      <member-key>Authenticated Users</member-key>
      <member-key>Desktop Device Access</member-key>
      <member-key>Mobile Device Access</member-key>
      <member-key>Respondr Theme Users</member-key>
    </members>
  </pags-group>

<!--
  Group all_users: "All Users (PAGS)"
  All IPersons are members of this group
  IMPORTANT: The All Users group is REQUIRED for uPortal to function. It Must be a member of the PAGS Root group
-->
  <pags-group>
    <name>All Users (PAGS)</name>
    <description>All Portal Users</description>
    <members>
      <member-key>All Staff (PAGS)</member-key>
    </members>
    <selection-test>
      <test-group>
        <name></name>
        <description></description>
        <test>
          <name></name>
          <description></description>
          <attribute-name></attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.AlwaysTrueTester</tester-class>
          <test-value></test-value>
        </test>
      </test-group>
    </selection-test>
  </pags-group>

<!-- ********** Here's our new "All Staff" group we are declaring *********** -->
  <pags-group>
    <name>All Staff (PAGS)</name>
    <description>All Staff Users</description>
    <!--
         If you want to declare a group within another, you must include the <members> directive.
         In other words, the "ITS Dept" below is a subgroup of the "All Staff" group as indicated in the example
     -->
    <members>
      <member-key>ITS Dept (PAGS)</member-key>
    </members>
    <selection-test>
      <test-group>
        <name></name>
        <description></description>
        <test>
          <name></name>
          <description></description>
          <attribute-name>eduPersonAffiliation</attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.StringEqualsTester</tester-class>
          <test-value>staff</test-value>
        </test>
      </test-group>
    </selection-test>
  </pags-group>

  <pags-group>
    <name>ITS Dept (PAGS)</name>
    <description>All ITS department Users</description>
    <selection-test>
      <test-group>
        <name></name>
        <description></description>
        <test>
          <name></name>
          <description></description>
          <attribute-name>ou</attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.StringEqualsTester</tester-class>
          <test-value>ITS</test-value>
        </test>
      </test-group>
    </selection-test>
  </pags-group>


...

<!-- End Group declarations: -->
</pags-store>


From the example above we have created a hierarchy of groups (below is a screen shot of the Groups Administration listing the new PAGS groups, ITS Dept (PAGS), from the declaration above).  

 

 

NOTE: It's very important that you keep the PAGS Root and All Users group declaration. These group declarations are REQUIRED.

Step 2: Deploy your Groups

  • From the uPortal root source directory deploy your group changes
# creates tables and imports the PAGS data
ant clean initdb

Step 3: Restart uPortal

  • Restart your Tomcat instance
TOMCAT_HOME/bin/shutdown.sh
TOMCAT_HOME/bin/startup.sh

 

Upgrading from XML-backed PAGS to database-backed PAGS

  1. Update code base to 4.1 (4.1 will include the change to pags.properties to toggle the configuration to be Entity based)
  2. Run initdb or dbupdate and then import Default.pags-store.xml

uPortal 4.0 XML-backed PAGS store

With uPortal 4.0 the PAGS configuration is stored in an XML file PAGSGroupStoreConfig.xml.  uPortal 4.1 by default uses a DB-backed store.

Step 1: Modify the PAGSGroupStoreConfig.xml file

1. Open uportal-war/src/main/resources/properties/groups/PAGSGroupStoreConfig.xml
2. Declare a new group.

  • Below is an example of an "All Staff" group that groups users based on if the attribute eduPersonAffiliation=staff
<!-- Example Group Declarations --> 

<?xml version="1.0"?>
<!DOCTYPE Group-Store PUBLIC "-//uPortal//PAGSGroupStore/EN" "PAGSGroupStore.dtd">
<Group-Store>

<!-- Group declarations: -->

<!--
  Group pags_root: "PAGS Root"
  IMPORTANT: The PAGS Root group is REQUIRED for uPortal to function. It Must be a member of the Everyone group in the
  local group store
-->
  <group>
    <group-key>pags_root</group-key>
    <group-name>PAGS Root</group-name>
    <group-description>Root group for all PAGS groups.  Convenience for adding PAGS groups to a local group.</group-description>
    <members>
      <member-key>all_users</member-key>
    </members>
  </group>


<!--
  Group all_users: "All Users (PAGS)"
  All IPersons are memebers of this group
  IMPORTANT: The All Users group is REQUIRED for uPortal to function. It Must be a member of the PAGS Root group
-->
  <group>
    <group-key>all_users</group-key>
    <group-name>All Users (PAGS)</group-name>
    <group-description>All Portal Users</group-description>
    <selection-test>
      <test-group>
        <test>
          <attribute-name></attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.AlwaysTrueTester</tester-class>
          <test-value></test-value>
        </test>
      </test-group>
    </selection-test>
   <!-- Don't forget to define your new sub-group using the members directive if you want the group to be a sub-group of "All Users" -->
   <members>
      <member-key>all_staff</member-key>
    </members>
  </group>

<!-- ********** Here's our new "All Staff" group we are declaring *********** -->
<group>
<group-key>all_staff</group-key>
    <group-name>All Staff (PAGS)</group-name>
    <group-description>All Staff Users</group-description>
    <selection-test>
      <test-group>
        <test>
          <attribute-name>eduPersonAffiliation</attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.StringEqualsTester</tester-class>
          <test-value>staff</test-value>
        </test>
      </test-group>
    </selection-test>
   </group>

...

<!-- End Group declarations: -->
</Group-Store>
  • Now, what if I wanted to refine the staff group into departments? Below is an additional example that groups "All Staff" users from above into departments based on if the attribute ou=ITS (Information Technology Services)
<!-- Example Group Declarations -->

<?xml version="1.0"?>
<!DOCTYPE Group-Store PUBLIC "-//uPortal//PAGSGroupStore/EN" "PAGSGroupStore.dtd">
<Group-Store>
<!-- Group declarations: -->

<!--
  Group pags_root: "PAGS Root"
  IMPORTANT: The PAGS Root group is REQUIRED for uPortal to function. It Must be a member of the Everyone group in the
  local group store
-->
  <group>
    <group-key>pags_root</group-key>
    <group-name>PAGS Root</group-name>
    <group-description>Root group for all PAGS groups.  Convenience for adding PAGS groups to a local group.</group-description>
    <members>
      <member-key>all_users</member-key>
    </members>
  </group>


<!--
  Group all_users: "All Users (PAGS)"
  All IPersons are members of this group
  IMPORTANT: The All Users group is REQUIRED for uPortal to function. It Must be a member of the PAGS Root group
-->
  <group>
    <group-key>all_users</group-key>
    <group-name>All Users (PAGS)</group-name>
    <group-description>All Portal Users</group-description>
    <selection-test>
      <test-group>
        <test>
          <attribute-name></attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.AlwaysTrueTester</tester-class>
          <test-value></test-value>
        </test>
      </test-group>
    </selection-test>
    <!-- Don't forget to define your new sub-group using the members directive if you want the group to be a sub-group of "All Users" -->  
    <members>     
      <member-key>all_staff</member-key>
    </members>
  </group>

<group>
<group-key>all_staff</group-key>
    <group-name>All Staff (PAGS)</group-name>
    <group-description>All Staff Users</group-description>
    <selection-test>
      <test-group>
        <test>
          <attribute-name>eduPersonAffiliation</attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.StringEqualsTester</tester-class>
          <test-value>staff</test-value>
        </test>
      </test-group>
    </selection-test>
    <!--
         If you want to declare a group within another, you must include the <members> directive.
         In other words, the "ITS Dept" below is a subgroup of the "All Staff" group as indicated in the example
     -->
    <members>
      <member-key>its</member-key>
    </members>
</group>

<group>
<group-key>its</group-key>
    <group-name>ITS Dept (PAGS)</group-name>
    <group-description>All ITS department Users</group-description>
    <selection-test>
      <test-group>
        <test>
          <attribute-name>ou</attribute-name>
          <tester-class>org.jasig.portal.groups.pags.testers.StringEqualsTester</tester-class>
          <test-value>ITS</test-value>
        </test>
      </test-group>
    </selection-test>
</group>


...

<!-- End Group declarations: -->
</Group-Store>


From the example above we have created a hierarchy of groups (below is a screen shot of the Groups Administration listing the new PAGS groups, ITS Dept (PAGS), from the declaration above).  

 

 

NOTE: It's very important that you keep the PAGS Root and All Users group declaration. These group declarations are REQUIRED.

Step 2: Deploy your Groups

  • From the uPortal root source directory deploy your group changes
ant clean deploy-war

Step 3: Restart uPortal

  • Restart your Tomcat instance
TOMCAT_HOME/bin/shutdown.sh
TOMCAT_HOME/bin/startup.sh

Having problems with these instructions?

Please send us feedback at uportal-user@lists.ja-sig.org

  • No labels