mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-16 20:21:37 +00:00
Compare commits
34 Commits
20241020.2
...
20241031.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9c4c006b2 | ||
|
|
378c763aa3 | ||
|
|
e46c837416 | ||
|
|
a478d45258 | ||
|
|
5476c4d14f | ||
|
|
2759d59cbf | ||
|
|
d2213709f0 | ||
|
|
d2840b95d5 | ||
|
|
49cdad014b | ||
|
|
532271130c | ||
|
|
628ef4aeff | ||
|
|
34b344baf9 | ||
|
|
b2daeffa36 | ||
|
|
3440fa7415 | ||
|
|
77bf001195 | ||
|
|
5d0003ce93 | ||
|
|
a0c4be1d5c | ||
|
|
95be4e2d53 | ||
|
|
5f8705fc09 | ||
|
|
975833bf87 | ||
|
|
b4e3f25c1e | ||
|
|
bb198c8c1a | ||
|
|
40899de989 | ||
|
|
01a6781454 | ||
|
|
f448a75da4 | ||
|
|
8e5f5c9a6b | ||
|
|
04156061c4 | ||
|
|
36f96f75c7 | ||
|
|
197bcb3599 | ||
|
|
1474335a79 | ||
|
|
0f8c361dcd | ||
|
|
beb75dbc20 | ||
|
|
cbb95a47f8 | ||
|
|
d7e36bc5eb |
BIN
.github/actions/creds.tar.xz.gpg
vendored
BIN
.github/actions/creds.tar.xz.gpg
vendored
Binary file not shown.
18
.github/actions/decrypt.sh
vendored
Normal file → Executable file
18
.github/actions/decrypt.sh
vendored
Normal file → Executable file
@@ -23,10 +23,16 @@ fi
|
||||
gpg --batch \
|
||||
--yes \
|
||||
--decrypt \
|
||||
--passphrase="${PASSCODE}" \
|
||||
--output "${credsfile}" \
|
||||
"${gpgfile}"
|
||||
--passphrase="$PASSCODE" \
|
||||
--output "$credsfile" \
|
||||
"$gpgfile"
|
||||
|
||||
tar xvvf "${credsfile}" --directory "${credspath}"
|
||||
rm -rvf "${gpgfile}"
|
||||
rm -rvf "${credsfile}"
|
||||
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||
tar="gtar"
|
||||
else
|
||||
tar="tar"
|
||||
fi
|
||||
|
||||
"$tar" xlvvf "$credsfile" --directory "$credspath"
|
||||
rm -rvf "$gpgfile"
|
||||
rm -rvf "$credsfile"
|
||||
|
||||
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@@ -115,7 +115,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20241014
|
||||
key: gam-${{ matrix.jid }}-20241022
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
@@ -805,6 +805,8 @@ jobs:
|
||||
# cleanup old runs
|
||||
$gam config enable_dasa false save
|
||||
$gam config csv_output_row_filter "name:regex:gha_test_${JID}_" print vaultholds || if [ $? != 55 ]; then exit $?; fi | $gam csv - gam delete vaulthold "id:~~holdId~~" matter "id:~~matterId~~"
|
||||
$gam config csv_output_row_filter "name:regex:gha_test_${HID}_" print vaultmatters matterstate OPEN | $gam csv - gam update vaultmatter "id:~~matterId~~" action close
|
||||
$gam config csv_output_row_filter "name:regex:gha_test_${HID}_" print vaultmatters matterstate CLOSED | $gam csv - gam update vaultmatter "id:~~matterId~~" action delete
|
||||
$gam config enable_dasa true save
|
||||
$gam config csv_output_row_filter "name:regex:gha_test_${JID}_" print features | $gam csv - gam delete feature ~name
|
||||
$gam config csv_output_row_filter "name:regex:^gha_test_${JID}_" user $gam_user print shareddrives asadmin | $gam csv - gam user $gam_user delete shareddrive ~id nukefromorbit
|
||||
@@ -824,8 +826,7 @@ jobs:
|
||||
done
|
||||
driveid=$($gam user $gam_user add shareddrive "${newbase}" returnidonly)
|
||||
echo "Created shared drive ${driveid}"
|
||||
# 9/17/24 - temp create in root due to Google API issues creating users in new OUs
|
||||
$gam create user $newuser firstname GHA lastname $JID displayname "Github Actions ${JID}" password random recoveryphone 12125121110 recoveryemail jay0lee@gmail.com gha.jid $JID languages en+,en-GB- # ou "${newou}"
|
||||
$gam create user $newuser firstname GHA lastname $JID displayname "Github Actions ${JID}" password random recoveryphone 12125121110 recoveryemail jay0lee@gmail.com gha.jid $JID languages en+,en-GB- ou "${newou}"
|
||||
$gam user $newuser add license workspaceenterpriseplus
|
||||
$gam user $newuser update photo https://dummyimage.com/400x600/000/fff
|
||||
$gam user $newuser get photo
|
||||
@@ -834,7 +835,9 @@ jobs:
|
||||
$gam create group $newgroup name "GHA $JID group" description "This is a description" isarchived true
|
||||
$gam user $gam_user sendemail recipient dev-null@pdl.jaylee.us subject "test message $newbase" message "GHA test message"
|
||||
$gam config enable_dasa false save
|
||||
#$gam create contact firstname GHA lastname "$JID" email work "${newbase}@example.com" primary
|
||||
# don't expose policy output
|
||||
$gam show policies > policies.csv
|
||||
$gam create contact firstname GHA lastname "$JID" email work "${newbase}@example.com" primary
|
||||
$gam print contacts
|
||||
$gam print privileges
|
||||
$gam config enable_dasa true save
|
||||
@@ -860,7 +863,7 @@ jobs:
|
||||
$gam info group $newgroup
|
||||
$gam info cigroup $newgroup membertree
|
||||
# confirm mailbox is provisoned before continuing
|
||||
$gam user $newuser waitformailbox retries 20
|
||||
$gam user $newuser waitformailbox retries 50
|
||||
$gam user $newuser imap on
|
||||
$gam user $newuser show imap
|
||||
$gam user $newuser show delegates
|
||||
|
||||
@@ -163,12 +163,11 @@ as required by Google for headless computers/cloud shells; this is required as o
|
||||
```
|
||||
## Manage Projects
|
||||
In all of the project commands, the Google Workspace admin/GCP project manager `<EmailAddress>` can be omitted; you will be prompted for a value.
|
||||
You must enter a full address, i.e., user@domain.com; you will be required to enter the password.
|
||||
You must enter a full address, i.e., user@domain.com; you will be required to authenticate.
|
||||
|
||||
For `print|show projects`, you can eliminate the password requirement by enabling the following scope in `gam update serviceaccount`;
|
||||
GAM will then use Service Account access to display projects.
|
||||
For `print|show projects`, you can eliminate the password prompt and authentication requirement by specifying the super admin emailaddress used in `gam oauth create`.
|
||||
```
|
||||
[*] 9) Cloud Resource Manager API v3
|
||||
gam print projects admin admin@domain.com
|
||||
```
|
||||
|
||||
## Authorize a super admin to create projects
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
!# Basic Items
|
||||
# Basic Items
|
||||
- [Primitives](#primitives)
|
||||
- [Items built from primitives](#items-built-from-primitives)
|
||||
- [Named items](#named-items)
|
||||
@@ -274,14 +274,15 @@
|
||||
<EmailAddress>|user:<EmailAddress>|group:<EmailAddress>|
|
||||
domain:<DomainName>|domain|default
|
||||
<CalendarItem> ::= <EmailAddress>
|
||||
<GIGroupAlias> ::= <EmailAddress>
|
||||
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
|
||||
<CIGroupType> ::= customer|group|other|serviceaccount|user
|
||||
<ChannelCustomerID> ::= <String>
|
||||
<ChatMember> ::= spaces/<String>/members/<String>
|
||||
<ChatMessage> ::= spaces/<String>/messages/<String>
|
||||
<ChatSpace> ::= spaces/<String> | space <String> | space spaces/<String>
|
||||
<ChatThread> ::= spaces/<String>/threads/<String>
|
||||
<GIGroupAlias> ::= <EmailAddress>
|
||||
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
|
||||
<CIGroupType> ::= customer|group|other|serviceaccount|user
|
||||
<CIPolicyName> ::= policies/<String>|settings/<String>|<String>
|
||||
<ClassroomInvitationID> ::= <String>
|
||||
<ClientID> ::= <String>
|
||||
<CommandID> ::= <String>
|
||||
@@ -533,6 +534,7 @@
|
||||
(tdnotify [<Boolean>])|
|
||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||
(tdretaintitle [<Boolean>])|
|
||||
(tdreturnidonly [<Boolean>])|
|
||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||
(tdsheet (id:<Number>)|<String>)|
|
||||
(tdsheettimestamp [<Boolean>] [tdsheettimeformat <String>])
|
||||
|
||||
373
docs/Cloud-Identity-Policies.md
Normal file
373
docs/Cloud-Identity-Policies.md
Normal file
@@ -0,0 +1,373 @@
|
||||
# Cloud Identity Policies
|
||||
- [API documentation](#api-documentation)
|
||||
- [Notes](#notes)
|
||||
- [Definitions](#definitions)
|
||||
- [Policies](#policies)
|
||||
- [Display Cloud Identity Policies](#display-cloud-identity-policies)
|
||||
|
||||
## API documentation
|
||||
* https://cloud.google.com/identity/docs/concepts/overview-policies
|
||||
* https://cloud.google.com/identity/docs/reference/rest/v1beta1/policies/list
|
||||
|
||||
## Notes
|
||||
To use these commands you must update your client access authentication.
|
||||
You'll enter 19R to turn on the Cloud Identity Policy scope; then continue
|
||||
with authentication.
|
||||
```
|
||||
gam oauth delete
|
||||
gam oauth create
|
||||
...
|
||||
[R] 19) Cloud Identity - Policy
|
||||
```
|
||||
|
||||
## Definitions
|
||||
```
|
||||
<CIPolicyName> ::= policies/<String>|settings/<String>|<String>
|
||||
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
||||
<CIPolicyNameEntity> ::=
|
||||
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
||||
```
|
||||
|
||||
## Policies
|
||||
These are the supported policies GAM can show today.
|
||||
|
||||
See: https://cloud.google.com/identity/docs/concepts/supported-policy-api-settings
|
||||
```
|
||||
user_takeout_status (is takeout enabled for service)
|
||||
blogger.user_takeout
|
||||
books.user_takeout
|
||||
location_history.user_takeout
|
||||
maps.user_takeout
|
||||
pay.user_takeout
|
||||
photos.user_takeout
|
||||
play.user_takeout
|
||||
play_console.user_takeout
|
||||
youtube.user_takeout
|
||||
service_status (is service enabled)
|
||||
ad_manager
|
||||
ads
|
||||
adsense
|
||||
alerts
|
||||
analytics
|
||||
applied_digital_skills
|
||||
appsheet
|
||||
arts_and_culture
|
||||
beyondcorp_enterprise
|
||||
blogger
|
||||
bookmarks
|
||||
books
|
||||
calendar
|
||||
campaign_manager
|
||||
chat
|
||||
chrome_canvas
|
||||
chrome_remote_desktop
|
||||
chrome_sync
|
||||
chrome_web_store
|
||||
classroom
|
||||
cloud
|
||||
cloud_search
|
||||
colab
|
||||
cs_first
|
||||
data_studio
|
||||
developers
|
||||
domains
|
||||
drive_and_docs
|
||||
earth
|
||||
enterprise_service_restrictions
|
||||
experimental_apps
|
||||
feedburner
|
||||
fi
|
||||
gmail
|
||||
groups
|
||||
groups_for_business
|
||||
jamboard
|
||||
keep
|
||||
location_history
|
||||
managed_play
|
||||
maps
|
||||
material_gallery
|
||||
meet
|
||||
merchant_center
|
||||
messages
|
||||
migrate
|
||||
my_business
|
||||
my_maps
|
||||
news
|
||||
partner_dash
|
||||
pay
|
||||
pay_for_business
|
||||
photos
|
||||
pinpoint
|
||||
play
|
||||
play_books_partner_center
|
||||
play_console
|
||||
public_data
|
||||
question_hub
|
||||
scholar_profiles
|
||||
search_ads_360
|
||||
search_and_assistant
|
||||
search_console
|
||||
sites
|
||||
socratic
|
||||
takeout
|
||||
tasks
|
||||
third_party_app_backups
|
||||
translate
|
||||
trips
|
||||
vault
|
||||
voice
|
||||
work_insights
|
||||
youtube
|
||||
calendar.appointment_schedules
|
||||
enablePayments
|
||||
chat.chat_apps_access
|
||||
enableApps
|
||||
enableWebhooks
|
||||
chat.chat_file_sharing
|
||||
externalFileSharing
|
||||
internalFileSharing
|
||||
chat.chat_history
|
||||
enableChatHistory
|
||||
historyOnByDefault
|
||||
allowUserModification
|
||||
chat.external_chat_restriction
|
||||
allowExternalChat
|
||||
chat.space_history
|
||||
historyState
|
||||
classroom.api_data_access
|
||||
enableApiAccess
|
||||
classroom.class_membership
|
||||
whoCanJoinClasses
|
||||
whichClassesCanUsersJoin
|
||||
classroom.guardian_access
|
||||
allowAccess
|
||||
whoCanManageGuardianAccess
|
||||
classroom.originality_reports
|
||||
enableOriginalityReportsSchoolMatches
|
||||
classroom.roster_import
|
||||
rosterImportOption
|
||||
classroom.student_unenrollment
|
||||
whoCanUnenrollStudents
|
||||
classroom.teacher_permissions
|
||||
whoCanCreateClasses
|
||||
cloud_sharing_options.cloud_data_sharing
|
||||
sharingOptions
|
||||
detector.regular_expression
|
||||
displayName
|
||||
regularExpression
|
||||
createTime
|
||||
updateTime
|
||||
detector.word_list
|
||||
displayName
|
||||
wordList
|
||||
createTime
|
||||
updateTime
|
||||
description
|
||||
drive_and_docs.drive_for_desktop
|
||||
allowDriveForDesktop
|
||||
restrictToAuthorizedDevices
|
||||
showDownloadLink
|
||||
allowRealTimePresence
|
||||
drive_and_docs.external_sharing
|
||||
externalSharingMode
|
||||
allowReceivingExternalFiles
|
||||
warnForSharingOutsideAllowlistedDomains
|
||||
allowReceivingFilesOutsideAllowlistedDomains
|
||||
allowNonGoogleInvitesInAllowlistedDomains
|
||||
warnForExternalSharing
|
||||
allowNonGoogleInvites
|
||||
allowPublishingFiles
|
||||
accessCheckerSuggestions
|
||||
allowedPartiesForDistributingContent
|
||||
drive_and_docs.file_security_update
|
||||
securityUpdate
|
||||
allowUsersToManageUpdate
|
||||
drive_and_docs.shared_drive_creation
|
||||
allowSharedDriveCreation
|
||||
orgUnitForNewSharedDrives
|
||||
customOrgUnit
|
||||
allowManagersToOverrideSettings
|
||||
allowExternalUserAccess
|
||||
allowNonMemberAccess
|
||||
allowedPartiesForDownloadPrintCopy
|
||||
allowContentManagersToShareFolders
|
||||
gmail.auto_forwarding
|
||||
enableAutoForwarding
|
||||
gmail.confidential_mode
|
||||
enableConfidentialMode
|
||||
gmail.email_attachment_safety
|
||||
enableEncryptedAttachmentProtection
|
||||
encryptedAttachmentProtectionConsequence
|
||||
enableAttachmentWithScriptsProtection
|
||||
attachmentWithScriptsProtectionConsequence
|
||||
enableAnomalousAttachmentProtection
|
||||
anomalousAttachmentProtectionConsequence
|
||||
allowedAnomalousAttachmentFiletypes
|
||||
applyFutureRecommendedSettingsAutomatically
|
||||
encryptedAttachmentProtectionQuarantineId
|
||||
attachmentWithScriptsProtectionQuarantineId
|
||||
anomalousAttachmentProtectionQuarantineId
|
||||
gmail.email_image_proxy_bypass
|
||||
imageProxyBypassPattern
|
||||
enableImageProxy
|
||||
gmail.enhanced_pre_delivery_message_scanning
|
||||
enableImprovedSuspiciousContentDetection
|
||||
gmail.enhanced_smime_encryption
|
||||
enableSmimeEncryption
|
||||
allowUserToUploadCertificates
|
||||
gmail.gmail_name_format
|
||||
allowCustomDisplayNames
|
||||
defaultDisplayNameFormat
|
||||
gmail.imap_access
|
||||
enableImapAccess
|
||||
gmail.links_and_external_images
|
||||
enableShortenerScanning
|
||||
enableExternalImageScanning
|
||||
enableAggressiveWarningsOnUntrustedLinks
|
||||
applyFutureSettingsAutomatically
|
||||
gmail.per_user_outbound_gateway
|
||||
allowUsersToUseExternalSmtpServers
|
||||
gmail.pop_access
|
||||
enablePopAccess
|
||||
gmail.spoofing_and_authentication
|
||||
detectDomainNameSpoofing
|
||||
detectEmployeeNameSpoofing
|
||||
detectDomainSpoofingFromUnauthenticatedSenders
|
||||
detectUnauthenticatedEmails
|
||||
domainNameSpoofingConsequence
|
||||
employeeNameSpoofingConsequence
|
||||
domainSpoofingConsequence
|
||||
unauthenticatedEmailConsequence
|
||||
detectGroupsSpoofing
|
||||
groupsSpoofingVisibilityType
|
||||
groupsSpoofingConsequence
|
||||
applyFutureSettingsAutomatically
|
||||
domainNameSpoofingQuarantineId
|
||||
employeeNameSpoofingQuarantineId
|
||||
domainSpoofingQuarantineId
|
||||
unauthenticatedEmailQuarantineId
|
||||
groupsSpoofingQuarantineId
|
||||
gmail.user_email_uploads
|
||||
enableMailAndContactsImport
|
||||
gmail.workspace_sync_for_outlook
|
||||
enableGoogleWorkspaceSyncForMicrosoftOutlook
|
||||
groups_for_business.groups_sharing
|
||||
ownersCanAllowIncomingMailFromPublic
|
||||
collaborationCapability
|
||||
createGroupsAccessLevel
|
||||
ownersCanAllowExternalMembers
|
||||
ownersCanHideGroups
|
||||
newGroupsAreHidden
|
||||
viewTopicsDefaultAccessLevel
|
||||
meet.safety_access
|
||||
meetingsAllowedToJoin
|
||||
meet.safety_domain
|
||||
usersAllowedToJoin
|
||||
meet.safety_external_participants
|
||||
enableExternalLabel
|
||||
meet.safety_host_management
|
||||
enableHostManagement
|
||||
meet.video_recording
|
||||
enableRecording
|
||||
rule.dlp
|
||||
displayName
|
||||
description
|
||||
triggers
|
||||
condition
|
||||
action
|
||||
state
|
||||
createTime
|
||||
updateTime
|
||||
ruleTypeMetadata
|
||||
rule.system_defined_alerts
|
||||
displayName
|
||||
description
|
||||
action
|
||||
state
|
||||
createTime
|
||||
updateTime
|
||||
security.advanced_protection_program
|
||||
enableAdvancedProtectionSelfEnrollment
|
||||
securityCodeOption
|
||||
security.less_secure_apps
|
||||
allowLessSecureApps
|
||||
security.login_challenges
|
||||
enableEmployeeIdChallenge
|
||||
security.password
|
||||
allowedStrength
|
||||
minimumLength
|
||||
maximumLength
|
||||
enforceRequirementsAtLogin
|
||||
allowReuse
|
||||
expirationDuration
|
||||
security.session_controls
|
||||
webSessionDuration
|
||||
security.super_admin_account_recovery
|
||||
enableAccountRecovery
|
||||
security.user_account_recovery
|
||||
enableAccountRecovery
|
||||
sites.sites_creation_and_modification
|
||||
allowSitesCreation
|
||||
allowSitesModification
|
||||
workspace_marketplace.apps_allowlist
|
||||
apps
|
||||
```
|
||||
## Display Cloud Identity Policies
|
||||
Display selected policies.
|
||||
```
|
||||
gam info policies <CIPolicyEntity>
|
||||
[nowarnings] [noappnames]
|
||||
[formatjson]
|
||||
```
|
||||
|
||||
Select policies::
|
||||
* `polices/<String>` - A policy name, `policies/ahv4hg7qc24kvaghb7zihwf4riid4`
|
||||
* `settings/<String>` - A policy setting type, `settings/workspace_marketplace.apps_allowlist'
|
||||
* `<String>` - A policy setting type, `workspace_marketplace.apps_allowlist'
|
||||
|
||||
By default, policy warnings are displayed, use the 'nowarnings` option to suppress their display.
|
||||
|
||||
By default, additional API calls are made for `settings/workspace_marketplace.apps_allowlist`
|
||||
to get the application name for the application ID. Use option `noappnames` to suppress these calls.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
Display all or filtered policies.
|
||||
```
|
||||
gam show policies
|
||||
[filter <String>] [nowarnings] [noappnames]
|
||||
[formatjson]
|
||||
```
|
||||
By default, all policies are displayed.
|
||||
* `filter <String>` - Display filtered policies, See https://cloud.google.com/identity/docs/reference/rest/v1beta1/policies/list
|
||||
|
||||
By default, policy warnings are displayed, use the 'nowarnings` option to suppress their display.
|
||||
|
||||
By default, additional API calls are made for `settings/workspace_marketplace.apps_allowlist`
|
||||
to get the application name for the application ID. Use option `noappnames` to suppress these calls.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam print policies [todrive <ToDriveAttribute>*]
|
||||
[filter <String>] [nowarnings] [noappnames]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, all policies are displayed:
|
||||
* `filter <String>` - Display filtered policies, See https://cloud.google.com/identity/docs/reference/rest/v1beta1/policies/list
|
||||
|
||||
By default, policy warnings are displayed, use the 'nowarnings` option to suppress their display.
|
||||
|
||||
By default, additional API calls are made for `settings/workspace_marketplace.apps_allowlist`
|
||||
to get the application name for the application ID. Use option `noappnames` to suppress these calls.
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
@@ -1,4 +1,4 @@
|
||||
!# Collections of Items
|
||||
# Collections of Items
|
||||
- [Python Regular Expressions](Python-Regular-Expressions) Match function
|
||||
- [Definitions](#definitions)
|
||||
- [ListSelector](#listselector)
|
||||
@@ -144,6 +144,8 @@ Data fields identified in a `csvkmd` argument.
|
||||
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<CalendarEntity> ::=
|
||||
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<CIPolicyNameEntity> ::=
|
||||
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
||||
<ClassroomInvitationIDEntity> ::=
|
||||
<ClassroomInvitationIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<ContactEntity> ::=
|
||||
|
||||
@@ -306,26 +306,10 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
## Display global address list
|
||||
```
|
||||
gam info gal <ContactEntity>
|
||||
[basic|full]
|
||||
[fields <ContactFieldNameList>] [formatjson]
|
||||
gam show gal <ContactSelection>
|
||||
[basic|full] [orderby <ContactOrderByFieldName> [ascending|descending]]
|
||||
[fields <ContactFieldNameList>] [formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam print gal [todrive <ToDriveAttribute>*] <ContactSelection>
|
||||
[basic|full] [orderby <ContactOrderByFieldName> [ascending|descending]]
|
||||
[fields <ContactFieldNameList>] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the information as columns of fields.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
||||
|
||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
These commands are a work-around.
|
||||
```
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" redirect csv ./UserGAL.csv print users fields name,gal
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" batch_size 25 redirect csv ./GroupGAL.csv print groups fields name,gal
|
||||
```
|
||||
|
||||
@@ -10,6 +10,72 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
|
||||
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||
|
||||
### 7.00.34
|
||||
|
||||
Fixed bug introduced in 7.00.33 in `gam print group-members` that caused a trap.
|
||||
|
||||
### 7.00.33
|
||||
|
||||
Fixed bug in `gam print group-members ... cachememberinfo` that caused a trap.
|
||||
|
||||
### 7.00.32
|
||||
|
||||
Updated `gam info policies` to accept different policy specifications:
|
||||
* `polices/<String>` - A policy name, `policies/ahv4hg7qc24kvaghb7zihwf4riid4`
|
||||
* `settings/<String>` - A policy setting type, `settings/workspace_marketplace.apps_allowlist`
|
||||
* `<String>` - A policy setting type, `workspace_marketplace.apps_allowlist`
|
||||
|
||||
### 7.00.31
|
||||
|
||||
Updated `gam info|print|show policies` to make additional API calls for `settings/workspace_marketplace.apps_allowlist`
|
||||
to get the application name for the application ID. Use option `noappnames` to suppress these calls.
|
||||
|
||||
### 7.00.30
|
||||
|
||||
Added command to display selected Cloud Identity policies.
|
||||
```
|
||||
gam info policies <CIPolicyNameEntity>
|
||||
[nowarnings]
|
||||
[formatjson]
|
||||
```
|
||||
|
||||
Removed option `name <CIPolicyName>` from `gam print|show policies`; use `info policies`.
|
||||
|
||||
### 7.00.29
|
||||
|
||||
Added option `name <CIPolicyName>` to `gam print|show policies` that displays
|
||||
information about a specific policy.
|
||||
|
||||
### 7.00.28
|
||||
|
||||
Fixed issue that caused `gam print/show policies` to fail on some group policies.
|
||||
|
||||
### 7.00.27
|
||||
|
||||
Updated `gam <UserTypeEntity> collect orphans` and all commands that print file paths to recognize
|
||||
that a file owned by a user that has no parents is not an orphan if `sharedWithMeTime` is set.
|
||||
This occurs when user A creates a file in a shared folder owned by user B and user B then removes
|
||||
user A's access to the folder.
|
||||
|
||||
Added commands to display Cloud Identity policies.
|
||||
```
|
||||
gam print policies [todrive <ToDriveAttribute>*]
|
||||
(filter <String>) [nowarnings]
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show policies (filter <String>) [nowarnings]
|
||||
[formatjson]
|
||||
```
|
||||
### 7.00.26
|
||||
|
||||
Updated `drive_dir` in `gam.cfg` to allow the value `.` that causes `redirect csv|stdout|stderr <FileName>`
|
||||
to write `<FileName>` in the current directory without having to prefix `<FileName>` with `./`.
|
||||
|
||||
Upgraded to OpenSSL 3.4.0.
|
||||
|
||||
### 7.00.25
|
||||
|
||||
Updated authentication process for `gam print|show projects`.
|
||||
|
||||
### 7.00.24
|
||||
|
||||
Updated `gam print|show projects ... showiampolicies 0|1|3` to use non-service account authentication.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
!# Installation - Upgrading from Legacy GAM
|
||||
# Installation - Upgrading from Legacy GAM
|
||||
Use these steps if you have used any version of GAM in your domain. They will update your GAM project
|
||||
and all necessary authentications.
|
||||
|
||||
@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin$ gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAM 7.00.24 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.00.34 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.0 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
@@ -923,7 +923,7 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\>del C:\GAMConfig\oauth2.txt
|
||||
C:\>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAM7 7.00.24 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM7 7.00.34 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.0 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
!# List Items
|
||||
# List Items
|
||||
- [Lists of basic items](#lists-of-basic-items)
|
||||
- [List quoting rules](#list-quoting-rules)
|
||||
- [Basic Items](Basic-Items)
|
||||
@@ -13,6 +13,7 @@
|
||||
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
||||
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
||||
<CIGroupTypeList> ::= "<CIGroupType>(,<CIGroupType>)*"
|
||||
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
||||
<ClassroomInvitationIDList> ::= "<ClassroomInvitationID>(,<ClassroomInvitationID>)*"
|
||||
<ContactGroupList> ::= "<ContactGroupItem>(,<ContactGroupItem>)*"
|
||||
<ContactIDList> ::= "<ContactID>(,<ContactID>)*"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAM 7.00.24 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.00.34 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.0 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAM 7.00.24 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.00.34 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.0 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
|
||||
Print the current version of Gam with extended details and SSL information
|
||||
```
|
||||
gam version extended
|
||||
GAM 7.00.24 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.00.34 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.0 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
@@ -35,17 +35,17 @@ Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Time: 2023-06-02T21:10:00-07:00
|
||||
Your system time differs from admin.googleapis.com by less than 1 second
|
||||
OpenSSL 3.1.1 30 May 2023
|
||||
cryptography 41.0.1
|
||||
filelock 3.13.0
|
||||
google-api-python-client 2.88.0
|
||||
google-auth-httplib2 0.1.0
|
||||
google-auth-oauthlib 1.0.0
|
||||
google-auth 2.19.1
|
||||
OpenSSL 3.4.0 22 Oct Sep 2024
|
||||
cryptography 43.0.3
|
||||
filelock 3.16.1
|
||||
google-api-python-client 2.149.0
|
||||
google-auth-httplib2 0.2.0
|
||||
google-auth-oauthlib 1.2.1
|
||||
google-auth 2.35.0
|
||||
httplib2 0.22.0
|
||||
passlib 1.7.4
|
||||
python-dateutil 2.8.2
|
||||
yubikey-manager 5.1.1
|
||||
python-dateutil 2.9.0.post0
|
||||
yubikey-manager 5.5.1
|
||||
admin.googleapis.com connects using TLSv1.3 TLS_AES_256_GCM_SHA384
|
||||
```
|
||||
|
||||
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 7.00.24
|
||||
Latest: 7.00.34
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
7.00.24
|
||||
7.00.34
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,7 +82,7 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 7.00.24 - https://github.com/GAM-team/GAM
|
||||
GAM 7.00.34 - https://github.com/GAM-team/GAM
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.0 64-bit final
|
||||
MacOS Sonoma 14.5 x86_64
|
||||
|
||||
@@ -82,6 +82,7 @@ Client Access
|
||||
* [Cloud Identity Devices](Cloud-Identity-Devices)
|
||||
* [Cloud Identity Groups](Cloud-Identity-Groups)
|
||||
* [Cloud Identity Groups - Membership](Cloud-Identity-Groups-Membership)
|
||||
* [Cloud Identity Policies](Cloud-Identity-Policies)
|
||||
* [Cloud Storage](Cloud-Storage)
|
||||
* [Context Aware Access Levels](Context-Aware-Access-Levels)
|
||||
* [Customer](Customer)
|
||||
|
||||
@@ -370,14 +370,15 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<EmailAddress>|user:<EmailAddress>|group:<EmailAddress>|
|
||||
domain:<DomainName>|domain|default
|
||||
<CalendarItem> ::= <EmailAddress>
|
||||
<GIGroupAlias> ::= <EmailAddress>
|
||||
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
|
||||
<CIGroupType> ::= customer|group|other|serviceaccount|user
|
||||
<ChannelCustomerID> ::= <String>
|
||||
<ChatMember> ::= spaces/<String>/members/<String>
|
||||
<ChatMessage> ::= spaces/<String>/messages/<String>
|
||||
<ChatSpace> ::= spaces/<String> | space <String> | space spaces/<String>
|
||||
<ChatThread> ::= spaces/<String>/threads/<String>
|
||||
<GIGroupAlias> ::= <EmailAddress>
|
||||
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
|
||||
<CIGroupType> ::= customer|group|other|serviceaccount|user
|
||||
<CIPolicyName> ::= policies/<String>|settings/<String>|<String>
|
||||
<ClassroomInvitationID> ::= <String>
|
||||
<ClientID> ::= <String>
|
||||
<CommandID> ::= <String>
|
||||
@@ -487,6 +488,8 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<Marker> ::= <String>
|
||||
<MatterItem> ::= <UniqueID>|<String>
|
||||
<MatterState> ::= open|closed|deleted
|
||||
<MeetConferenceName> ::= conferenceRecords/<String>
|
||||
<MeetSpaceName> ::= spaces/<String> | <String>
|
||||
<MessageContent> ::=
|
||||
(message|textmessage|htmlmessage <String>)|
|
||||
(file|textfile|htmlfile <FileName> [charset <Charset>])|
|
||||
@@ -662,6 +665,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
||||
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
||||
<CIGroupTypeList> ::= "<CIGroupType>(,<CIGroupType>)*"
|
||||
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
||||
<ClassroomInvitationIDList> ::= "<ClassroomInvitationID>(,<ClassroomInvitationID>)*"
|
||||
<ContactGroupList> ::= "<ContactGroupItem>(,<ContactGroupItem>)*"
|
||||
<ContactIDList> ::= "<ContactID>(,<ContactID>)*"
|
||||
@@ -998,6 +1002,8 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<CalendarEntity> ::=
|
||||
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<CIPolicyNameEntity> ::=
|
||||
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
||||
<ClassroomInvitationIDEntity> ::=
|
||||
<ClassroomInvitationIDList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<ContactEntity> ::=
|
||||
@@ -4067,6 +4073,18 @@ gam update deviceuserstate <DeviceUserEntity> [clientid <String>]
|
||||
[healthscore very_poor|poor|neutral|good|very_good] [scorereason clear|<String>]
|
||||
(customvalue (bool|boolean <Boolean>)|(number <Integer>)|(string <String>))*
|
||||
|
||||
# Cloud Identity Policies
|
||||
|
||||
gam info policies <CIPolicyNameEntity>
|
||||
[nowarnings] [noappnames]
|
||||
[formatjson]
|
||||
gam print policies [todrive <ToDriveAttribute>*]
|
||||
[filter <String>] [nowarnings] [noappnames]
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show policies
|
||||
[filter <String>] [nowarnings] [noappnames]
|
||||
[formatjson]
|
||||
|
||||
# Inbound SSO
|
||||
|
||||
<SSOProfileDisplayName> ::= <String>
|
||||
|
||||
@@ -1,3 +1,70 @@
|
||||
7.00.34
|
||||
|
||||
Fixed bug introduced in 7.00.33 in `gam print group-members` that caused a trap.
|
||||
|
||||
7.00.33
|
||||
|
||||
Fixed bug in `gam print group-members ... cachememberinfo` that caused a trap.
|
||||
|
||||
7.00.32
|
||||
|
||||
Updated `gam info policies` to accept different policy specifications:
|
||||
* `polices/<String>` - A policy name, `policies/ahv4hg7qc24kvaghb7zihwf4riid4`
|
||||
* `settings/<String>` - A policy setting type, `settings/workspace_marketplace.apps_allowlist`
|
||||
* `<String>` - A policy setting type, `workspace_marketplace.apps_allowlist`
|
||||
|
||||
7.00.31
|
||||
|
||||
Updated `gam info|print|show policies` to make additional API calls for `settings/workspace_marketplace.apps_allowlist`
|
||||
to get the application name for the application ID. Use option `noappnames` to suppress these calls.
|
||||
|
||||
7.00.30
|
||||
|
||||
Added command to display selected Cloud Identity policies.
|
||||
```
|
||||
gam info policies <CIPolicyNameEntity>
|
||||
[nowarnings]
|
||||
[formatjson]
|
||||
```
|
||||
|
||||
Removed option `name <CIPolicyName>` from `gam print|show policies`; use `info policies`.
|
||||
|
||||
7.00.29
|
||||
|
||||
Added option `name <CIPolicyName>` to `gam print|show policies` that displays
|
||||
information about a specific policy.
|
||||
|
||||
7.00.28
|
||||
|
||||
Fixed issue that caused `gam print/show policies` to fail on some group policies.
|
||||
|
||||
7.00.27
|
||||
|
||||
Updated `gam <UserTypeEntity> collect orphans` and all commands that print file paths to recognize
|
||||
that a file owned by a user that has no parents is not an orphan if `sharedWithMeTime` is set.
|
||||
This occurs when user A creates a file in a shared folder owned by user B and user B then removes
|
||||
user A's access to the folder.
|
||||
|
||||
Added commands to display Cloud Identity policies.
|
||||
```
|
||||
gam print policies [todrive <ToDriveAttribute>*]
|
||||
(filter <String>) [nowarnings]
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show policies (filter <String>) [nowarnings]
|
||||
[formatjson]
|
||||
```
|
||||
|
||||
7.00.26
|
||||
|
||||
Updated `drive_dir` in `gam.cfg` to allow the value `.` that causes `redirect csv|stdout|stderr <FileName>`
|
||||
to write `<FileName>` in the current directory without having to prefix `<FileName>` with `./`.
|
||||
|
||||
Upgraded to OpenSSL 3.4.0 where possible.
|
||||
|
||||
7.00.25
|
||||
|
||||
Updated authentication process for `gam print|show projects`.
|
||||
|
||||
7.00.24
|
||||
|
||||
Updated `gam print|show projects ... showiampolicies 0|1|3` to use non-service account authentication.
|
||||
@@ -58,6 +125,8 @@ as files/folders are being identified for processing.
|
||||
|
||||
Added option `<JSONData>` to `gam create|update caalevel`.
|
||||
|
||||
Updated to Python 3.13.0.
|
||||
|
||||
7.00.15
|
||||
|
||||
Added options `timestamp [<Boolean>]` and `timeformat <String>` to `gam <UserTypeEntity> create|update drivefile` that allow
|
||||
@@ -1214,7 +1283,7 @@ Batch processing will suspend for `<Integer>` seconds before the next command li
|
||||
|
||||
Added the following options to `<PermissionMatch>` that allow more powerful matching.
|
||||
```
|
||||
nottype <DriveFileACLType>
|
||||
nottype <DriveFileACLType>
|
||||
typelist <DriveFileACLTypeList>
|
||||
nottypelist <DriveFileACLTypeList>
|
||||
rolelist <DriveFileACLRoleList>
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.00.24'
|
||||
__version__ = '7.00.34'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -3671,7 +3671,7 @@ def SetGlobalVariables():
|
||||
dirPath = os.path.expanduser(_stripStringQuotes(GM.Globals[GM.PARSER].get(sectionName, itemName)))
|
||||
if (not dirPath) and (itemName in {GC.GMAIL_CSE_INCERT_DIR, GC.GMAIL_CSE_INKEY_DIR}):
|
||||
return dirPath
|
||||
if (not dirPath) or (not os.path.isabs(dirPath)):
|
||||
if (not dirPath) or (not os.path.isabs(dirPath) and dirPath != '.'):
|
||||
if (sectionName != configparser.DEFAULTSECT) and (GM.Globals[GM.PARSER].has_option(sectionName, itemName)):
|
||||
dirPath = os.path.join(os.path.expanduser(_stripStringQuotes(GM.Globals[GM.PARSER].get(configparser.DEFAULTSECT, itemName))), dirPath)
|
||||
if not os.path.isabs(dirPath):
|
||||
@@ -9253,6 +9253,7 @@ def doCheckConnection():
|
||||
hosts = ['api.github.com',
|
||||
'raw.githubusercontent.com',
|
||||
'accounts.google.com',
|
||||
'workspace.google.com',
|
||||
'oauth2.googleapis.com',
|
||||
'www.googleapis.com']
|
||||
fix_hosts = {'calendar-json.googleapis.com': 'www.googleapis.com',
|
||||
@@ -10556,7 +10557,12 @@ Continue to authorization by entering a 'c'
|
||||
else:
|
||||
i = 0
|
||||
for a_scope in scopesList:
|
||||
selectedScopes[i] = ' ' if a_scope.get('offByDefault', False) else '*'
|
||||
if a_scope.get('offByDefault'):
|
||||
selectedScopes[i] = ' '
|
||||
elif a_scope.get('roByDefault'):
|
||||
selectedScopes[i] = 'R'
|
||||
else:
|
||||
selectedScopes[i] = '*'
|
||||
i += 1
|
||||
prompt = f'\nPlease enter 0-{numScopes-1}[a|r] or {"|".join(OAUTH2_CMDS)}: '
|
||||
while True:
|
||||
@@ -11381,19 +11387,21 @@ def _getProjects(crm, pfilter, returnNF=False):
|
||||
query=pfilter)
|
||||
if projects:
|
||||
return projects
|
||||
if not pfilter:
|
||||
if (not pfilter) or pfilter == GAM_PROJECT_FILTER:
|
||||
return []
|
||||
if pfilter.startswith('id:'):
|
||||
projects = [callGAPI(crm.projects(), 'get',
|
||||
throwReasons=[GAPI.BAD_REQUEST, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
||||
name=f'projects/{pfilter[3:]}')]
|
||||
if projects or not returnNF:
|
||||
return projects
|
||||
return [{'projectId': pfilter[3:], 'state': 'NF'}]
|
||||
if projects or not returnNF:
|
||||
return projects
|
||||
return []
|
||||
except (GAPI.badRequest, GAPI.invalidArgument) as e:
|
||||
entityActionFailedExit([Ent.PROJECT, pfilter], str(e))
|
||||
except GAPI.permissionDenied:
|
||||
return []
|
||||
if (not pfilter) or (not pfilter.startswith('id:')) or (not returnNF):
|
||||
return []
|
||||
return [{'projectId': pfilter[3:], 'state': 'NF'}]
|
||||
|
||||
def _checkProjectFound(project, i, count):
|
||||
if project.get('state', '') != 'NF':
|
||||
@@ -11561,6 +11569,8 @@ def _getLoginHintProjects(createSvcAcctCmd=False, deleteSvcAcctCmd=False, printS
|
||||
if login_hint and login_hint.find('@') == -1:
|
||||
Cmd.Backup()
|
||||
login_hint = None
|
||||
if readOnly and login_hint and login_hint != _getAdminEmail():
|
||||
readOnly = False
|
||||
projectIds = None
|
||||
pfilter = getString(Cmd.OB_STRING, optional=True)
|
||||
if not pfilter:
|
||||
@@ -11602,15 +11612,9 @@ def _getLoginHintProjects(createSvcAcctCmd=False, deleteSvcAcctCmd=False, printS
|
||||
login_hint = _getValidateLoginHint(login_hint, projectId)
|
||||
crm = None
|
||||
if readOnly:
|
||||
_getSvcAcctData()
|
||||
if (GM.Globals[GM.SVCACCT_SCOPES_DEFINED] and
|
||||
(API.CLOUDRESOURCEMANAGER in GM.Globals[GM.SVCACCT_SCOPES] or
|
||||
API.CLOUDRESOURCEMANAGER_V1 in GM.Globals[GM.SVCACCT_SCOPES])): #Backwards compatibility hack
|
||||
# Removed 6.21.05
|
||||
# _, crm = buildGAPIServiceObject(API.CLOUDRESOURCEMANAGER, login_hint)
|
||||
_, crm = buildGAPIServiceObject(API.CLOUDRESOURCEMANAGER, None)
|
||||
if crm:
|
||||
httpObj = crm._http
|
||||
_, crm = buildGAPIServiceObject(API.CLOUDRESOURCEMANAGER, None)
|
||||
if crm:
|
||||
httpObj = crm._http
|
||||
if not crm:
|
||||
httpObj, crm = getCRMService(login_hint)
|
||||
if projectIds is None:
|
||||
@@ -11620,7 +11624,7 @@ def _getLoginHintProjects(createSvcAcctCmd=False, deleteSvcAcctCmd=False, printS
|
||||
else:
|
||||
projects = _getProjects(crm, f'id:{projectId}', returnNF=True)
|
||||
else:
|
||||
projects = _getProjects(crm, pfilter)
|
||||
projects = _getProjects(crm, pfilter, returnNF=printShowCmd)
|
||||
else:
|
||||
projects = []
|
||||
for projectId in projectIds:
|
||||
@@ -33896,22 +33900,24 @@ def doPrintGroupMembers():
|
||||
row['name'] = unknownName
|
||||
if memberType == Ent.TYPE_USER:
|
||||
try:
|
||||
if not cacheMemberInfo or memberId not in memberNames:
|
||||
if not cacheMemberInfo or memberId not in memberInfo:
|
||||
mbinfo = callGAPI(cd.users(), 'get',
|
||||
throwReasons=GAPI.USER_GET_THROW_REASONS+[GAPI.SERVICE_NOT_AVAILABLE, GAPI.FAILED_PRECONDITION],
|
||||
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||
userKey=memberId, projection=schemaParms['projection'], customFieldMask=schemaParms['customFieldMask'],
|
||||
fields=userFields)
|
||||
if memberOptions[MEMBEROPTION_MEMBERNAMES]:
|
||||
row['name'] = mbinfo['name'].pop('fullName')
|
||||
mname = mbinfo['name'].pop('fullName', unknownName)
|
||||
row['name'] = mname
|
||||
if not mbinfo['name']:
|
||||
mbinfo.pop('name')
|
||||
if cacheMemberInfo:
|
||||
memberNames[memberId] = mname
|
||||
if cacheMemberInfo:
|
||||
memberNames[memberId] = row['name']
|
||||
if mbinfo:
|
||||
memberInfo[memberId] = mbinfo
|
||||
memberInfo[memberId] = mbinfo
|
||||
else:
|
||||
row['name'] = memberNames[memberId]
|
||||
if memberOptions[MEMBEROPTION_MEMBERNAMES]:
|
||||
row['name'] = memberNames[memberId]
|
||||
mbinfo = memberInfo.get(memberId, {})
|
||||
if not FJQC.formatJSON:
|
||||
csvPF.WriteRowTitles(flattenJSON(mbinfo, flattened=row))
|
||||
@@ -35084,6 +35090,180 @@ def updateFieldsForCIGroupMatchPatterns(matchPatterns, fieldsList, csvPF=None):
|
||||
else:
|
||||
fieldsList.append(field)
|
||||
|
||||
CIPOLICY_TIME_OBJECTS = {'createTime', 'updateTime'}
|
||||
|
||||
def _filterPolicies(ci, pageMessage, ifilter):
|
||||
try:
|
||||
policies = callGAPIpages(ci.policies(), 'list', 'policies',
|
||||
pageMessage=pageMessage,
|
||||
throwReasons=[GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
||||
filter=ifilter,
|
||||
fields='nextPageToken,policies(name,policyQuery(group,orgUnit,sortOrder),type,setting)',
|
||||
pageSize=100)
|
||||
# Google returns unordered results, sort them by setting type
|
||||
return sorted(policies, key=lambda p: p.get('setting', {}).get('type', ''))
|
||||
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||
entityActionFailedWarning([Ent.POLICY, ifilter], str(e))
|
||||
return []
|
||||
|
||||
# Policies where GAM should offer additional guidance and information
|
||||
CIPOLICY_ADDITIONAL_WARNINGS = {
|
||||
'settings/drive_and_docs.external_sharing': {
|
||||
'warningType': 'SUPERSEDED_POLICY',
|
||||
'warningMessage': 'CAUTION: Drive Sharing settings are superseded by Drive Trust Rules if Trust Rules has been enabled for your domain. Drive Trust Rule settings are not available in the Policy API today so GAM is not able to check if Trust Rules is enabled and if the settings/drive_and_docs.external_sharing policies are actually in effect for your domain. If Drive Trust Rules is enabled for your domain then this settings/drive_and_docs.external_sharing policy does not accurately reflect your current Drive sharing settings.'
|
||||
}
|
||||
}
|
||||
|
||||
def _getPolicyAppNameFromId(httpObj, app):
|
||||
app['applicationName'] = UNKNOWN
|
||||
appId = app['applicationId']
|
||||
url = f'https://workspace.google.com/marketplace/app/_/{appId}'
|
||||
try:
|
||||
resp, content = httpObj.request(url, 'GET')
|
||||
except:
|
||||
return
|
||||
if resp.status != 200:
|
||||
return
|
||||
if isinstance(content, bytes):
|
||||
content = content.decode()
|
||||
pattern = f'https://workspace.google.com/marketplace/app/(.+?)/{appId}'
|
||||
a = re.search(pattern, content)
|
||||
if a:
|
||||
app['applicationName'] = a.group(1)
|
||||
|
||||
def _cleanPolicy(policy, add_warnings, no_appnames, cd, groups_ci):
|
||||
# convert any wordlists into spaced strings to reduce output complexity
|
||||
if policy['setting']['type'] == 'settings/detector.word_list':
|
||||
policy['setting']['value']['wordList'] = ' '.join(policy['setting']['value']['wordList']['words'])
|
||||
# get application name for application id
|
||||
if policy['setting']['type'] == 'settings/workspace_marketplace.apps_allowlist' and not no_appnames:
|
||||
httpObj = getHttpObj(timeout=10)
|
||||
for app in policy['setting']['value'].get('apps', []):
|
||||
_getPolicyAppNameFromId(httpObj, app)
|
||||
# add any warnings to applicable policies
|
||||
if add_warnings and policy['setting']['type'] in CIPOLICY_ADDITIONAL_WARNINGS:
|
||||
policy['warning'] = CIPOLICY_ADDITIONAL_WARNINGS[policy['setting']['type']]
|
||||
if groupId := policy['policyQuery'].get('group'):
|
||||
_, _, policy['policyQuery']['groupEmail'] = convertGroupCloudIDToEmail(groups_ci, groupId)
|
||||
# all groups are in the root OU so the orgUnit attribute is useless
|
||||
policy['policyQuery'].pop('orgUnit', None)
|
||||
elif orgId := policy['policyQuery'].get('orgUnit'):
|
||||
policy['policyQuery']['orgUnitPath'] = convertOrgUnitIDtoPath(cd, orgId)
|
||||
|
||||
def _showPolicy(policy, FJQC, i=0, count=0):
|
||||
if FJQC is not None and FJQC.formatJSON:
|
||||
printLine(json.dumps(cleanJSON(policy, timeObjects=CIPOLICY_TIME_OBJECTS),
|
||||
ensure_ascii=False,
|
||||
sort_keys=True))
|
||||
return
|
||||
printEntity([Ent.POLICY, policy['name']], i, count)
|
||||
Ind.Increment()
|
||||
policy.pop('name')
|
||||
showJSON(None, policy, timeObjects=CIPOLICY_TIME_OBJECTS)
|
||||
printBlankLine()
|
||||
Ind.Decrement()
|
||||
|
||||
def _showPolicies(policies, FJQC, add_warnings, no_appnames, cd, groups_ci):
|
||||
count = len(policies)
|
||||
performActionNumItems(count, Ent.POLICY)
|
||||
Ind.Increment()
|
||||
i = 0
|
||||
for policy in policies:
|
||||
i += 1
|
||||
_cleanPolicy(policy, add_warnings, no_appnames, cd, groups_ci)
|
||||
_showPolicy(policy, FJQC, i, count)
|
||||
Ind.Decrement()
|
||||
|
||||
# gam info policies <CIPolicyNameEntity>
|
||||
# [nowarnings] [noappnames]
|
||||
# [formatjson]
|
||||
def doInfoCIPolicies():
|
||||
groups_ci = buildGAPIObject(API.CLOUDIDENTITY_GROUPS)
|
||||
ci = buildGAPIObject(API.CLOUDIDENTITY_POLICY)
|
||||
cd = buildGAPIObject(API.DIRECTORY)
|
||||
entityList = getEntityList(Cmd.OB_CIPOLICY_NAME_ENTITY)
|
||||
FJQC = FormatJSONQuoteChar()
|
||||
add_warnings = True
|
||||
no_appnames = False
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
if myarg == 'nowarnings':
|
||||
add_warnings = False
|
||||
elif myarg == 'noappnames':
|
||||
no_appnames=True
|
||||
else:
|
||||
FJQC.GetFormatJSON(myarg)
|
||||
i = 0
|
||||
count = len(entityList)
|
||||
for pname in entityList:
|
||||
i += 1
|
||||
if pname.startswith('policies/'):
|
||||
try:
|
||||
policies = [callGAPI(ci.policies(), 'get',
|
||||
bailOnInternalError=True,
|
||||
throwReasons=[GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED, GAPI.INTERNAL_ERROR],
|
||||
name=pname,
|
||||
fields='name,policyQuery(group,orgUnit,sortOrder),type,setting')]
|
||||
except (GAPI.invalid, GAPI.invalidArgument, GAPI.permissionDenied, GAPI.internalError) as e:
|
||||
entityActionFailedWarning([Ent.POLICY, pname], str(e), i, count)
|
||||
continue
|
||||
else:
|
||||
if pname.startswith('settings/'):
|
||||
pname = pname.split('/')[1]
|
||||
ifilter = f"setting.type.matches('{pname}')"
|
||||
printGettingAllAccountEntities(Ent.POLICY, ifilter)
|
||||
policies = _filterPolicies(ci, getPageMessage(), ifilter)
|
||||
_showPolicies(policies, FJQC, add_warnings, no_appnames, cd, groups_ci)
|
||||
|
||||
# gam print policies [todrive <ToDriveAttribute>*]
|
||||
# [filter <String>] [nowarnings] [noappnames]
|
||||
# [formatjson [quotechar <Character>]]
|
||||
# gam show policies
|
||||
# [filter <String>] [nowarnings] [noappnames]
|
||||
# [formatjson]
|
||||
def doPrintShowCIPolicies():
|
||||
|
||||
def _printPolicy(policy):
|
||||
row = flattenJSON(policy, timeObjects=CIPOLICY_TIME_OBJECTS)
|
||||
if not FJQC.formatJSON:
|
||||
csvPF.WriteRowTitles(row)
|
||||
elif csvPF.CheckRowTitles(row):
|
||||
csvPF.WriteRowNoFilter({'name': policy['name'],
|
||||
'JSON': json.dumps(cleanJSON(policy, timeObjects=CIPOLICY_TIME_OBJECTS),
|
||||
ensure_ascii=False,
|
||||
sort_keys=True)})
|
||||
|
||||
groups_ci = buildGAPIObject(API.CLOUDIDENTITY_GROUPS)
|
||||
ci = buildGAPIObject(API.CLOUDIDENTITY_POLICY)
|
||||
cd = buildGAPIObject(API.DIRECTORY)
|
||||
csvPF = CSVPrintFile(['name']) if Act.csvFormat() else None
|
||||
FJQC = FormatJSONQuoteChar(csvPF)
|
||||
ifilter = None
|
||||
add_warnings = True
|
||||
no_appnames = False
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
if csvPF and myarg == 'todrive':
|
||||
csvPF.GetTodriveParameters()
|
||||
elif myarg == 'filter':
|
||||
ifilter = getString(Cmd.OB_STRING)
|
||||
elif myarg == 'nowarnings':
|
||||
add_warnings = False
|
||||
elif myarg == 'noappnames':
|
||||
no_appnames=True
|
||||
else:
|
||||
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||
printGettingAllAccountEntities(Ent.POLICY, ifilter)
|
||||
policies = _filterPolicies(ci, getPageMessage(), ifilter)
|
||||
if not csvPF:
|
||||
_showPolicies(policies, FJQC, add_warnings, no_appnames, cd, groups_ci)
|
||||
else:
|
||||
for policy in policies:
|
||||
_cleanPolicy(policy, add_warnings, no_appnames, cd, groups_ci)
|
||||
_printPolicy(policy)
|
||||
if csvPF:
|
||||
csvPF.writeCSVfile('Policies')
|
||||
|
||||
PRINT_CIGROUPS_JSON_TITLES = ['email', 'JSON']
|
||||
|
||||
# gam print cigroups [todrive <ToDriveAttribute>*]
|
||||
@@ -54506,7 +54686,7 @@ def extendFileTree(fileTree, feed, DLP, stripCRsFromName):
|
||||
if f_file['mimeType'] == MIMETYPE_GA_FOLDER and f_file['name'] == MY_DRIVE:
|
||||
f_file['parents'] = []
|
||||
else:
|
||||
f_file['parents'] = [ORPHANS] if f_file.get('ownedByMe', False) else [SHARED_WITHME]
|
||||
f_file['parents'] = [ORPHANS] if f_file.get('ownedByMe', False) and 'sharedWithMeTime' not in f_file else [SHARED_WITHME]
|
||||
else:
|
||||
f_file['parents'] = [SHARED_DRIVES] if 'sharedWithMeTime' not in f_file else [SHARED_WITHME]
|
||||
if fileId not in fileTree:
|
||||
@@ -54526,11 +54706,11 @@ def extendFileTreeParents(drive, fileTree, fields):
|
||||
fileId=fileId, fields=fields, supportsAllDrives=True)
|
||||
if not result.get('parents', []):
|
||||
if not result.get('driveId'):
|
||||
result['parents'] = [ORPHANS] if result.get('ownedByMe', False) else [SHARED_WITHME]
|
||||
result['parents'] = [ORPHANS] if result.get('ownedByMe', False) and 'sharedWithMeTime' not in result else [SHARED_WITHME]
|
||||
else:
|
||||
if result['name'] == TEAM_DRIVE:
|
||||
result['name'] = _getSharedDriveNameFromId(drive, result['driveId'])
|
||||
result['parents'] = [SHARED_DRIVES] if 'sharedWithMeTime' not in f_file else [SHARED_WITHME]
|
||||
result['parents'] = [SHARED_DRIVES] if 'sharedWithMeTime' not in result else [SHARED_WITHME]
|
||||
fileTree[fileId]['info'] = result
|
||||
fileTree[fileId]['info']['noDisplay'] = True
|
||||
for parentId in result['parents']:
|
||||
@@ -60725,7 +60905,8 @@ def collectOrphans(users):
|
||||
pageMessage=getPageMessageForWhom(),
|
||||
throwReasons=GAPI.DRIVE_USER_THROW_REASONS,
|
||||
retryReasons=[GAPI.UNKNOWN_ERROR],
|
||||
q=query, orderBy=OBY.orderBy, fields='nextPageToken,files(id,name,parents,mimeType,capabilities(canMoveItemWithinDrive))',
|
||||
q=query, orderBy=OBY.orderBy,
|
||||
fields='nextPageToken,files(id,name,parents,mimeType,sharedWithMeTime,capabilities(canMoveItemWithinDrive))',
|
||||
pageSize=GC.Values[GC.DRIVE_MAX_RESULTS])
|
||||
if targetUserFolderPattern:
|
||||
trgtUserFolderName = _substituteForUser(targetUserFolderPattern, user, userName)
|
||||
@@ -60737,7 +60918,7 @@ def collectOrphans(users):
|
||||
continue
|
||||
orphanDriveFiles = []
|
||||
for fileEntry in feed:
|
||||
if not fileEntry.get('parents'):
|
||||
if not fileEntry.get('parents') and 'sharedWithMeTime' not in fileEntry:
|
||||
orphanDriveFiles.append(fileEntry)
|
||||
jcount = len(orphanDriveFiles)
|
||||
entityPerformActionNumItemsModifier([Ent.USER, user], jcount, Ent.DRIVE_ORPHAN_FILE_OR_FOLDER,
|
||||
@@ -75006,6 +75187,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_CHROMESCHEMA: doInfoChromePolicySchemas,
|
||||
Cmd.ARG_CIGROUP: doInfoCIGroups,
|
||||
Cmd.ARG_CIGROUPMEMBERS: doInfoCIGroupMembers,
|
||||
Cmd.ARG_CIPOLICY: doInfoCIPolicies,
|
||||
Cmd.ARG_CONTACT: doInfoDomainContacts,
|
||||
Cmd.ARG_COURSE: doInfoCourse,
|
||||
Cmd.ARG_COURSES: doInfoCourses,
|
||||
@@ -75093,6 +75275,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_CHROMEVERSIONS: doPrintShowChromeVersions,
|
||||
Cmd.ARG_CIGROUP: doPrintCIGroups,
|
||||
Cmd.ARG_CIGROUPMEMBERS: doPrintCIGroupMembers,
|
||||
Cmd.ARG_CIPOLICY: doPrintShowCIPolicies,
|
||||
Cmd.ARG_CLASSROOMINVITATION: doPrintShowClassroomInvitations,
|
||||
Cmd.ARG_CONTACT: doPrintShowDomainContacts,
|
||||
Cmd.ARG_COURSE: doPrintCourses,
|
||||
@@ -75221,6 +75404,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_CHROMESCHEMA: doPrintShowChromeSchemas,
|
||||
Cmd.ARG_CHROMEVERSIONS: doPrintShowChromeVersions,
|
||||
Cmd.ARG_CIGROUPMEMBERS: doShowCIGroupMembers,
|
||||
Cmd.ARG_CIPOLICY: doPrintShowCIPolicies,
|
||||
Cmd.ARG_CLASSROOMINVITATION: doPrintShowClassroomInvitations,
|
||||
Cmd.ARG_CONTACT: doPrintShowDomainContacts,
|
||||
Cmd.ARG_CROSTELEMETRY: doInfoPrintShowCrOSTelemetry,
|
||||
@@ -75404,6 +75588,7 @@ MAIN_COMMANDS_OBJ_ALIASES = {
|
||||
Cmd.ARG_CIGROUPSMEMBERS: Cmd.ARG_CIGROUPMEMBERS,
|
||||
Cmd.ARG_CIMEMBER: Cmd.ARG_CIGROUPMEMBERS,
|
||||
Cmd.ARG_CIMEMBERS: Cmd.ARG_CIGROUPMEMBERS,
|
||||
Cmd.ARG_CIPOLICIES: Cmd.ARG_CIPOLICY,
|
||||
Cmd.ARG_CLASS: Cmd.ARG_COURSE,
|
||||
Cmd.ARG_CLASSES: Cmd.ARG_COURSES,
|
||||
Cmd.ARG_CLASSPARTICIPANTS: Cmd.ARG_COURSEPARTICIPANTS,
|
||||
|
||||
@@ -46,10 +46,10 @@ CLOUDIDENTITY_DEVICES = 'cloudidentitydevices'
|
||||
CLOUDIDENTITY_GROUPS = 'cloudidentitygroups'
|
||||
CLOUDIDENTITY_INBOUND_SSO = 'cloudidentityinboundsso'
|
||||
CLOUDIDENTITY_ORGUNITS = 'cloudidentityorgunits'
|
||||
CLOUDIDENTITY_POLICY = 'cloudidentitypolicy'
|
||||
CLOUDIDENTITY_ORGUNITS_BETA = 'cloudidentityorgunitsbeta'
|
||||
CLOUDIDENTITY_USERINVITATIONS = 'cloudidentityuserinvitations'
|
||||
CLOUDRESOURCEMANAGER = 'cloudresourcemanager'
|
||||
CLOUDRESOURCEMANAGER_V1 = 'cloudresourcemanager1'
|
||||
CONTACTS = 'contacts'
|
||||
CONTACTDELEGATION = 'contactdelegation'
|
||||
DATATRANSFER = 'datatransfer'
|
||||
@@ -227,6 +227,7 @@ _INFO = {
|
||||
CLOUDIDENTITY_INBOUND_SSO: {'name': 'Cloud Identity Inbound SSO API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_ORGUNITS: {'name': 'Cloud Identity OrgUnits API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_ORGUNITS_BETA: {'name': 'Cloud Identity OrgUnits API', 'version': 'v1beta1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_POLICY: {'name': 'Cloud Identity Policy API', 'version': 'v1beta1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_USERINVITATIONS: {'name': 'Cloud Identity User Invitations API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDRESOURCEMANAGER: {'name': 'Cloud Resource Manager API v3', 'version': 'v3', 'v2discovery': True},
|
||||
CONTACTS: {'name': 'Contacts API', 'version': 'v3', 'v2discovery': False},
|
||||
@@ -365,6 +366,12 @@ _CLIENT_SCOPES = [
|
||||
'api': CLOUDIDENTITY_ORGUNITS_BETA,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.orgunits'},
|
||||
{'name': 'Cloud Identity - Policy',
|
||||
'api': CLOUDIDENTITY_POLICY,
|
||||
'subscopes': READONLY,
|
||||
'roByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.policies'
|
||||
},
|
||||
{'name': 'Cloud Identity User Invitations API',
|
||||
'api': CLOUDIDENTITY_USERINVITATIONS,
|
||||
'subscopes': READONLY,
|
||||
@@ -485,6 +492,7 @@ _CLIENT_SCOPES = [
|
||||
{'name': 'Site Verification API',
|
||||
'api': SITEVERIFICATION,
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/siteverification'},
|
||||
{'name': 'Sites API',
|
||||
'api': SITES,
|
||||
@@ -695,10 +703,6 @@ _SVCACCT_SCOPES = [
|
||||
]
|
||||
|
||||
_SVCACCT_SPECIAL_SCOPES = [
|
||||
{'name': 'Cloud Resource Manager API v3',
|
||||
'api': CLOUDRESOURCEMANAGER,
|
||||
'subscopes': [],
|
||||
'scope': CLOUD_PLATFORM_SCOPE},
|
||||
{'name': 'Drive API - todrive',
|
||||
'api': DRIVETD,
|
||||
'subscopes': [],
|
||||
|
||||
@@ -493,6 +493,8 @@ class GamCLArgs():
|
||||
ARG_CIGROUPSMEMBERS = 'cigroupsmembers'
|
||||
ARG_CIMEMBER = 'cimember'
|
||||
ARG_CIMEMBERS = 'cimembers'
|
||||
ARG_CIPOLICY = 'policy'
|
||||
ARG_CIPOLICIES = 'policies'
|
||||
ARG_CLASS = 'class'
|
||||
ARG_CLASSES = 'classes'
|
||||
ARG_CLASSPARTICIPANTS = 'classparticipants'
|
||||
@@ -843,6 +845,7 @@ class GamCLArgs():
|
||||
OB_CHROME_VERSION = 'ChromeVersion'
|
||||
OB_CIDR_NETMASK = 'CIDRnetmask'
|
||||
OB_CIGROUP_ALIAS_LIST = "CIGroupAliasList"
|
||||
OB_CIPOLICY_NAME_ENTITY = 'CIPolicyNameEntity'
|
||||
OB_CLASSROOM_INVITATION_ID_ENTITY = 'ClassroomInvitationIDEntity'
|
||||
OB_CLIENT_ID = 'ClientID'
|
||||
OB_COLLABORATOR_ITEM = 'CollaboratorItem'
|
||||
|
||||
@@ -302,6 +302,7 @@ class GamEntity():
|
||||
PERMITTEE = 'prmt'
|
||||
PERSONAL_DEVICE = 'pedv'
|
||||
PHOTO = 'phot'
|
||||
POLICY = 'poli'
|
||||
POP_ENABLED = 'popa'
|
||||
PRESENTATION = 'pres'
|
||||
PRINTER = 'prin'
|
||||
@@ -653,6 +654,7 @@ class GamEntity():
|
||||
PERMITTEE: ['Permittees', 'Permittee'],
|
||||
PERSONAL_DEVICE: ['Personal Devices', 'Personal Device'],
|
||||
PHOTO: ['Photos', 'Photo'],
|
||||
POLICY: ['Policies', 'Policy'],
|
||||
POP_ENABLED: ['POP Enabled', 'POP Enabled'],
|
||||
PRESENTATION: ['Presentations', 'Presentation'],
|
||||
PRINTER: ['Printers', 'Printer'],
|
||||
|
||||
Reference in New Issue
Block a user