Skip to content

Commit

Permalink
Added command to display selected Cloud Identity policies.
Browse files Browse the repository at this point in the history
  • Loading branch information
taers232c committed Oct 25, 2024
1 parent 01a6781 commit 40899de
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 88 deletions.
28 changes: 23 additions & 5 deletions docs/Cloud-Identity-Policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ To use these commands you must update your client access authentication.
```
gam oauth create
...
[*] 19) Cloud Identity - Policy
[R] 19) Cloud Identity - Policy
```

## Definitions
```
<CIPolicyName> ::= policies/<String>
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
<CIPolicyNameEntity> ::=
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
```

## Policies
Expand Down Expand Up @@ -305,26 +308,41 @@ workspace_marketplace.apps_allowlist
apps
```
## Display Cloud Identity Policies
Display selected policies.
```
gam info policies <CIPolicyEntity>
[nowarnings]
[formatjson]
```

By default, policy warnings are displayed, use the 'nowarnings` option to suppress their display.

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>)|(name <CIPolicyName>)] [nowarnings]
[filter <String>] [nowarnings]
[formatjson]
```
By default, all policies are displayed.
* `filter <String>` - Display filtered policies, See https://github.com/taers232c/GAMADV-XTD3/wiki/Cloud-Identity-Policies
* `name <CIPolicyName>` - Display a specfic policy

By default, policy warnings are displayed, use the 'nowarnings` option to suppress their display.

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>)|(name <CIPolicyName>)] [nowarnings]
[filter <String>] [nowarnings]
[formatjson [quotechar <Character>]]
```
By default, all policies are displayed:
* `filter <String>` - Display filtered policies, See https://github.com/taers232c/GAMADV-XTD3/wiki/Cloud-Identity-Policies
* `name <CIPolicyName>` - Display a specfic policy

By default, policy warnings are displayed, use the 'nowarnings` option to suppress their display.

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.
Expand Down
4 changes: 3 additions & 1 deletion docs/Collections-of-Items.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!# Collections of Items
# Collections of Items
- [Python Regular Expressions](Python-Regular-Expressions) Match function
- [Definitions](#definitions)
- [ListSelector](#listselector)
Expand Down Expand Up @@ -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> ::=
Expand Down
11 changes: 11 additions & 0 deletions docs/GamUpdates.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ 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.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
Expand Down
4 changes: 2 additions & 2 deletions docs/How-to-Upgrade-Legacy-GAM-to-GAM7.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.29 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.00.30 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <[email protected]>
Python 3.13.0 64-bit final
MacOS Sonoma 14.5 x86_64
Expand Down Expand Up @@ -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.29 - https://github.com/GAM-team/GAM - pythonsource
GAM7 7.00.30 - https://github.com/GAM-team/GAM - pythonsource
GAM Team <[email protected]>
Python 3.13.0 64-bit final
Windows-10-10.0.17134 AMD64
Expand Down
1 change: 1 addition & 0 deletions docs/List-Items.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>)*"
Expand Down
12 changes: 6 additions & 6 deletions docs/Version-and-Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAM 7.00.29 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.00.30 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <[email protected]>
Python 3.13.0 64-bit final
MacOS Sonoma 14.5 x86_64
Expand All @@ -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.29 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.00.30 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <[email protected]>
Python 3.13.0 64-bit final
MacOS Sonoma 14.5 x86_64
Expand All @@ -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.29 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.00.30 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <[email protected]>
Python 3.13.0 64-bit final
MacOS Sonoma 14.5 x86_64
Expand Down Expand Up @@ -64,15 +64,15 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gam7
Version Check:
Current: 5.35.08
Latest: 7.00.29
Latest: 7.00.30
echo $?
1
```

Print the current version number without details
```
gam version simple
7.00.29
7.00.30
```
In Linux/MacOS you can do:
```
Expand All @@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 7.00.29 - https://github.com/GAM-team/GAM
GAM 7.00.30 - https://github.com/GAM-team/GAM
GAM Team <[email protected]>
Python 3.13.0 64-bit final
MacOS Sonoma 14.5 x86_64
Expand Down
11 changes: 9 additions & 2 deletions src/GamCommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -665,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>)*"
Expand Down Expand Up @@ -1001,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> ::=
Expand Down Expand Up @@ -4072,11 +4075,15 @@ gam update deviceuserstate <DeviceUserEntity> [clientid <String>]

# Cloud Identity Policies

gam info policies <CIPolicyNameEntity>
[nowarnings]
[formatjson]

gam print policies [todrive <ToDriveAttribute>*]
[(filter <String>)|(name <CIPolicyName>)] [nowarnings]
[filter <String>] [nowarnings]
[formatjson [quotechar <Character>]]
gam show policies
[(filter <String>)|(name <CIPolicyName>)] [nowarnings]
[filter <String>] [nowarnings]
[formatjson]

# Inbound SSO
Expand Down
13 changes: 13 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
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
Expand Down Expand Up @@ -94,6 +105,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
Expand Down
Loading

0 comments on commit 40899de

Please sign in to comment.