diff --git a/Workbench/ad/container_files/start.sh b/Workbench/ad/container_files/start.sh deleted file mode 100644 index dbc65c1..0000000 --- a/Workbench/ad/container_files/start.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash -# based on work at https://github.com/Fmstrat/samba-domain - -set -e - -appSetup () { - - # Set variables - DOMAIN=${DOMAIN:-SAMDOM.LOCAL} - DOMAINPASS=${DOMAINPASS:-password} - JOIN=${JOIN:-false} - JOINSITE=${JOINSITE:-NONE} - MULTISITE=${MULTISITE:-false} - NOCOMPLEXITY=${NOCOMPLEXITY:-false} - INSECURELDAP=${INSECURELDAP:-false} - DNSFORWARDER=${DNSFORWARDER:-NONE} - HOSTIP=${HOSTIP:-NONE} - - LDOMAIN=${DOMAIN,,} - UDOMAIN=${DOMAIN^^} - URDOMAIN=${UDOMAIN%%.*} - - # If multi-site, we need to connect to the VPN before joining the domain - if [[ ${MULTISITE,,} == "true" ]]; then - /usr/sbin/openvpn --config /docker.ovpn & - VPNPID=$! - echo "Sleeping 30s to ensure VPN connects ($VPNPID)"; - sleep 30 - fi - - # Set host ip option - if [[ "$HOSTIP" != "NONE" ]]; then - HOSTIP_OPTION="--host-ip=$HOSTIP" - else - HOSTIP_OPTION="" - fi - - # Set up samba - mv /etc/krb5.conf /etc/krb5.conf.orig - echo "[libdefaults]" > /etc/krb5.conf - echo " dns_lookup_realm = false" >> /etc/krb5.conf - echo " dns_lookup_kdc = true" >> /etc/krb5.conf - echo " default_realm = ${UDOMAIN}" >> /etc/krb5.conf - # If the finished file isn't there, this is brand new, we're not just moving to a new container - if [[ ! -f /etc/samba/external/smb.conf ]]; then - mv /etc/samba/smb.conf /etc/samba/smb.conf.orig - if [[ ${JOIN,,} == "true" ]]; then - if [[ ${JOINSITE} == "NONE" ]]; then - samba-tool domain join ${LDOMAIN} DC -U"${URDOMAIN}\administrator" --password="${DOMAINPASS}" --dns-backend=SAMBA_INTERNAL - else - samba-tool domain join ${LDOMAIN} DC -U"${URDOMAIN}\administrator" --password="${DOMAINPASS}" --dns-backend=SAMBA_INTERNAL --site=${JOINSITE} - fi - else - samba-tool domain provision --use-rfc2307 --domain=${URDOMAIN} --realm=${UDOMAIN} --server-role=dc --dns-backend=SAMBA_INTERNAL --adminpass=${DOMAINPASS} ${HOSTIP_OPTION} - if [[ ${NOCOMPLEXITY,,} == "true" ]]; then - samba-tool domain passwordsettings set --complexity=off - samba-tool domain passwordsettings set --history-length=0 - samba-tool domain passwordsettings set --min-pwd-age=0 - samba-tool domain passwordsettings set --max-pwd-age=0 - fi - fi - sed -i "/\[global\]/a \ - \\\tidmap_ldb:use rfc2307 = yes\\n\ - wins support = yes\\n\ - template shell = /bin/bash\\n\ - winbind nss info = rfc2307\\n\ - idmap config ${URDOMAIN}: range = 10000-20000\\n\ - idmap config ${URDOMAIN}: backend = ad\ - " /etc/samba/smb.conf - if [[ $DNSFORWARDER != "NONE" ]]; then - sed -i "/\[global\]/a \ - \\\tdns forwarder = ${DNSFORWARDER}\ - " /etc/samba/smb.conf - fi - if [[ ${INSECURELDAP,,} == "true" ]]; then - sed -i "/\[global\]/a \ - \\\tldap server require strong auth = no\ - " /etc/samba/smb.conf - fi - # Once we are set up, we'll make a file so that we know to use it if we ever spin this up again - cp /etc/samba/smb.conf /etc/samba/external/smb.conf - else - cp /etc/samba/external/smb.conf /etc/samba/smb.conf - fi - - # Set up supervisor - echo "[supervisord]" > /etc/supervisor/conf.d/supervisord.conf - echo "nodaemon=true" >> /etc/supervisor/conf.d/supervisord.conf - echo "" >> /etc/supervisor/conf.d/supervisord.conf - echo "[program:samba]" >> /etc/supervisor/conf.d/supervisord.conf - echo "command=/usr/sbin/samba -i" >> /etc/supervisor/conf.d/supervisord.conf - if [[ ${MULTISITE,,} == "true" ]]; then - if [[ -n $VPNPID ]]; then - kill $VPNPID - fi - echo "" >> /etc/supervisor/conf.d/supervisord.conf - echo "[program:openvpn]" >> /etc/supervisor/conf.d/supervisord.conf - echo "command=/usr/sbin/openvpn --config /docker.ovpn" >> /etc/supervisor/conf.d/supervisord.conf - fi - - appStart -} - -appStart () { - /usr/bin/supervisord -} - -case "$1" in - start) - if [[ -f /etc/samba/external/smb.conf ]]; then - cp /etc/samba/external/smb.conf /etc/samba/smb.conf - appStart - else - echo "Config file is missing." - fi - ;; - setup) - # If the supervisor conf isn't there, we're spinning up a new container - if [[ -f /etc/supervisor/conf.d/supervisord.conf ]]; then - appStart - else - appSetup - fi - ;; -esac - -exit 0 - diff --git a/Workbench/add-ref-groups.gsh b/Workbench/add-ref-groups.gsh deleted file mode 100644 index b4561f9..0000000 --- a/Workbench/add-ref-groups.gsh +++ /dev/null @@ -1,21 +0,0 @@ - -def addGroups(gs,stem,owner,regexp) { - for (group in stem.childGroups) { - if (!group.name.endsWith('_includes') && - !group.name.endsWith('_excludes') && - !group.name.endsWith('_systemOfRecord') && - !group.name.endsWith('_systemOfRecordAndIncludes') && - (regexp == null || group.extension ==~ regexp)) { - println 'Adding: ' + group - def s = SubjectFinder.findById(group.getId(), 'group', 'g:gsa') - owner.addMember(s, false) - } else { - println 'Ignoring: ' + group - } - } -} - -gs = GrouperSession.startRootSession() -def cs = GroupFinder.findByName(gs, "app:cs", true) - -addGroups(gs, StemFinder.findByName(gs, 'ref:course'), cs, /CS.*/) diff --git a/Workbench/add-ref-groups.sh b/Workbench/add-ref-groups.sh deleted file mode 100755 index bfb93cf..0000000 --- a/Workbench/add-ref-groups.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -source ../../library.bash - -execute_gsh grouper_grouper_daemon_1 add-ref-groups.gsh diff --git a/Workbench/after-installation.sh b/Workbench/after-installation.sh deleted file mode 100755 index aefe3b1..0000000 --- a/Workbench/after-installation.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -B='\033[1;33m' -N='\033[0m' - -echo -e "${B} * Uploading objects...${N}" -$(dirname "$0")/upload-objects.sh - -echo -e "${B} * Testing resources...${N}" -$(dirname "$0")/test-resources.sh - -echo -e "${B} * Recomputing Grouper admin group and user object...${N}" -$(dirname "$0")/recompute.sh - -echo -e "${B} * Done${N}" diff --git a/Workbench/cloudformation/aws.json b/Workbench/cloudformation/aws.json deleted file mode 100644 index 44f8ca2..0000000 --- a/Workbench/cloudformation/aws.json +++ /dev/null @@ -1 +0,0 @@ -# initial commit diff --git a/Workbench/comanage/container_files/system/setservername.sh b/Workbench/comanage/container_files/system/setservername.sh deleted file mode 100644 index 6b16d28..0000000 --- a/Workbench/comanage/container_files/system/setservername.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -files="/etc/shibboleth/idp-metadata.xml" - -for file in $files - do - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done \ No newline at end of file diff --git a/Workbench/comanage_cron/container_files/system/runcomangejob.sh b/Workbench/comanage_cron/container_files/system/runcomangejob.sh deleted file mode 100644 index cd10dc3..0000000 --- a/Workbench/comanage_cron/container_files/system/runcomangejob.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# ensure php is in the path -export PATH=$PATH:/usr/local/bin - -if [ "$#" -ne 1 ]; - then - echo Executing job to run expirations, syncorgsources, and groupvalidity tasks - cd /srv/comanage-registry/app && Console/cake job -q - exit -fi - -echo Executing job shell for CO number $1 -cd /srv/comanage-registry/app && Console/cake job -q -r -c $1 -echo Done executing job shell for CO number $1 diff --git a/Workbench/comanage_cron/container_files/system/setupcroncomanage.sh b/Workbench/comanage_cron/container_files/system/setupcroncomanage.sh deleted file mode 100644 index 17ed283..0000000 --- a/Workbench/comanage_cron/container_files/system/setupcroncomanage.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# COmanage Registry shell script to install TIER beacon crontab -# -# Portions licensed to the University Corporation for Advanced Internet -# Development, Inc. ("UCAID") under one or more contributor license agreements. -# See the NOTICE file distributed with this work for additional information -# regarding copyright ownership. -# -# UCAID licenses this file to you under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -CRONFILE='/tmp/cronfile' - -# Set up job scripts for COmanage Cos - -echo "# Run the job queue for CO 1 every 5 minutes" >> "${CRONFILE}" -#echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * * cd /srv/comanage-registry/app && Console/cake job -q -r -c 1 >> /tmp/cron.log" >> "${CRONFILE}" -echo "* * * * * /usr/local/bin/runcomangejob.sh 1" >> "${CRONFILE}" -echo "# Run the job queue for CO 2 every 5 minutes, but 2 minutes later than for CO 1" >> "${CRONFILE}" -echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/runcomangejob.sh 2 " >> "${CRONFILE}" -echo "# TODO support an arbitrary number of COs for jobshell" >> "${CRONFILE}" -echo "# Deprecated job to run expirations, syncorgsources, and groupvalidity tasks (until Registry v4.0.0)" >> "${CRONFILE}" -echo "0 * * * * cd /srv/comanage-registry/app && Console/cake job -q" >> "${CRONFILE}" - -chmod 644 "${CRONFILE}" -crontab "${CRONFILE}" - diff --git a/Workbench/create-ref-loaders.gsh b/Workbench/create-ref-loaders.gsh deleted file mode 100644 index 0cfdcdf..0000000 --- a/Workbench/create-ref-loaders.gsh +++ /dev/null @@ -1,31 +0,0 @@ -gs = GrouperSession.startRootSession() - -group = new GroupSave(gs).assignName("etc:affiliationLoader").assignCreateParentStemsIfNotExist(true).save() -group.addType(GroupTypeFinder.find("grouperLoader")) -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderType", "SQL_GROUP_LIST") -group.setAttribute("grouperLoaderScheduleType", "CRON") -group.setAttribute("grouperLoaderQuartzCron", "0 * * * * ?") -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderGroupTypes", "addIncludeExclude") -group.setAttribute("grouperLoaderQuery", "SELECT concat('ref:affiliation:',affiliation,'_systemOfRecord') as GROUP_NAME, uid as SUBJECT_ID, 'ldap' as SUBJECT_SOURCE_ID from SIS_AFFILIATIONS") - -group = new GroupSave(gs).assignName("etc:deptLoader").assignCreateParentStemsIfNotExist(true).save() -group.addType(GroupTypeFinder.find("grouperLoader")) -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderType", "SQL_GROUP_LIST") -group.setAttribute("grouperLoaderScheduleType", "CRON") -group.setAttribute("grouperLoaderQuartzCron", "0 * * * * ?") -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderQuery", "SELECT concat('ref:dept:',department) as GROUP_NAME, uid as SUBJECT_ID, 'ldap' as SUBJECT_SOURCE_ID from SIS_PERSONS where department is not null") - -group = new GroupSave(gs).assignName("etc:coursesLoader").assignCreateParentStemsIfNotExist(true).save() -group.addType(GroupTypeFinder.find("grouperLoader")) -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderType", "SQL_GROUP_LIST") -group.setAttribute("grouperLoaderScheduleType", "CRON") -group.setAttribute("grouperLoaderQuartzCron", "0 * * * * ?") -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderQuery", "SELECT concat('ref:course:',courseId) as GROUP_NAME, uid as SUBJECT_ID, 'ldap' as SUBJECT_SOURCE_ID from SIS_COURSES") - -edu.internet2.middleware.grouper.app.loader.GrouperLoaderType.scheduleLoads() diff --git a/Workbench/create-ref-loaders.sh b/Workbench/create-ref-loaders.sh deleted file mode 100755 index c9cd9cc..0000000 --- a/Workbench/create-ref-loaders.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ../../library.bash - -execute_gsh grouper_grouper_daemon_1 create-ref-loaders.gsh diff --git a/Workbench/get-import-sis-persons-status.sh b/Workbench/get-import-sis-persons-status.sh deleted file mode 100755 index 26d3fcd..0000000 --- a/Workbench/get-import-sis-persons-status.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ../../library.bash - -get_task_execution_status "Import from SIS persons" diff --git a/Workbench/grouper_data/container_files/bootstrap/initialize.gsh b/Workbench/grouper_data/container_files/bootstrap/initialize.gsh deleted file mode 100644 index 2412b28..0000000 --- a/Workbench/grouper_data/container_files/bootstrap/initialize.gsh +++ /dev/null @@ -1,97 +0,0 @@ -System.out.println("************** initialize.gsh starting...") - -gs = GrouperSession.startRootSession() - -addStem("", "app", "app") -addStem("", "basis", "basis") -addStem("", "bundle", "bundle") -addStem("", "org", "org") -addStem("", "test", "test") - -addRootStem("ref", "ref") -addStem("ref", "course", "Course") -addStem("ref", "dept", "Department") -addStem("ref", "affiliation", "Affiliation") - -new GroupSave().assignName("ref:affiliation:alum").assignDisplayName("Alumni").assignCreateParentStemsIfNotExist(true).save(); -new GroupSave().assignName("ref:affiliation:community").assignDisplayName("Community").assignCreateParentStemsIfNotExist(true).save(); -new GroupSave().assignName("ref:affiliation:faculty").assignDisplayName("Faculty").assignCreateParentStemsIfNotExist(true).save(); -new GroupSave().assignName("ref:affiliation:member").assignDisplayName("Member").assignCreateParentStemsIfNotExist(true).save(); -new GroupSave().assignName("ref:affiliation:staff").assignDisplayName("Staff").assignCreateParentStemsIfNotExist(true).save(); -new GroupSave().assignName("ref:affiliation:student").assignDisplayName("Student").assignCreateParentStemsIfNotExist(true).save(); - -group = GroupFinder.findByName(gs, "etc:sysadmingroup", true) -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_SIMPLE") -attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(), "(cn=sysadmingroup)") -attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSearchDnName(), "ou=midpoint,ou=Groups") -attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(), "demo") -attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSourceIdName(), "ldap") -attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectExpressionName(), '${loaderLdapElUtils.convertDnToSpecificValue(subjectId)}') -attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(), "uniqueMember") -attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(), "subjectId") - -admins = new GroupSave(gs).assignName("app:wordpress:admins").assignCreateParentStemsIfNotExist(true).save() -editors = new GroupSave(gs).assignName("app:wordpress:editors").assignCreateParentStemsIfNotExist(true).save() -chess = new GroupSave(gs).assignName("app:mailinglist:chess").assignCreateParentStemsIfNotExist(true).save() -idmfans = new GroupSave(gs).assignName("app:mailinglist:idm-fans").assignCreateParentStemsIfNotExist(true).save() -cs = new GroupSave(gs).assignName("app:cs").assignCreateParentStemsIfNotExist(true).save() -volunteers = new GroupSave(gs).assignName("test:volunteers").assignCreateParentStemsIfNotExist(true).save() - - -group = new GroupSave(gs).assignName("etc:affiliationLoader").assignCreateParentStemsIfNotExist(true).save() -group.addType(GroupTypeFinder.find("grouperLoader")) -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderType", "SQL_GROUP_LIST") -group.setAttribute("grouperLoaderScheduleType", "CRON") -group.setAttribute("grouperLoaderQuartzCron", "0 * * * * ?") -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderGroupTypes", "addIncludeExclude") -group.setAttribute("grouperLoaderQuery", "SELECT concat('ref:affiliation:',affiliation,'_systemOfRecord') as GROUP_NAME, uid as SUBJECT_IDENTIFIER, 'ldap' as SUBJECT_SOURCE_ID from SIS_AFFILIATIONS") - -group = new GroupSave(gs).assignName("etc:deptLoader").assignCreateParentStemsIfNotExist(true).save() -group.addType(GroupTypeFinder.find("grouperLoader")) -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderType", "SQL_GROUP_LIST") -group.setAttribute("grouperLoaderScheduleType", "CRON") -group.setAttribute("grouperLoaderQuartzCron", "0 * * * * ?") -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderQuery", "SELECT concat('ref:dept:',department) as GROUP_NAME, uid as SUBJECT_IDENTIFIER, 'ldap' as SUBJECT_SOURCE_ID from SIS_PERSONS where department is not null") - -group = new GroupSave(gs).assignName("etc:coursesLoader").assignCreateParentStemsIfNotExist(true).save() -group.addType(GroupTypeFinder.find("grouperLoader")) -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderType", "SQL_GROUP_LIST") -group.setAttribute("grouperLoaderScheduleType", "CRON") -group.setAttribute("grouperLoaderQuartzCron", "0 * * * * ?") -group.setAttribute("grouperLoaderDbName", "sis") -group.setAttribute("grouperLoaderQuery", "SELECT concat('ref:course:',courseId) as GROUP_NAME, uid as SUBJECT_IDENTIFIER, 'ldap' as SUBJECT_SOURCE_ID from SIS_COURSES") - -edu.internet2.middleware.grouper.app.loader.GrouperLoaderType.scheduleLoads() - - - -def addGroups(gs,stem,owner,regexp) { - for (group in stem.childGroups) { - if (!group.name.endsWith('_includes') && - !group.name.endsWith('_excludes') && - !group.name.endsWith('_systemOfRecord') && - !group.name.endsWith('_systemOfRecordAndIncludes') && - (regexp == null || group.extension ==~ regexp)) { - println 'Adding: ' + group - def s = SubjectFinder.findById(group.getId(), 'group', 'g:gsa') - owner.addMember(s, false) - } else { - println 'Ignoring: ' + group - } - } -} - -def cs = GroupFinder.findByName(gs, "app:cs", true) - -gs = GrouperSession.startRootSession() -addGroups(gs, StemFinder.findByName(gs, 'ref:course'), cs, /CS.*/) - -System.out.println("************** initialize.gsh done.") diff --git a/Workbench/grouper_data/container_files/bootstrap/set-prov.gsh b/Workbench/grouper_data/container_files/bootstrap/set-prov.gsh deleted file mode 100644 index 2cc4bbc..0000000 --- a/Workbench/grouper_data/container_files/bootstrap/set-prov.gsh +++ /dev/null @@ -1,37 +0,0 @@ - -provisioner_name="midPoint"; -GrouperSession grouperSession = GrouperSession.startRootSession(); - -def setProvOnStem(grouperSession,provisioner_name,folder_name) { - AttributeAssign attributeAssignMarker = null; - attributeAssignMarker = new AttributeAssignSave(grouperSession).assignOwnerStemName(folder_name).assignNameOfAttributeDefName("etc:provisioning:provisioningMarker").save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningDirectAssign").addValue("true").save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningDoProvision").addValue(provisioner_name).save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningStemScope").addValue("sub").save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningTarget").addValue(provisioner_name).save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningMetadataJson").addValue("{\"destination\":\"midpoint\",\"actor\":\"initial load\"}").save(); - -} - -def setProvOnGroup(grouperSession,provisioner_name,group_name) { - AttributeAssign attributeAssignMarker = null; - attributeAssignMarker = new AttributeAssignSave(grouperSession).assignOwnerGroupName(group_name).assignNameOfAttributeDefName("etc:provisioning:provisioningMarker").save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningDirectAssign").addValue("true").save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningDoProvision").addValue(provisioner_name).save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningStemScope").addValue("sub").save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningTarget").addValue(provisioner_name).save(); - new AttributeAssignSave(grouperSession).assignOwnerAttributeAssign(attributeAssignMarker).assignNameOfAttributeDefName("etc:provisioning:provisioningMetadataJson").addValue("{\"destination\":\"midpoint\",\"actor\":\"initial load\"}").save(); - -} - -setProvOnStem(grouperSession,provisioner_name,"app") -setProvOnStem(grouperSession,provisioner_name,"test") -setProvOnStem(grouperSession,provisioner_name,"ref:dept") -setProvOnStem(grouperSession,provisioner_name,"ref:course") -setProvOnGroup(grouperSession,provisioner_name,"ref:affiliation:alum") -setProvOnGroup(grouperSession,provisioner_name,"ref:affiliation:community") -setProvOnGroup(grouperSession,provisioner_name,"ref:affiliation:faculty") -setProvOnGroup(grouperSession,provisioner_name,"ref:affiliation:member") -setProvOnGroup(grouperSession,provisioner_name,"ref:affiliation:staff") -setProvOnGroup(grouperSession,provisioner_name,"ref:affiliation:student") - diff --git a/Workbench/grouper_ui/container_files/system/setservername.sh b/Workbench/grouper_ui/container_files/system/setservername.sh deleted file mode 100644 index 6b16d28..0000000 --- a/Workbench/grouper_ui/container_files/system/setservername.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -files="/etc/shibboleth/idp-metadata.xml" - -for file in $files - do - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done \ No newline at end of file diff --git a/Workbench/idp/container_files/system/setservername.sh b/Workbench/idp/container_files/system/setservername.sh deleted file mode 100644 index b3d3e0f..0000000 --- a/Workbench/idp/container_files/system/setservername.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -files="/opt/shibboleth-idp/metadata/idp-metadata.xml /opt/shibboleth-idp/metadata/idpui-sp.xml" - -for file in $files - do - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done diff --git a/Workbench/idp_ui/container_files/system/setservername.sh b/Workbench/idp_ui/container_files/system/setservername.sh deleted file mode 100644 index 10c2049..0000000 --- a/Workbench/idp_ui/container_files/system/setservername.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -files="/opt/shibui/application.yml /opt/shibui/saml/idp-metadata.xml" - -for file in $files - do - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done \ No newline at end of file diff --git a/Workbench/idp_ui_api/container_files/system/setservername.sh b/Workbench/idp_ui_api/container_files/system/setservername.sh deleted file mode 100644 index 5804e25..0000000 --- a/Workbench/idp_ui_api/container_files/system/setservername.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -files="/opt/shibui/application.yml" - -for file in $files - do - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done diff --git a/Workbench/midpoint-objects-manual/tasks/task-async-update-grouper.xml b/Workbench/midpoint-objects-manual/tasks/task-async-update-grouper.xml deleted file mode 100644 index 5007ae4..0000000 --- a/Workbench/midpoint-objects-manual/tasks/task-async-update-grouper.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - Grouper async updates - - 1 - - - - - 1552664339630-0-2 - - - - runnable - AsynchronousUpdate - - - - single - loose - restart - diff --git a/Workbench/midpoint-objects-manual/tasks/task-import-sis-persons.xml b/Workbench/midpoint-objects-manual/tasks/task-import-sis-persons.xml deleted file mode 100644 index 58189c0..0000000 --- a/Workbench/midpoint-objects-manual/tasks/task-import-sis-persons.xml +++ /dev/null @@ -1,34 +0,0 @@ - - Import from SIS persons - - account - ri:AccountObjectClass - - - - - - 1535407239440-0-1 - - runnable - ImportingAccounts - - single - loose - diff --git a/Workbench/midpoint-objects-manual/tasks/task-recomputation-users.xml b/Workbench/midpoint-objects-manual/tasks/task-recomputation-users.xml deleted file mode 100644 index 179b565..0000000 --- a/Workbench/midpoint-objects-manual/tasks/task-recomputation-users.xml +++ /dev/null @@ -1,22 +0,0 @@ - - User recomputation - - c:UserType - - - - - - 1571729899646-0-1 - - - - http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#recompute - runnable - Recomputation - single - tight - diff --git a/Workbench/midpoint-objects-manual/tasks/task-reconciliation-grouper-groups.xml b/Workbench/midpoint-objects-manual/tasks/task-reconciliation-grouper-groups.xml deleted file mode 100644 index 4e024cc..0000000 --- a/Workbench/midpoint-objects-manual/tasks/task-reconciliation-grouper-groups.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Grouper reconciliation (groups) - - ri:Group - - - - - 605a0127-a313-442a-9d5e-151eac8b0745 - - - - runnable - Reconciliation - - - - single - loose - restart - diff --git a/Workbench/midpoint_server/container_files/system/setservername.sh b/Workbench/midpoint_server/container_files/system/setservername.sh deleted file mode 100644 index 0913b66..0000000 --- a/Workbench/midpoint_server/container_files/system/setservername.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -files="/opt/midpoint/var/post-initial-objects/securityPolicy/000-security-policy.xml /etc/shibboleth/idp-metadata.xml" - -for file in $files - do - echo "Editing file $file with value $CSPHOSTNAME" - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done diff --git a/Workbench/mq/container_files/usr-local-bin/demo-entrypoint.sh b/Workbench/mq/container_files/usr-local-bin/demo-entrypoint.sh deleted file mode 100755 index 7355248..0000000 --- a/Workbench/mq/container_files/usr-local-bin/demo-entrypoint.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [ ! -e $RABBITMQ_INIT_DONE_FILE ]; then - /usr/local/bin/initialize-rabbitmq.sh & -else - echo "RabbitMQ was already initialized" -fi -/usr/local/bin/entrypoint.sh "$@" diff --git a/Workbench/mq/container_files/usr-local-bin/initialize-rabbitmq.sh b/Workbench/mq/container_files/usr-local-bin/initialize-rabbitmq.sh deleted file mode 100755 index c68f18e..0000000 --- a/Workbench/mq/container_files/usr-local-bin/initialize-rabbitmq.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e - -echo "Executing RabbitMQ initialization" -echo "Waiting for the server to start up..." -rabbitmqctl -t 30 wait $RABBITMQ_PID_FILE -echo "OK, creating sampleQueue..." -rabbitmqadmin declare queue name=sampleQueue -rabbitmqctl change_password guest password -echo "Done" -touch $RABBITMQ_INIT_DONE_FILE diff --git a/Workbench/purge-queue.sh b/Workbench/purge-queue.sh deleted file mode 100755 index 2633e4d..0000000 --- a/Workbench/purge-queue.sh +++ /dev/null @@ -1 +0,0 @@ -docker exec grouper_mq_1 rabbitmqctl purge_queue sampleQueue diff --git a/Workbench/recompute.sh b/Workbench/recompute.sh deleted file mode 100755 index 0d9633e..0000000 --- a/Workbench/recompute.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -source $(dirname "$0")/../../library.bash - -recompute orgs d48ec05b-fffd-4262-acd3-d9ff63365b62 -recompute users e897468f-20bd-419c-8fc5-1fe60e2600de diff --git a/Workbench/scripts/refresh-this-instance.sh b/Workbench/scripts/refresh-this-instance.sh deleted file mode 100755 index fb84485..0000000 --- a/Workbench/scripts/refresh-this-instance.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -. /etc/profile - -DELETE_VOLUMES="false" - -if [[ $1 == "-dv" ]]; then - echo "will delete volumes..." - DELETE_VOLUMES="true" -fi - -function DisplayUsage() { -echo "** This script will bring down the workbench containers, " -echo "grab the latest workbench code and config from the main repo, " -echo "then restart the containers." -echo "" - echo "Usage:" - echo "$0 [-dv]" - echo "" - echo "Pass the -dv flag to also delete data volumes when refreshing this instance." - echo "" - exit 1 -} - -if [[ $1 == "--?" ]] | [[ $1 == "--help" ]]; then - DisplayUsage -fi -if [[ $# -eq 1 ]]; then - if [[ $1 != "-dv" ]]; then DisplayUsage; fi -fi - -pushd /csp-tap/InCommonTAP-Examples/Workbench -docker-compose down -if [[ $DELETE_VOLUMES == "true" ]]; then - echo "deleting volumes..." - docker volume rm $(docker volume ls -q) -fi -git pull -docker-compose up --build -d -popd diff --git a/Workbench/scripts/setupcron.sh b/Workbench/scripts/setupcron.sh deleted file mode 100755 index afd1f5c..0000000 --- a/Workbench/scripts/setupcron.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -CRONFILE=/csp-tap/InCommonTAP-Examples/Workbench/scripts/csp-cron - -#build crontab file -echo "#update CSP container status" > ${CRONFILE} -echo "*/3 * * * * /csp-tap/InCommonTAP-Examples/Workbench/scripts/update-health-status.sh" >> ${CRONFILE} -chmod 644 ${CRONFILE} - -#install crontab -crontab ${CRONFILE} diff --git a/Workbench/scripts/update-health-status.sh b/Workbench/scripts/update-health-status.sh deleted file mode 100755 index c981f42..0000000 --- a/Workbench/scripts/update-health-status.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -/csp-tap/InCommonTAP-Examples/Workbench/scripts/gethealth.py > /csp-tap/InCommonTAP-Examples/Workbench/scripts/gethealth-output.txt - -docker cp /csp-tap/InCommonTAP-Examples/Workbench/scripts/gethealth-output.txt workbench_webproxy_1:/var/www/html/status/index.html \ No newline at end of file diff --git a/Workbench/show-queue-size.sh b/Workbench/show-queue-size.sh deleted file mode 100755 index 0af6d80..0000000 --- a/Workbench/show-queue-size.sh +++ /dev/null @@ -1 +0,0 @@ -docker exec grouper_mq_1 rabbitmqctl list_queues diff --git a/Workbench/ssh-tunnel-redir-fix.sh b/Workbench/ssh-tunnel-redir-fix.sh deleted file mode 100755 index 8a55495..0000000 --- a/Workbench/ssh-tunnel-redir-fix.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# This file is used for trainings with SSH tunnels. -# It will change the hard-coded ports for Shibboleth, but will keep localhost. - -declare -a fileList=( -"configs-and-secrets/midpoint/shibboleth/idp-metadata.xml" -"configs-and-secrets/grouper/shibboleth/idp-metadata.xml" -"idp/shibboleth-idp/metadata/idp-metadata.xml" -"idp/shibboleth-idp/metadata/grouper-sp.xml" -"idp/shibboleth-idp/metadata/midpoint-sp.xml" -"idp/shibboleth-idp/metadata/midpoint-sp-new.xml" -"idp/shibboleth-idp/metadata/wordpress-sp.xml" -) - -if [ $# -eq 0 ] -then - echo 'Please specify a directory as the first argument (e.g. ".")' - exit -fi - -echo "Working in directory: $1"; -for f in "${fileList[@]}" -do - echo "Replacing in: $1/$f..." - # We cannot SSH tunnel port 443 without root, so using 10443 - sed -i 's#https://localhost/#https://localhost:10443/#g' $f -# sed -i 's#https://localhost:4443/#https://localhost:14443/#g' $f -done - -exit diff --git a/Workbench/test-resources.sh b/Workbench/test-resources.sh deleted file mode 100755 index 1a0fe2f..0000000 --- a/Workbench/test-resources.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -source $(dirname "$0")/../../library.bash - -test_resource 0a37121f-d515-4a23-9b6d-554c5ef61272 -test_resource 4d70a0da-02dd-41cf-b0a1-00e75d3eaa15 -test_resource a343fc2e-3954-4034-ba1a-2b72c21e577a -test_resource e417225d-8a08-46f3-9b5d-624990b52386 -test_resource fe805d13-481b-43ec-97d8-9d2df72cd38e -test_resource 1eff65de-5bb6-483d-9edf-8cc2c2ee0233 -test_resource 10000000-9999-9999-0000-a000ff000001 - diff --git a/Workbench/tests/main.bats b/Workbench/tests/main.bats deleted file mode 100644 index ad492c1..0000000 --- a/Workbench/tests/main.bats +++ /dev/null @@ -1,303 +0,0 @@ -#!/usr/bin/env bats - -load ../../../common -load ../../../library - -@test "000 Cleanup before running the tests" { - (cd ../simple ; docker-compose down -v) - (cd ../shibboleth ; docker-compose down -v) - (cd ../postgresql ; docker-compose down -v) - docker-compose down -v -} - -@test "010 Initialize and start the composition" { - # We want to fail cleanly if there's any interference - docker ps - ! (docker ps | grep -E "shibboleth_(idp|directory)_1|(grouper|simple|shibboleth|postgresql)_(midpoint_server|midpoint_data)_1") - docker-compose build --pull grouper_daemon grouper_ui grouper_data directory sources midpoint_data idp mq - # Sometimes the tier/midpoint:xyz is not yet in the repository, causing issues with --pull - docker-compose build midpoint_server - docker-compose up -d -} - -@test "020 Wait until components are started" { - touch $BATS_TMPDIR/not-started - wait_for_midpoint_start grouper_midpoint_server_1 grouper_midpoint_data_1 - wait_for_shibboleth_idp_start grouper_idp_1 - wait_for_grouper_ui_start grouper_grouper_ui_1 - rm $BATS_TMPDIR/not-started -} - -@test "040 Check midPoint health" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - check_health -} - -@test "050 Check Shibboleth IDP health" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - check_health_shibboleth_idp -} - -#@test "060 Check Grouper health" { -# if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi -# skip TODO -#} - -@test "100 Get 'administrator'" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - check_health - get_and_check_object users 00000000-0000-0000-0000-000000000002 administrator -} - -@test "110 And and get 'test110'" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - check_health - echo "test110" >/tmp/test110.xml - add_object users /tmp/test110.xml - rm /tmp/test110.xml - search_and_check_object users test110 - delete_object_by_name users test110 -} - -@test "200 Upload objects" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - # reduce data in SIS database so imports will take reasonable time - docker exec grouper_sources_1 mysql sis -u root -p123321 -e "delete from SIS_COURSES where uid not in ('amorrison', 'banderson', 'cmorrison', 'danderson', 'ddavis', 'jsmith', 'kwhite', 'mroberts', 'whenderson', 'wprice')" - docker exec grouper_sources_1 mysql sis -u root -p123321 -e "delete from SIS_AFFILIATIONS where uid not in ('amorrison', 'banderson', 'cmorrison', 'danderson', 'ddavis', 'jsmith', 'kwhite', 'mroberts', 'whenderson', 'wprice')" - docker exec grouper_sources_1 mysql sis -u root -p123321 -e "delete from SIS_PERSONS where uid not in ('amorrison', 'banderson', 'cmorrison', 'danderson', 'ddavis', 'jsmith', 'kwhite', 'mroberts', 'whenderson', 'wprice')" - - check_health - ./upload-objects.sh - - search_and_check_object objectTemplates template-user - - search_and_check_object archetypes affiliation - search_and_check_object archetypes course - search_and_check_object archetypes department - - search_and_check_object orgs affiliations - search_and_check_object orgs courses - search_and_check_object orgs departments - - search_and_check_object resources "LDAP (directory)" - search_and_check_object resources "Grouper Resource" - search_and_check_object resources "SQL SIS persons (sources)" - - search_and_check_object roles metarole-grouper-provided-group - search_and_check_object roles metarole-ldap-group - search_and_check_object roles role-ldap-basic -} - -@test "210 Test resources" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - test_resource 0a37121f-d515-4a23-9b6d-554c5ef61272 - test_resource 4d70a0da-02dd-41cf-b0a1-00e75d3eaa15 - test_resource a343fc2e-3954-4034-ba1a-2b72c21e577a - test_resource e417225d-8a08-46f3-9b5d-624990b52386 - test_resource fe805d13-481b-43ec-97d8-9d2df72cd38e - test_resource 1eff65de-5bb6-483d-9edf-8cc2c2ee0233 -} - -@test "215 Recompute banderson and sysadmingroup" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - ./recompute.sh -} - -@test "220 Import SIS_PERSONS" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - add_object tasks midpoint-objects-manual/tasks/task-import-sis-persons.xml - search_and_check_object tasks "Import from SIS persons" - wait_for_task_completion 22c2a3d0-0961-4255-9eec-c550a79aeaaa 6 10 - assert_task_success 22c2a3d0-0961-4255-9eec-c550a79aeaaa - - search_and_check_object users jsmith - search_and_check_object users banderson - search_and_check_object users kwhite - search_and_check_object users whenderson - search_and_check_object users ddavis - search_and_check_object users cmorrison - search_and_check_object users danderson - search_and_check_object users amorrison - search_and_check_object users wprice - search_and_check_object users mroberts - - check_ldap_account_by_user_name jsmith grouper_directory_1 - check_ldap_account_by_user_name banderson grouper_directory_1 - check_ldap_account_by_user_name kwhite grouper_directory_1 - check_ldap_account_by_user_name whenderson grouper_directory_1 - check_ldap_account_by_user_name ddavis grouper_directory_1 - check_ldap_account_by_user_name cmorrison grouper_directory_1 - check_ldap_account_by_user_name danderson grouper_directory_1 - check_ldap_account_by_user_name amorrison grouper_directory_1 - check_ldap_account_by_user_name wprice grouper_directory_1 - check_ldap_account_by_user_name mroberts grouper_directory_1 -} - -@test "230 Create ref loaders" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - ./create-ref-loaders.sh -} - -@test "235 Wait for loaders to run" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - sleep 120 -} - -@test "240 Create additional ref groups" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - ./add-ref-groups.sh -} - -#@test "250 Check 'TestUser250' in midPoint and LDAP" { -# if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi -# -# check_health -# echo "TestUser250Test User250TestUser250password" >/tmp/testuser250.xml -# add_object users /tmp/testuser250.xml -# rm /tmp/testuser250.xml -# search_and_check_object users TestUser250 -# -# # probably will not work -# execute_bulk_action tests/resources/bulk-action/assign-role-grouper-sysadmin-to-test-user.xml grouper_midpoint_server_1 -# -# check_ldap_account_by_user_name TestUser250 grouper_directory_1 -# check_of_ldap_membership TestUser250 "ou=groups,dc=internet2,dc=edu" "sysadmingroup" grouper_directory_1 -# -# delete_object_by_name users TestUser250 -#} - -@test "310 Import Grouper-to-midPoint async update task" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - check_health - add_object tasks midpoint-objects-manual/tasks/task-async-update-grouper.xml - search_and_check_object tasks "Grouper async updates" -} - -@test "320 Wait for the queue to become empty" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - ATTEMPT=0 - MAX_ATTEMPTS=20 - DELAY=10 - - get_messages sampleQueue - echo "Messages: $MESSAGES" - - until [[ $ATTEMPT = $MAX_ATTEMPTS ]]; do - ATTEMPT=$((ATTEMPT+1)) - get_messages sampleQueue - echo "Messages: $MESSAGES" - if [ "$MESSAGES" = "0" ]; then return 0; fi - echo "Waiting $DELAY seconds for the queue to become empty (attempt $ATTEMPT) ..." - sleep $DELAY - done - return 1 -} - -@test "330 Check groups in midPoint and LDAP" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - search_and_check_object orgs course_ACCT101 - search_and_check_object orgs course_ACCT201 - search_and_check_object orgs course_CS251 - search_and_check_object orgs course_CS252 - search_and_check_object orgs course_MATH100 - search_and_check_object orgs course_MATH101 - search_and_check_object orgs course_SCI123 - search_and_check_object orgs course_SCI404 - - check_ldap_courses_by_name course_ACCT101 grouper_directory_1 - check_ldap_courses_by_name course_ACCT201 grouper_directory_1 - check_ldap_courses_by_name course_CS251 grouper_directory_1 - check_ldap_courses_by_name course_CS252 grouper_directory_1 - check_ldap_courses_by_name course_MATH100 grouper_directory_1 - check_ldap_courses_by_name course_MATH101 grouper_directory_1 - check_ldap_courses_by_name course_SCI123 grouper_directory_1 - check_ldap_courses_by_name course_SCI404 grouper_directory_1 -} - -@test "340 Execute triggers and check group membership in LDAP" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - sleep 60 - run_task_now "00000000-0000-0000-0000-000000000007" grouper_midpoint_server_1 - sleep 30 - -# memberships will be there only after triggers are executed - - check_of_ldap_membership amorrison "ou=courses,ou=groups,dc=internet2,dc=edu" "ACCT101" grouper_directory_1 - check_of_ldap_membership cmorrison "ou=courses,ou=groups,dc=internet2,dc=edu" "ACCT101" grouper_directory_1 - check_of_ldap_membership mroberts "ou=courses,ou=groups,dc=internet2,dc=edu" "ACCT101" grouper_directory_1 - check_of_ldap_membership whenderson "ou=courses,ou=groups,dc=internet2,dc=edu" "ACCT101" grouper_directory_1 - - check_of_ldap_membership amorrison "ou=courses,ou=groups,dc=internet2,dc=edu" "CS251" grouper_directory_1 - check_of_ldap_membership cmorrison "ou=courses,ou=groups,dc=internet2,dc=edu" "CS251" grouper_directory_1 - check_of_ldap_membership ddavis "ou=courses,ou=groups,dc=internet2,dc=edu" "CS251" grouper_directory_1 - check_of_ldap_membership mroberts "ou=courses,ou=groups,dc=internet2,dc=edu" "CS251" grouper_directory_1 - - check_of_ldap_membership kwhite "ou=courses,ou=groups,dc=internet2,dc=edu" "CS252" grouper_directory_1 - - check_of_ldap_membership danderson "ou=courses,ou=groups,dc=internet2,dc=edu" "MATH100" grouper_directory_1 - check_of_ldap_membership ddavis "ou=courses,ou=groups,dc=internet2,dc=edu" "MATH100" grouper_directory_1 - check_of_ldap_membership kwhite "ou=courses,ou=groups,dc=internet2,dc=edu" "MATH100" grouper_directory_1 - check_of_ldap_membership wprice "ou=courses,ou=groups,dc=internet2,dc=edu" "MATH100" grouper_directory_1 - - check_of_ldap_membership amorrison "ou=courses,ou=groups,dc=internet2,dc=edu" "MATH101" grouper_directory_1 - check_of_ldap_membership cmorrison "ou=courses,ou=groups,dc=internet2,dc=edu" "MATH101" grouper_directory_1 - check_of_ldap_membership mroberts "ou=courses,ou=groups,dc=internet2,dc=edu" "MATH101" grouper_directory_1 - - check_of_ldap_membership danderson "ou=courses,ou=groups,dc=internet2,dc=edu" "SCI123" grouper_directory_1 - check_of_ldap_membership mroberts "ou=courses,ou=groups,dc=internet2,dc=edu" "SCI123" grouper_directory_1 - - check_of_ldap_membership kwhite "ou=courses,ou=groups,dc=internet2,dc=edu" "SCI404" grouper_directory_1 - check_of_ldap_membership wprice "ou=courses,ou=groups,dc=internet2,dc=edu" "SCI404" grouper_directory_1 -} - -@test "400 Suspend async update task" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - suspend_task 47fc57bd-8c34-4555-9b9f-7087ff179860 grouper_midpoint_server_1 - wait_for_task_completion 47fc57bd-8c34-4555-9b9f-7087ff179860 5 10 -} - -@test "410 Add wprice to 'ref:affiliation:alum_includes' groups" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - docker cp tests/resources/grouper/t410.gsh grouper_grouper_daemon_1:/tmp/ - docker exec grouper_grouper_daemon_1 bash -c "/opt/grouper/grouper.apiBinary/bin/gsh /tmp/t410.gsh" -} - -@test "420 Reconcile Grouper" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - add_object tasks midpoint-objects-manual/tasks/task-reconciliation-grouper-groups.xml - search_and_check_object tasks "Grouper reconciliation (groups)" - wait_for_task_completion 605a0127-a313-442a-9d5e-151eac8b0745 6 10 - assert_task_success 605a0127-a313-442a-9d5e-151eac8b0745 -} - -@test "430 Recompute users" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - add_object tasks midpoint-objects-manual/tasks/task-recomputation-users.xml - search_and_check_object tasks "User recomputation" - wait_for_task_completion 83a737ea-5eb7-4e78-b431-331cccf02354 6 10 - assert_task_success 83a737ea-5eb7-4e78-b431-331cccf02354 -} - -@test "440 Check wprice group membership in LDAP" { - if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi - - check_of_ldap_membership wprice "ou=Affiliations,ou=Groups,dc=internet2,dc=edu" "alum" grouper_directory_1 -} - -@test "999 Clean up" { - docker-compose down -v -} diff --git a/Workbench/tests/resources/bulk-action/assign-role-grouper-sysadmin-to-banderson.xml b/Workbench/tests/resources/bulk-action/assign-role-grouper-sysadmin-to-banderson.xml deleted file mode 100644 index 9ec69a2..0000000 --- a/Workbench/tests/resources/bulk-action/assign-role-grouper-sysadmin-to-banderson.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - c:UserType - - - c:name - banderson - - - - assign - - role - d48ec05b-fffd-4262-acd3-d9ff63365b62 - - - - diff --git a/Workbench/tests/resources/bulk-action/assign-role-grouper-sysadmin-to-test-user.xml b/Workbench/tests/resources/bulk-action/assign-role-grouper-sysadmin-to-test-user.xml deleted file mode 100644 index f8c84b3..0000000 --- a/Workbench/tests/resources/bulk-action/assign-role-grouper-sysadmin-to-test-user.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - c:UserType - - - c:name - TestUser250 - - - - assign - - role - d48ec05b-fffd-4262-acd3-d9ff63365b62 - - - - diff --git a/Workbench/tests/resources/bulk-action/recompute-role-grouper-sysadmin.xml b/Workbench/tests/resources/bulk-action/recompute-role-grouper-sysadmin.xml deleted file mode 100644 index 1356484..0000000 --- a/Workbench/tests/resources/bulk-action/recompute-role-grouper-sysadmin.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - c:RoleType - - - name - role-grouper-sysadmin - - - - recompute - - - diff --git a/Workbench/tests/resources/grouper/old-t410.gsh b/Workbench/tests/resources/grouper/old-t410.gsh deleted file mode 100644 index 69e4b18..0000000 --- a/Workbench/tests/resources/grouper/old-t410.gsh +++ /dev/null @@ -1,11 +0,0 @@ -System.out.println("************** t410.gsh starting **************"); - -gs = GrouperSession.startRootSession() - -testGroup = GroupFinder.findByName(gs, 'midpoint:test') -kwhite = SubjectFinder.findById('kwhite', 'person', 'ldap') -wprice = SubjectFinder.findById('wprice', 'person', 'ldap') -testGroup.deleteMember(kwhite, false) -testGroup.deleteMember(wprice, false) - -System.out.println("************** t410.gsh done **************"); diff --git a/Workbench/tests/resources/grouper/t300.gsh b/Workbench/tests/resources/grouper/t300.gsh deleted file mode 100644 index d2b63e3..0000000 --- a/Workbench/tests/resources/grouper/t300.gsh +++ /dev/null @@ -1,15 +0,0 @@ -System.out.println("************** t300.gsh starting **************"); - -gs = GrouperSession.startRootSession() - -exportedGroups = GroupFinder.findByName(gs, 'etc:exportedGroups') -alumSubject = SubjectFinder.findByIdentifier('ref:affiliation:alum', 'group', 'g:gsa') -exportedGroups.addMember(alumSubject, false) - -alumIncludes = GroupFinder.findByName(gs, 'ref:affiliation:alum_includes') -testGroup = GroupFinder.findByName(gs, 'etc:testGroup') -wprice = SubjectFinder.findById('wprice', 'person', 'ldap') -alumIncludes.addMember(wprice, false) -testGroup.addMember(wprice, false) - -System.out.println("************** t300.gsh done **************"); diff --git a/Workbench/tests/resources/grouper/t350.gsh b/Workbench/tests/resources/grouper/t350.gsh deleted file mode 100644 index d0d2d3e..0000000 --- a/Workbench/tests/resources/grouper/t350.gsh +++ /dev/null @@ -1,12 +0,0 @@ -System.out.println("************** t350.gsh starting **************"); - -gs = GrouperSession.startRootSession() - -alumIncludes = GroupFinder.findByName(gs, 'ref:affiliation:alum_includes') -testGroup = GroupFinder.findByName(gs, 'midpoint:test') -kwhite = SubjectFinder.findById('kwhite', 'person', 'ldap') -wprice = SubjectFinder.findById('wprice', 'person', 'ldap') -testGroup.addMember(kwhite, false) -alumIncludes.deleteMember(wprice, false) - -System.out.println("************** t350.gsh done **************"); diff --git a/Workbench/tests/resources/grouper/t410.gsh b/Workbench/tests/resources/grouper/t410.gsh deleted file mode 100644 index 5c803bd..0000000 --- a/Workbench/tests/resources/grouper/t410.gsh +++ /dev/null @@ -1,9 +0,0 @@ -System.out.println("************** t410.gsh starting **************"); - -gs = GrouperSession.startRootSession() - -alumIncludesGroup = GroupFinder.findByName(gs, 'ref:affiliation:alum_includes') -wprice = SubjectFinder.findById('wprice', 'person', 'ldap') -alumIncludesGroup.addMember(wprice, false) - -System.out.println("************** t410.gsh done **************"); diff --git a/Workbench/tests/resources/rabbitmq/check-samplequeue.sh b/Workbench/tests/resources/rabbitmq/check-samplequeue.sh deleted file mode 100755 index e336a63..0000000 --- a/Workbench/tests/resources/rabbitmq/check-samplequeue.sh +++ /dev/null @@ -1,8 +0,0 @@ -count=$(rabbitmqctl list_queues | grep sampleQueue | awk '{print $2}') -if [[ -z $count || $count -eq 0 ]]; then - echo "ERROR: sampleQueue does not exist or is empty" - exit 1 -else - echo "OK: sampleQueue has $count message(s)" - exit 0 -fi diff --git a/Workbench/tests/resources/tasks/task-livesync-grouper-single.xml b/Workbench/tests/resources/tasks/task-livesync-grouper-single.xml deleted file mode 100644 index 365d007..0000000 --- a/Workbench/tests/resources/tasks/task-livesync-grouper-single.xml +++ /dev/null @@ -1,29 +0,0 @@ - - LiveSync from Grouper - - account - ri:AccountObjectClass - - 1535465478027-0-1 - - runnable - LiveSynchronization - http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3 - - single - loose - diff --git a/Workbench/tests/resources/users/user-grouper-admin.xml b/Workbench/tests/resources/users/user-grouper-admin.xml deleted file mode 100644 index d785e47..0000000 --- a/Workbench/tests/resources/users/user-grouper-admin.xml +++ /dev/null @@ -1,20 +0,0 @@ - - grouper-admin - - - - - - Grouper admin - Grouper - Admin - - - password - - - - diff --git a/Workbench/update-bgasper-in-grouper.gsh b/Workbench/update-bgasper-in-grouper.gsh deleted file mode 100644 index b0ed0b2..0000000 --- a/Workbench/update-bgasper-in-grouper.gsh +++ /dev/null @@ -1,13 +0,0 @@ - -def add(gs,groupName,subject) { - GroupFinder.findByName(gs, groupName, true).addMember(subject, false) -} - -gs = GrouperSession.startRootSession() - -def bgasper = SubjectFinder.findById('bgasper', 'user', 'ldap') -add(gs, 'ref:affiliation:alum_excludes', bgasper) -add(gs, 'ref:affiliation:faculty_includes', bgasper) -add(gs, 'app:mailinglist:chess', bgasper) -add(gs, 'app:mailinglist:idm-fans', bgasper) -add(gs, 'test:volunteers', bgasper) diff --git a/Workbench/update-bgasper-in-grouper.sh b/Workbench/update-bgasper-in-grouper.sh deleted file mode 100755 index 31abf04..0000000 --- a/Workbench/update-bgasper-in-grouper.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ../../library.bash - -execute_gsh grouper_grouper_daemon_1 update-bgasper-in-grouper.gsh diff --git a/Workbench/upload-async-update-task.sh b/Workbench/upload-async-update-task.sh deleted file mode 100755 index bdf8ba2..0000000 --- a/Workbench/upload-async-update-task.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ../../library.bash - -upload_from_file midpoint-objects-manual/tasks/task-async-update-grouper.xml diff --git a/Workbench/upload-import-sis-persons.sh b/Workbench/upload-import-sis-persons.sh deleted file mode 100755 index 058c9af..0000000 --- a/Workbench/upload-import-sis-persons.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ../../library.bash - -upload_from_file midpoint-objects-manual/tasks/task-import-sis-persons.xml diff --git a/Workbench/upload-objects.sh b/Workbench/upload-objects.sh deleted file mode 100755 index 3f1c9b8..0000000 --- a/Workbench/upload-objects.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -function upload () { - local filename=$1 - local regex="midpoint-objects/(.*)/(.*)" - if [[ $filename =~ $regex ]] - then - type="${BASH_REMATCH[1]}" - oid=`cat $filename | sed -n 's:.*oid=\"\([A-Za-z0-9\-]*\)\".*:\1:p' | sed -n '1 p'` - echo "Uploading $filename ($type, $oid)" - curl -k --user administrator:5ecr3t -H "Content-Type: application/xml" -X PUT "https://localhost:8443/midpoint/ws/rest/$type/$oid?options=overwrite&options=raw" --data-binary @$filename - else - echo "Skipping $filename" - fi -} - -find midpoint-objects -name "*.xml" | while read filename; do upload $filename; done diff --git a/Workbench/upload-recompute-users.sh b/Workbench/upload-recompute-users.sh deleted file mode 100755 index 42b5551..0000000 --- a/Workbench/upload-recompute-users.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ../../library.bash - -upload_from_file midpoint-objects-manual/tasks/task-recomputation-users.xml diff --git a/Workbench/upload-reconcile-grouper-groups.sh b/Workbench/upload-reconcile-grouper-groups.sh deleted file mode 100755 index 94deb18..0000000 --- a/Workbench/upload-reconcile-grouper-groups.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source ../../library.bash - -upload_from_file midpoint-objects-manual/tasks/task-reconciliation-grouper-groups.xml diff --git a/Workbench/webproxy/container_files/mdload/addAttrRel.sh b/Workbench/webproxy/container_files/mdload/addAttrRel.sh deleted file mode 100755 index 5b6f7d7..0000000 --- a/Workbench/webproxy/container_files/mdload/addAttrRel.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -HEADER_NAME="IDPUI_API_KEY" -HEADER_VALUE="00c34830-9028-418c-976c-624a61578c8f" - -#first param is internal ID - -#get the current object and add attribute release info -echo "mdload-attr:Fetching current data for object $1" -curl -k -s --location --request GET "https://localhost/idpui-api/api/EntityDescriptor/$1" \ ---header "${HEADER_NAME}: ${HEADER_VALUE}" | jq '.attributeRelease += ["eduPersonPrincipalName","mail","givenName","surname","uid"]' > json.out - -#update the existing object with the added attribute release data -echo "mdload-attr:Adding attribute release info for object $1" -curl -k -s --location --request PUT "https://localhost/idpui-api/api/EntityDescriptor/$1" \ ---header 'Content-Type: application/json' \ ---header "${HEADER_NAME}: ${HEADER_VALUE}" \ ---data-raw "$(cat json.out)" - -rm json.out - diff --git a/Workbench/webproxy/container_files/mdload/loadMD.sh b/Workbench/webproxy/container_files/mdload/loadMD.sh deleted file mode 100755 index 75c7db6..0000000 --- a/Workbench/webproxy/container_files/mdload/loadMD.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -HEADER_NAME="IDPUI_API_KEY" -HEADER_VALUE="00c34830-9028-418c-976c-624a61578c8f" -DIR=/mdload - -#first param is name of SP -#second param is filename of raw metadata -#third param is sleep time - - -pushd $DIR - -#make sure its up -echo "mdload:Sleeping for $3 seconds to ensure availability" -sleep $3 - -#import raw XML -echo "mdload:Importing metadata for $1..." -curl -k -s --location --request POST "https://localhost/idpui-api/api/EntityDescriptor?spName=$1" \ ---header 'Content-Type: application/xml' \ ---header "${HEADER_NAME}: ${HEADER_VALUE}" \ ---data-raw "$(cat $2)" > $DIR/output.txt - -#get ID, set as enabled -ID=$(cat $DIR/output.txt | jq -r '.id') -echo "mdload:Fetched ID for object: $ID" -sleep 5 - -#ensure ID isn't empty -echo "Setting $1 as enabled..." -if [[ -z "$ID" ]]; then - echo "mdload:\$ID : is EMPTY, terminating" - cat $DIR/output.txt - exit 1 -fi - -#validate ID -if [[ $ID =~ ^\{?[A-F0-9a-f]{8}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{4}-[A-F0-9a-f]{12}\}?$ ]]; then - echo "mdload: object ID validated" - curl -k -s --location --request PATCH "https://localhost/idpui-api/api/activate/entityDescriptor/$ID/enable" \ - --header "${HEADER_NAME}: ${HEADER_VALUE}" -else - echo "mdload:Bad response from service, terminating:" - cat $DIR/output.txt - exit 1 -fi - -#add attribute release -$DIR/addAttrRel.sh $ID - -rm $DIR/output.txt - -popd diff --git a/Workbench/webproxy/container_files/mdload/wait-for-it.sh b/Workbench/webproxy/container_files/mdload/wait-for-it.sh deleted file mode 100755 index d990e0d..0000000 --- a/Workbench/webproxy/container_files/mdload/wait-for-it.sh +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env bash -# Use this script to test if a given TCP host/port are available - -WAITFORIT_cmdname=${0##*/} - -echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } - -usage() -{ - cat << USAGE >&2 -Usage: - $WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args] - -h HOST | --host=HOST Host or IP under test - -p PORT | --port=PORT TCP port under test - Alternatively, you specify the host and port as host:port - -s | --strict Only execute subcommand if the test succeeds - -q | --quiet Don't output any status messages - -t TIMEOUT | --timeout=TIMEOUT - Timeout in seconds, zero for no timeout - -- COMMAND ARGS Execute command with args after the test finishes -USAGE - exit 1 -} - -wait_for() -{ - if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then - echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" - else - echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout" - fi - WAITFORIT_start_ts=$(date +%s) - while : - do - if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then - nc -z $WAITFORIT_HOST $WAITFORIT_PORT - WAITFORIT_result=$? - else - (echo -n > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1 - WAITFORIT_result=$? - fi - if [[ $WAITFORIT_result -eq 0 ]]; then - WAITFORIT_end_ts=$(date +%s) - echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds" - break - fi - sleep 1 - done - return $WAITFORIT_result -} - -wait_for_wrapper() -{ - # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 - if [[ $WAITFORIT_QUIET -eq 1 ]]; then - timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & - else - timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & - fi - WAITFORIT_PID=$! - trap "kill -INT -$WAITFORIT_PID" INT - wait $WAITFORIT_PID - WAITFORIT_RESULT=$? - if [[ $WAITFORIT_RESULT -ne 0 ]]; then - echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" - fi - return $WAITFORIT_RESULT -} - -# process arguments -while [[ $# -gt 0 ]] -do - case "$1" in - *:* ) - WAITFORIT_hostport=(${1//:/ }) - WAITFORIT_HOST=${WAITFORIT_hostport[0]} - WAITFORIT_PORT=${WAITFORIT_hostport[1]} - shift 1 - ;; - --child) - WAITFORIT_CHILD=1 - shift 1 - ;; - -q | --quiet) - WAITFORIT_QUIET=1 - shift 1 - ;; - -s | --strict) - WAITFORIT_STRICT=1 - shift 1 - ;; - -h) - WAITFORIT_HOST="$2" - if [[ $WAITFORIT_HOST == "" ]]; then break; fi - shift 2 - ;; - --host=*) - WAITFORIT_HOST="${1#*=}" - shift 1 - ;; - -p) - WAITFORIT_PORT="$2" - if [[ $WAITFORIT_PORT == "" ]]; then break; fi - shift 2 - ;; - --port=*) - WAITFORIT_PORT="${1#*=}" - shift 1 - ;; - -t) - WAITFORIT_TIMEOUT="$2" - if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi - shift 2 - ;; - --timeout=*) - WAITFORIT_TIMEOUT="${1#*=}" - shift 1 - ;; - --) - shift - WAITFORIT_CLI=("$@") - break - ;; - --help) - usage - ;; - *) - echoerr "Unknown argument: $1" - usage - ;; - esac -done - -if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then - echoerr "Error: you need to provide a host and port to test." - usage -fi - -WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15} -WAITFORIT_STRICT=${WAITFORIT_STRICT:-0} -WAITFORIT_CHILD=${WAITFORIT_CHILD:-0} -WAITFORIT_QUIET=${WAITFORIT_QUIET:-0} - -# Check to see if timeout is from busybox? -WAITFORIT_TIMEOUT_PATH=$(type -p timeout) -WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH) - -WAITFORIT_BUSYTIMEFLAG="" -if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then - WAITFORIT_ISBUSY=1 - # Check if busybox timeout uses -t flag - # (recent Alpine versions don't support -t anymore) - if timeout &>/dev/stdout | grep -q -e '-t '; then - WAITFORIT_BUSYTIMEFLAG="-t" - fi -else - WAITFORIT_ISBUSY=0 -fi - -if [[ $WAITFORIT_CHILD -gt 0 ]]; then - wait_for - WAITFORIT_RESULT=$? - exit $WAITFORIT_RESULT -else - if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then - wait_for_wrapper - WAITFORIT_RESULT=$? - else - wait_for - WAITFORIT_RESULT=$? - fi -fi - -if [[ $WAITFORIT_CLI != "" ]]; then - if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then - echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess" - exit $WAITFORIT_RESULT - fi - exec "${WAITFORIT_CLI[@]}" -else - exit $WAITFORIT_RESULT -fi diff --git a/Workbench/webproxy/container_files/system/setservername.sh b/Workbench/webproxy/container_files/system/setservername.sh deleted file mode 100644 index 8d6e049..0000000 --- a/Workbench/webproxy/container_files/system/setservername.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -files="/etc/shibboleth/idp-metadata.xml /var/www/html/index.html /mdload/grouper-sp.xml /mdload/midpoint-sp.xml /mdload/comanage-sp.xml /mdload/proxy-sp.xml /mdload/wordpress-sp.xml" - -for file in $files - do - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done diff --git a/Workbench/webproxy/container_files/system/startWithMDLoad.sh b/Workbench/webproxy/container_files/system/startWithMDLoad.sh deleted file mode 100755 index 0e158da..0000000 --- a/Workbench/webproxy/container_files/system/startWithMDLoad.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -/usr/local/bin/startup.sh & - -#wait for IdPUI's API, then load metadata into it -pushd /mdload -./wait-for-it.sh -t 0 idp_ui_api:8443 -- ./loadMD.sh GrouperSP /mdload/grouper-sp.xml 90 && \ - ./loadMD.sh midPointSP /mdload/midpoint-sp.xml 0 && \ - ./loadMD.sh ProxySP /mdload/proxy-sp.xml 0 && \ - ./loadMD.sh WordPressSP /mdload/wordpress-sp.xml 0 && \ - ./loadMD.sh COmanageSP /mdload/comanage-sp.xml 0 -popd -wait diff --git a/Workbench/wordpress_server/container_files/system/setservername.sh b/Workbench/wordpress_server/container_files/system/setservername.sh deleted file mode 100644 index 82af2d8..0000000 --- a/Workbench/wordpress_server/container_files/system/setservername.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -files="/etc/shibboleth/idp-metadata.xml /root/sed.sh /root/config-shibb.sql" - -for file in $files - do - sed -i "s|__CSPHOSTNAME__|$CSPHOSTNAME|g" $file - done diff --git a/Workbench/wordpress_server/container_files/wordpress/sed.sh b/Workbench/wordpress_server/container_files/wordpress/sed.sh deleted file mode 100755 index 306f6ae..0000000 --- a/Workbench/wordpress_server/container_files/wordpress/sed.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -#echo "define('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');" >> /var/www/html/wp-config.php; -#echo "define('JWT_AUTH_CORS_ENABLE', true);" >> /var/www/html/wp-config.php -#define( 'WP_HOME', 'https://localhost:12443' ); -#define( 'WP_SITEURL', 'https://localhost:12443' ); -mkdir /var/www/html/wordpress -mv /var/www/html/* /var/www/html/wordpress/ -mv /var/www/html/.htaccess /var/www/html/wordpress/ -sed -i "s/define( 'DB_COLLATE', '' );/define( 'DB_COLLATE', '' );\ndefine('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');\ndefine('JWT_AUTH_CORS_ENABLE', true);\ndefine( 'WP_HOME', 'https:\/\/__CSPHOSTNAME__\/wordpress\/' );\ndefine( 'WP_SITEURL', 'https:\/\/__CSPHOSTNAME__\/wordpress\/' );\n/" /var/www/html/wordpress/wp-config.php -sed -i "s/RewriteBase \//RewriteBase \/wordpress\/\nRewriteRule \^wp-json\/\(\.\*\) \/wordpress\/?rest_route=\/\$1 \[L\]\n/" /var/www/html/wordpress/.htaccess -sed -i 's/RewriteRule \. \/index\.php \[L\]/RewriteCond %{REQUEST_URI} !\\\.sso\/\nRewriteRule \. \/index\.php \[L\]/' /var/www/html/wordpress/.htaccess -sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf -sed -i 's/IncludeOptional conf.d\/\*.conf/IncludeOptional conf.d\/\*.conf\nHttpProtocolOptions Unsafe/' /etc/httpd/conf/httpd.conf -mysql -h wordpress_data -u wordpress --password=54y6RxN7GfC7aes3 wordpress < /root/config-shibb.sql