| 654 | |
| 655 | |
| 656 | == Set up loader for the office building for people == |
| 657 | |
| 658 | 1. Find the following properties in /srv/grouper/grouper.api-2.1.4/conf/grouper-loader.properties and update the values. Be sure to uncomment the properties too. Set the password correctly. |
| 659 | |
| 660 | {{{ |
| 661 | ldap.personLdap.url = ldaps://edir.alaska.edu:636/dc=alaska,dc=edu |
| 662 | ldap.personLdap.user = uid=grouper03,ou=resource,dc=alaska,dc=edu |
| 663 | ldap.personLdap.pass = secret |
| 664 | }}} |
| 665 | |
| 666 | 2. Configure LDAP loader job via GSH. |
| 667 | |
| 668 | {{{ |
| 669 | |
| 670 | [root@grinnell grouper.api-2.1.4]# ./bin/gsh.sh |
| 671 | ... |
| 672 | gsh 0% grouperSession = GrouperSession.startRootSession(); |
| 673 | edu.internet2.middleware.grouper.GrouperSession: 59e31f6e3f774419838719a09fe13f3f,'GrouperSystem','application' |
| 674 | gsh 1% group = addGroup("ua:inst:buildings", "loaderDefinition", "loaderDefinition") |
| 675 | group: name='ua:inst:buildings:loaderDefinition' displayName='ua:inst:buildings:loaderDefinition' uuid='d889e9cf79004bf4b396f33ed61d43e5' |
| 676 | gsh 2% attributeAssign = group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdapAttributeDefName()).getAttributeAssign(); |
| 677 | edu.internet2.middleware.grouper.attr.assign.AttributeAssign: AttributeAssign[id=6451f0a6328f44aa8dbbba21212aea22,action=assign,attributeDefName=etc:attribute:loaderLdap:grouperLoaderLdap, |
| 678 | group=Group[name=ua:inst:buildings:loaderDefinition,uuid=d889e9cf79004bf4b396f33ed61d43e5]] |
| 679 | gsh 3% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapTypeName(), "LDAP_GROUPS_FROM_ATTRIBUTES"); |
| 680 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@f1599908 |
| 681 | gsh 4% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(), "(officeLocation=BUTRO)"); |
| 682 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@147362e0 |
| 683 | gsh 5% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapQuartzCronName(), "0 0 0 * * ?"); |
| 684 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@3c2d09a4 |
| 685 | gsh 6% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSearchDnName(), "ou=people"); |
| 686 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@ef3aa71c |
| 687 | gsh 7% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(), "personLdap"); |
| 688 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@99104c4a |
| 689 | gsh 8% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSourceIdName(), "ldap"); |
| 690 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@796d51f8 |
| 691 | gsh 9% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupAttributeName(), "officeLocation"); |
| 692 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@ecb2991b |
| 693 | gsh 10% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(), "subjectId"); |
| 694 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@df23167e |
| 695 | gsh 11% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupNameExpressionName(), "groups:${groupAttribute}"); |
| 696 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@c0a6cbf3 |
| 697 | gsh 12% attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(), "BannerID") |
| 698 | edu.internet2.middleware.grouper.attr.value.AttributeValueResult: edu.internet2.middleware.grouper.attr.value.AttributeValueResult@e95bf032 |
| 699 | |
| 700 | }}} |
| 701 | |
| 702 | Loader scheduled to run once a day at midnight. |
| 703 | |
| 704 | 3. Run loader manually |
| 705 | |
| 706 | {{{ |
| 707 | [root@grinnell grouper.api-2.1.4]# ./bin/gsh.sh |
| 708 | ... |
| 709 | gsh 0% grouperSession = GrouperSession.startRootSession(); |
| 710 | edu.internet2.middleware.grouper.GrouperSession: fb0abbdd2dcc4aeca2927263937469f6,'GrouperSystem','application' |
| 711 | gsh 1% group = GroupFinder.findByName(grouperSession, "ua:inst:buildings:loaderDefinition") |
| 712 | group: name='ua:inst:buildings:loaderDefinition' displayName='ua:inst:buildings:loaderDefinition' uuid='d889e9cf79004bf4b396f33ed61d43e5' |
| 713 | gsh 2% loaderRunOneJob(group); |
| 714 | ..... |
| 715 | }}} |