Skip to content
Permalink
202109
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
mchyzer remove bundle
Latest commit 0497dbb May 26, 2020 History
1 contributor

Users who have contributed to this file

53 lines (44 sloc) 3.23 KB
gs = GrouperSession.startRootSession();
addRootStem("basis", "basis");
addRootStem("ref", "ref");
addRootStem("app", "app");
addRootStem("org", "org");
addRootStem("test", "test");
addRootStem("401.1.1", "401.1.1")
addStem("ref", "iam", "iam");
addGroup("ref:iam", "global_deny", "global_deny");
addGroup("ref:iam", "active", "active");
addStem("ref", "employee", "employee");
addGroup("ref:employee", "fac_staff", "fac_staff");
addGroup("ref", "fac_staff_student", "fac_staff_student");
addGroup("ref", "faculty", "faculty");
addGroup("ref", "staff", "staff");
addGroup("ref", "student", "student");
addMember("ref:employee:fac_staff", "ref:faculty");
addMember("ref:employee:fac_staff", "ref:staff");
addMember("ref:fac_staff_student", "ref:faculty");
addMember("ref:fac_staff_student", "ref:staff");
addMember("ref:fac_staff_student", "ref:student");
group = addGroup("etc","rolesLoader", "Roles Loader");
groupAddType("etc:rolesLoader", "grouperLoader");
setGroupAttr("etc:rolesLoader", "grouperLoaderDbName", "grouper");
setGroupAttr("etc:rolesLoader", "grouperLoaderType", "SQL_GROUP_LIST");
setGroupAttr("etc:rolesLoader", "grouperLoaderScheduleType", "CRON");
setGroupAttr("etc:rolesLoader", "grouperLoaderQuartzCron", "0 * * * * ?");
setGroupAttr("etc:rolesLoader", "grouperLoaderQuery", "select distinct id as SUBJECT_IDENTIFIER, 'ldap' as SUBJECT_SOURCE_ID, CONCAT('ref:', role) as GROUP_NAME from HR_PEOPLE_ROLES");
// loaderRunOneJob(group);
group = new GroupSave(gs).assignName("etc:deptLoader").assignCreateParentStemsIfNotExist(true).save();
group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdapAttributeDefName()).getAttributeAssign();
attributeAssign = group.getAttributeDelegate().retrieveAssignment(null, LoaderLdapUtils.grouperLoaderLdapAttributeDefName(), false, true);
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapQuartzCronName(), "0 * * * * ?");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapTypeName(), "LDAP_GROUPS_FROM_ATTRIBUTES");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(), "demo");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(), "(businessCategory=*)");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSearchDnName(), "ou=People,dc=internet2,dc=edu");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(), "uid");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupAttributeName(), "businessCategory");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(), "subjectId");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectExpressionName(), '${subjectAttributes["subjectId"]}');
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupNameExpressionName(), 'ref:dept:${groupAttribute}');
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupDisplayNameExpressionName(), '${groupAttribute}');
// loaderRunOneJob(group);