diff --git a/README.md b/README.md index 320fd41..3a4390b 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,18 @@ Current tags: - ex401.1.3 - ex401.1.4 - ex401.1.5 +- ex401.1.6 - ex401.1.end - ex401.2.1 - ex401.2.2 - ex401.2.3 - ex401.2.4 +- ex401.2.5 +- ex401.2.6 +- ex401.2.7 +- ex401.2.8 +- ex401.2.9 +- ex401.2.end Browse to `https://localhost/grouper` for Grouper. There is also an app that dumps the SP user attributes at `https://localhost/app`. diff --git a/ex401/class-files/AthleticDeptartmentUsers.txt b/ex401/class-files/AthleticDeptartmentUsers.txt new file mode 100644 index 0000000..ee2d78a --- /dev/null +++ b/ex401/class-files/AthleticDeptartmentUsers.txt @@ -0,0 +1,15 @@ +jdavis4 +ldavis5 +janderson13 +rdavis16 +cthompson28 +ahenderson36 +amorrison42 +pthompson61 +bsmith65 +jlangenberg100 +nscott103 +jprice108 +jvales117 +mmartinez133 +mgrady137 diff --git a/ex401/class-files/Non-facultyBannerUsers.txt b/ex401/class-files/Non-facultyBannerUsers.txt new file mode 100644 index 0000000..deda9d5 --- /dev/null +++ b/ex401/class-files/Non-facultyBannerUsers.txt @@ -0,0 +1,35 @@ +nscott103 +jprice108 +mnielson143 +mvales154 +wclark159 +kthompson169 +athompson183 +sanderson191 +jlangenberg194 +jwhite222 +rwilliams230 +pwilliams242 +lprice328 +dgrady331 +edoe348 +svales366 +mhenderson377 +mlewis390 +mroberts391 +llopez398 +amorrison406 +janderson459 +wmartinez487 +lvales502 +cvales514 +jprice523 +rvales544 +iprice563 +bmartinez592 +jnielson598 +amartinez605 +dprice607 +mbutler632 +lbutler643 +dmartinez657 diff --git a/ex401/data-generator.html b/ex401/data-generator.html index 838156f..70b82a4 100644 --- a/ex401/data-generator.html +++ b/ex401/data-generator.html @@ -54,7 +54,7 @@ var departments = ["Computer Science", "Engineering", "Business", "Accounting", "Law", "Physical Education", "Language Arts", "Financial Aid", - "Information Technology", "Advising", "Purchasing", "Account Payable" + "Information Technology", "Advising", "Purchasing", "Accounts Payable" ]; var affiliations = ["student", "staff", "faculty", "alum", "community"]; @@ -94,18 +94,23 @@ //Add additional randomized characteristics sets here; //keep the ordering the same to maintain deterministic capabilities between runs + + //Assign departments for (index = 0; index < people.length; ++index) { people[index]["department"] = departments[rng.nextRange(0, departments.length)]; } + //Assign affiliations for (index = 0; index < people.length; ++index) { people[index]["affiliations"] = selectUnduplicated(affiliations, 2); } + //Assign titles/primary affiliations for (index = 0; index < people.length; ++index) { people[index]["title"] = rankAffiliations(people[index].affiliations); } + //Create Course Enrollments for (index = 0; index < people.length; ++index) { people[index]["courses"] = []; if (people[index]["affiliations"].indexOf("student") > -1 @@ -114,14 +119,22 @@ } } + //Create vpn_users for (index = 0; index < people.length; ++index) { people[index].vpn_user = people[index].affiliations.indexOf('staff') >= 0 || people[index].affiliations.indexOf('faculty') >= 0 ? - (rng.nextFloat() > 0.20): //grab most faculty and staff + (rng.nextFloat() > 0.1): //grab most faculty and staff rng.nextFloat() > 0.9; // and only a few others } + //Create vpn users ldap group makeQuestionableVpnUsersLists(people); + //Create Athletics users + makeAthleticsUsersLists(people); + + //Create lists of non-faculty (staff) banner users + makeNonFacultyBannerUsersLists(people); + console.log(people); //Generate Output @@ -170,9 +183,6 @@ output += "eduPersonAffiliation: " + person.affiliations[i] + "\n"; } - /*if (person.vpn_user == 1) {} - output += "member: cn=vpn_users,ou=Groups,dc=internet2,dc=edu\n"; -*/ return output + "\n"; } @@ -303,9 +313,44 @@ } } - document.getElementById('csv').value = csvOutput; - document.getElementById('gsh').value = gshOutput; + document.getElementById('vpnCsv').value = csvOutput; + document.getElementById('vpnGsh').value = gshOutput; } + + function makeAthleticsUsersLists(people) { + var csvOutput = ""; + var gshOutput = 'addGroup("app:mfa:ref", "athletics_dept", "athletics_dept");\n'; + var sampleCount = 15; + + for (i = 0; i < people.length && sampleCount > 0; i++) { + if (people[i].affiliations.indexOf('staff') >= 0 & rng.nextFloat() > 0.75) { + csvOutput = csvOutput + people[i].uid + "\n"; + gshOutput = gshOutput + 'addMember("app:mfa:ref:athletics_dept","' + people[i].uid + '");\n'; + sampleCount--; + } + } + + document.getElementById('athleticsCsv').value = csvOutput; + document.getElementById('athleticsGsh').value = gshOutput; + } + + function makeNonFacultyBannerUsersLists(people) { + var csvOutput = ""; + var gshOutput = 'addGroup("app:mfa:ref", "NonFacultyBannerINB", "NonFacultyBannerINB");\n'; + var sampleCount = 35; + + for (i = 100; i < people.length && sampleCount > 0; i++) { + if (people[i].affiliations.indexOf('staff') >= 0 & rng.nextFloat() > 0.75) { + csvOutput = csvOutput + people[i].uid + "\n"; + gshOutput = gshOutput + 'addMember("app:mfa:ref:NonFacultyBannerINB","' + people[i].uid + '");\n'; + sampleCount--; + } + } + + document.getElementById('bannerCsv').value = csvOutput; + document.getElementById('bannerGsh').value = gshOutput; + } + @@ -318,16 +363,29 @@
- Ldif:
+ Ldif:
Sql:
- Questionable VPN Users CSV:
+ Questionable VPN Users CSV:
+
+ Questionable VPN Users GSH:
+
+ Athletic Dept CSV:
+
+ Atheltics Dept GSH:
+
+ Non-faculty Banner Users CSV:
- Questionable VPN Users GSH:
+ Non-faculty Banner Users GSH: