From a5dd5275c8e5dc0416c9f5a5d40be670855a4e18 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Mon, 14 Nov 2022 20:57:35 -0500 Subject: [PATCH 01/17] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af0dd2a3..7944b3c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -730,7 +730,7 @@ jobs: - name: Set datetime version string id: dateversion run: | - echo "dateversion=$(date +'%Y%m%d.%k%M%S')" >> $GITHUB_STATE + echo "dateversion=$(date +'%Y%m%d.%k%M%S')" >> $GITHUB_OUTPUT - name: VirusTotal Scan uses: crazy-max/ghaction-virustotal@v3 From b670a4cee63957ed8e5c2b586695e343ece7a2b9 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Mon, 14 Nov 2022 21:40:53 -0500 Subject: [PATCH 02/17] Update build.yml --- .github/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7944b3c4..1f198579 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -727,11 +727,6 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v3 - - name: Set datetime version string - id: dateversion - run: | - echo "dateversion=$(date +'%Y%m%d.%k%M%S')" >> $GITHUB_OUTPUT - - name: VirusTotal Scan uses: crazy-max/ghaction-virustotal@v3 with: @@ -743,9 +738,8 @@ jobs: name: Publish draft release with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: ${{ steps.dateversion.outputs.dateversion }} + automatic_release_tag: latest prerelease: false draft: true - title: "GAM ${{ steps.dateversion.outputs.dateversion }}" files: | gam-binaries/* From 9820a3d81e0fc545c0d5b1a4bb1ecf61f33056eb Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Tue, 15 Nov 2022 04:07:04 -0800 Subject: [PATCH 03/17] Inbound SSO documentation; org is synonym for ou and orgunit (#1576) Are `gam info inboundssoassignment` and `gam delete inboundssoassignment` coming? Is `gam info inboundssocredentials` coming? --- src/GamCommands.txt | 16 ++++++++++++++++ src/gam/gapi/cloudidentity/inboundsso.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index e7da854b..755b2fa4 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -1548,6 +1548,22 @@ gam print group-members|groups-members [todrive] [roles ] [membernames] [fields ] [includederivedmembership] +gam create inboundssoprofile name entityid loginurl logouturl changepasswordurl +gam update inboundssoprofile [entityid ] [loginurl ] [logouturl ] [changepasswordurl ] +gam info inboundssoprofile +gam delete inboundssoprofile +gam print inboundssoprofiles + +gam create inboundssocredentials profile (pemfile )|(generatekey [keysize 1024|2048|4096]) [replaceolddest] +gam delete inboundssocredentials +gam print inboundssocredentials [profile|profiles ] + +gam create inboundssoassignment (group rank )|(ou|org|orgunit ) + (mode sso_off)|(mode saml_sso profile )(mode domain_wide_saml_if_enabled) [neverredirect] +gam update inboundssoassignment [(group rank )|(ou|org|orgunit )] + [(mode sso_off)|(mode saml_sso profile )(mode domain_wide_saml_if_enabled)] [neverredirect] +gam print inboundssoassignments + gam send userinvitation gam cancel userinvitation gam check userinvitation|isinvitable diff --git a/src/gam/gapi/cloudidentity/inboundsso.py b/src/gam/gapi/cloudidentity/inboundsso.py index 9a307dfc..3894c0bb 100644 --- a/src/gam/gapi/cloudidentity/inboundsso.py +++ b/src/gam/gapi/cloudidentity/inboundsso.py @@ -323,7 +323,7 @@ def parse_assignment(body, i, ci): ci, group) i += 2 - elif myarg in ['ou', 'orgunit']: + elif myarg in ['ou', 'org', 'orgunit']: body['targetOrgUnit'] = get_orgunit_id(sys.argv[i+1]) i += 2 else: From 3e0b4125e0fb0b19bc3289af02c5010cc8e7bb7b Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Wed, 16 Nov 2022 06:30:17 -0800 Subject: [PATCH 04/17] Code fixup (#1577) --- src/gam/gapi/cloudidentity/inboundsso.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gam/gapi/cloudidentity/inboundsso.py b/src/gam/gapi/cloudidentity/inboundsso.py index 3894c0bb..456f99d4 100644 --- a/src/gam/gapi/cloudidentity/inboundsso.py +++ b/src/gam/gapi/cloudidentity/inboundsso.py @@ -187,7 +187,7 @@ def create_credentials(): key_size = int(sys.argv[i+1]) if key_size not in allowed_sizes: controlflow.expected_argument_exit('key_size', - ALLOWED_KEY_SIZES, + allowed_sizes, key_size) i += 2 else: @@ -263,9 +263,8 @@ def print_credentials(): while i > len(sys.argv): myarg = sys.argv[i].lower().replace('_', '') if myarg in ['profile', 'profiles']: - profiles = sys.argv[i+1].split(',') - for profile in profiles: - profile = profile_displayname_to_name(profile, ci) + for profile in sys.argv[i+1].replace(',', ' ').split(): + profiles.append(profile_displayname_to_name(profile, ci)) else: controlflow.invalid_argument_exit(myarg, 'gam print inboundssocredentials') if not profiles: From 3660d65df6df67951e8cbb203de3a5b6e81c3c77 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 10:52:19 -0500 Subject: [PATCH 05/17] Update build.yml --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f198579..2e9df26b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -565,6 +565,11 @@ jobs: export newbuilding="${newbase}-building" export newresource="${newbase}-resource" export newou="aaaGithub Actions/${newbase}" + # cleanup old runs + GAM_CSV_ROW_FILTER="name:regex:^VC-gha_test_${JID}" $gam print features | $gam csv - gam delete feature ~name + $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail + GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" gamd user $gam_user print shareddrives asadmin | gamd csv - gam user $gam_user delete shareddrive ~id nukefromorbit + GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam print ous fromparent "aaaGithub Actions" | $gam csv - gam delete ou ~orgUnitId echo "Creating OrgUnit ${newou}" $gam create ou "${newou}" export GAM_THREADS=5 @@ -617,7 +622,6 @@ jobs: $gam users "$newbase-bulkuser-7 $newbase-bulkuser-8 $newbase-bulkuser-9" modify messages query in:anywhere maxtomodify 99999 addlabel IMPORTANT addlabel STARRED doit $gam user $newuser delete label --ALL_LABELS-- GAM_CSV_ROW_FILTER="name:regex:gha-test-${JID}" $gam print features | $gam csv - gam delete feature ~name - $gam create feature name Whiteboard-$newbase $gam create feature name VC-$newbase $gam create building "My Building - $newbase" id $newbuilding floors 1,2,3,4,5,6,7,8,9,10,11,12,14,15 description "No 13th floor here..." $gam create resource $newresource "Resource Calendar $tstamp" capacity 25 features Whiteboard-$newbase,VC-$newbase building $newbuilding floor 15 type Room @@ -657,7 +661,6 @@ jobs: #$gam delete user $newuser #$gam undelete user $newuser $gam delete user $newuser - $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail $gam print mobile $gam print devices $gam print browsers From b835b6ee36cf53ac094e4cb3ac405716fd87c207 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 11:04:06 -0500 Subject: [PATCH 06/17] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e9df26b..8c2bfaa6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -568,7 +568,7 @@ jobs: # cleanup old runs GAM_CSV_ROW_FILTER="name:regex:^VC-gha_test_${JID}" $gam print features | $gam csv - gam delete feature ~name $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail - GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" gamd user $gam_user print shareddrives asadmin | gamd csv - gam user $gam_user delete shareddrive ~id nukefromorbit + GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam user $gam_user print shareddrives asadmin | $gam csv - gam user $gam_user delete shareddrive ~id nukefromorbit GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam print ous fromparent "aaaGithub Actions" | $gam csv - gam delete ou ~orgUnitId echo "Creating OrgUnit ${newou}" $gam create ou "${newou}" From dd938bacedf54db84d5553c3963e9824189f3471 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 12:12:01 -0500 Subject: [PATCH 07/17] Update build.yml --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c2bfaa6..19c84cc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -566,10 +566,11 @@ jobs: export newresource="${newbase}-resource" export newou="aaaGithub Actions/${newbase}" # cleanup old runs - GAM_CSV_ROW_FILTER="name:regex:^VC-gha_test_${JID}" $gam print features | $gam csv - gam delete feature ~name + GAM_CSV_ROW_FILTER="name:regex:gha_test_${JID}" $gam print features | $gam csv - gam delete feature ~name $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam user $gam_user print shareddrives asadmin | $gam csv - gam user $gam_user delete shareddrive ~id nukefromorbit GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam print ous fromparent "aaaGithub Actions" | $gam csv - gam delete ou ~orgUnitId + echo "Creating OrgUnit ${newou}" $gam create ou "${newou}" export GAM_THREADS=5 @@ -623,6 +624,7 @@ jobs: $gam user $newuser delete label --ALL_LABELS-- GAM_CSV_ROW_FILTER="name:regex:gha-test-${JID}" $gam print features | $gam csv - gam delete feature ~name $gam create feature name VC-$newbase + $gam create feature name Whiteboard-$newbase $gam create building "My Building - $newbase" id $newbuilding floors 1,2,3,4,5,6,7,8,9,10,11,12,14,15 description "No 13th floor here..." $gam create resource $newresource "Resource Calendar $tstamp" capacity 25 features Whiteboard-$newbase,VC-$newbase building $newbuilding floor 15 type Room $gam info resource $newresource From 0032066e1d299f8819d7b19b7960e6f9511f0f86 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 12:33:17 -0500 Subject: [PATCH 08/17] Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19c84cc3..52734128 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -663,6 +663,7 @@ jobs: #$gam delete user $newuser #$gam undelete user $newuser $gam delete user $newuser + $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail $gam print mobile $gam print devices $gam print browsers From faade7c057c89c1ecf259e5cd0338a83120d9a6b Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 12:47:49 -0500 Subject: [PATCH 09/17] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52734128..9fe51bbd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -566,11 +566,11 @@ jobs: export newresource="${newbase}-resource" export newou="aaaGithub Actions/${newbase}" # cleanup old runs + GAM_CSV_ROW_FILTER="name:regex:gha_test_${JID}" $gam print vaultholds | $gam csv - gam delete vaulthold "id:~~holdId~~" matter "id:~~matterId~~" GAM_CSV_ROW_FILTER="name:regex:gha_test_${JID}" $gam print features | $gam csv - gam delete feature ~name - $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam user $gam_user print shareddrives asadmin | $gam csv - gam user $gam_user delete shareddrive ~id nukefromorbit + $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam print ous fromparent "aaaGithub Actions" | $gam csv - gam delete ou ~orgUnitId - echo "Creating OrgUnit ${newou}" $gam create ou "${newou}" export GAM_THREADS=5 From 81cd74c244cc7440b285a607f6a6326c90f9b3ae Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 13:08:44 -0500 Subject: [PATCH 10/17] Update build.yml --- .github/workflows/build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fe51bbd..fd1f0505 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -660,8 +660,10 @@ jobs: $gam delete hold "GHA hold $newbase" matter $matterid $gam update matter $matterid action close $gam update matter $matterid action delete - #$gam delete user $newuser - #$gam undelete user $newuser + # shakes off vault hold on user so we can delete + $gam print users query "email:${newuser}" orgunitpath | $gam csv - gam update user ~primaryEmail ou ~orgUnitPath + $gam delete user $newuser + $gam undelete user $newuser $gam delete user $newuser $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail $gam print mobile @@ -677,8 +679,8 @@ jobs: $gam report users fields accounts:is_less_secure_apps_access_allowed,gmail:last_imap_time,gmail:last_pop_time filters "accounts:last_login_time>2019-01-01T00:00:00.000Z" todrive $gam report admin start -3d todrive $gam print devices nopersonaldevices nodeviceusers filter "serial:$JID$JID$JID$JID-" | $gam csv - gam delete device id ~name - #$gam print userinvitations - #$gam print userinvitations | $gam csv - gam send userinvitation ~name + $gam print userinvitations + $gam print userinvitations | $gam csv - gam send userinvitation ~name $gam create caalevel "zzz_${newbase}" basic condition ipsubnetworks 1.1.1.1/32,2.2.2.2/32 endcondition $gam print caalevels $gam delete caalevel "zzz_${newbase}" From 11e4ff1eb5a0a56804a2f15b3ddf8f3b0b1822ab Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 15:03:23 -0500 Subject: [PATCH 11/17] Update __init__.py --- src/gam/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 759ec6d3..16ff5a70 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -11426,6 +11426,8 @@ def ProcessGAMCommand(args): i, encoding = getCharSet(i + 1) f = fileutils.open_file(filename, encoding=encoding) csvFile = csv.DictReader(f) + if not csvFile.fieldnames: + controlflow.system_error_exit(0, f'CSV file {filename} is empty') if (i == len(sys.argv)) or (sys.argv[i].lower() != 'gam') or (i + 1 == len(sys.argv)): controlflow.system_error_exit( From f2c28fd1f792d69da276e8c10ca7f7aec8c2354e Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 15:20:49 -0500 Subject: [PATCH 12/17] Update vault.py --- src/gam/gapi/vault.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gam/gapi/vault.py b/src/gam/gapi/vault.py index 973af9a1..45d45eea 100644 --- a/src/gam/gapi/vault.py +++ b/src/gam/gapi/vault.py @@ -976,10 +976,14 @@ def printHolds(): for matterId in matterIds: i += 1 sys.stderr.write(f'Retrieving holds for matter {matterId} ({i}/{matter_count})\n') - holds = gapi.get_all_pages(v.matters().holds(), + try: + holds = gapi.get_all_pages(v.matters().holds(), 'list', 'holds', + throw_reasons=[gapi_errors.ErrorReason.FOUR_O_O], matterId=matterId) + except gapi_errors.GapiInvalidError: + continue for hold in holds: display.add_row_titles_to_csv_file( utils.flatten_json(hold, flattened={'matterId': matterId}), From 3056c7b8033ea019ca499f038ca1627d175333fa Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 15:23:53 -0500 Subject: [PATCH 13/17] Update vault.py --- src/gam/gapi/vault.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gam/gapi/vault.py b/src/gam/gapi/vault.py index 45d45eea..572f78c9 100644 --- a/src/gam/gapi/vault.py +++ b/src/gam/gapi/vault.py @@ -11,6 +11,7 @@ from gam import controlflow from gam import display from gam import fileutils from gam import gapi +from gam.gapi import errors as gapi_errors from gam.gapi import storage as gapi_storage from gam.gapi import directory as gapi_directory from gam.gapi.directory import orgunits as gapi_directory_orgunits From e9ba6819bae6bdb2ed18188a4a2f6e87a911df98 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 15:31:07 -0500 Subject: [PATCH 14/17] Update vault.py --- src/gam/gapi/vault.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gam/gapi/vault.py b/src/gam/gapi/vault.py index 572f78c9..8cc72db0 100644 --- a/src/gam/gapi/vault.py +++ b/src/gam/gapi/vault.py @@ -983,7 +983,7 @@ def printHolds(): 'holds', throw_reasons=[gapi_errors.ErrorReason.FOUR_O_O], matterId=matterId) - except gapi_errors.GapiInvalidError: + except googleapiclient.errors.HttpError: continue for hold in holds: display.add_row_titles_to_csv_file( From 448789dad05bb06e1ec863b670481d0e3170c51b Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 15:39:41 -0500 Subject: [PATCH 15/17] Update build.yml --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd1f0505..99ba6306 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -663,8 +663,6 @@ jobs: # shakes off vault hold on user so we can delete $gam print users query "email:${newuser}" orgunitpath | $gam csv - gam update user ~primaryEmail ou ~orgUnitPath $gam delete user $newuser - $gam undelete user $newuser - $gam delete user $newuser $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail $gam print mobile $gam print devices From 995321978f816e407f19be03c4245ab4e4ee9d83 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 15:58:56 -0500 Subject: [PATCH 16/17] Update build.yml --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99ba6306..73f3dcb7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -571,6 +571,9 @@ jobs: GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam user $gam_user print shareddrives asadmin | $gam csv - gam user $gam_user delete shareddrive ~id nukefromorbit $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam print ous fromparent "aaaGithub Actions" | $gam csv - gam delete ou ~orgUnitId + GAM_CSV_ROW_FILTER="groupKey.id:regex:^gha_test_${JID}" $gam print cigroups | $gam csv - gam delete cigroup ~groupKey.id + GAM_CSV_ROW_FILTER="resourceId:regex:^gha_test_${JID}" $gam print resources | $gam csv - gam delete resource ~resourceId + GAM_CSV_ROW_FILTER="buildingId:regex:^gha_test_${JID}" $gam print buildings | $gam csv - gam delete building ~buildingId echo "Creating OrgUnit ${newou}" $gam create ou "${newou}" export GAM_THREADS=5 From 5d11397fcad7c0242ebee96696d77c762260b11f Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 16 Nov 2022 16:05:11 -0500 Subject: [PATCH 17/17] Update build.yml --- .github/workflows/build.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73f3dcb7..cb6cca9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -565,15 +565,17 @@ jobs: export newbuilding="${newbase}-building" export newresource="${newbase}-resource" export newou="aaaGithub Actions/${newbase}" + # cleanup old runs - GAM_CSV_ROW_FILTER="name:regex:gha_test_${JID}" $gam print vaultholds | $gam csv - gam delete vaulthold "id:~~holdId~~" matter "id:~~matterId~~" - GAM_CSV_ROW_FILTER="name:regex:gha_test_${JID}" $gam print features | $gam csv - gam delete feature ~name - GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam user $gam_user print shareddrives asadmin | $gam csv - gam user $gam_user delete shareddrive ~id nukefromorbit + GAM_CSV_ROW_FILTER="name:regex:gha_test_${JID}_" $gam print vaultholds | $gam csv - gam delete vaulthold "id:~~holdId~~" matter "id:~~matterId~~" + GAM_CSV_ROW_FILTER="name:regex:gha_test_${JID}_" $gam print features | $gam csv - gam delete feature ~name + GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}_" $gam user $gam_user print shareddrives asadmin | $gam csv - gam user $gam_user delete shareddrive ~id nukefromorbit $gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail - GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}" $gam print ous fromparent "aaaGithub Actions" | $gam csv - gam delete ou ~orgUnitId - GAM_CSV_ROW_FILTER="groupKey.id:regex:^gha_test_${JID}" $gam print cigroups | $gam csv - gam delete cigroup ~groupKey.id - GAM_CSV_ROW_FILTER="resourceId:regex:^gha_test_${JID}" $gam print resources | $gam csv - gam delete resource ~resourceId - GAM_CSV_ROW_FILTER="buildingId:regex:^gha_test_${JID}" $gam print buildings | $gam csv - gam delete building ~buildingId + GAM_CSV_ROW_FILTER="name:regex:^gha_test_${JID}_" $gam print ous fromparent "aaaGithub Actions" | $gam csv - gam delete ou ~orgUnitId + GAM_CSV_ROW_FILTER="groupKey.id:regex:^gha_test_${JID}_" $gam print cigroups | $gam csv - gam delete cigroup ~groupKey.id + GAM_CSV_ROW_FILTER="resourceId:regex:^gha_test_${JID}_" $gam print resources | $gam csv - gam delete resource ~resourceId + GAM_CSV_ROW_FILTER="buildingId:regex:^gha_test_${JID}_" $gam print buildings | $gam csv - gam delete building ~buildingId + echo "Creating OrgUnit ${newou}" $gam create ou "${newou}" export GAM_THREADS=5