mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-24 08:01:36 +00:00
Compare commits
15 Commits
20250423.2
...
v7.06.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7b31550f3 | ||
|
|
ed19f877a5 | ||
|
|
0ab08c968e | ||
|
|
02a7a1a106 | ||
|
|
170a2e593b | ||
|
|
8339b92537 | ||
|
|
ce16aa252e | ||
|
|
8a70470281 | ||
|
|
981301a878 | ||
|
|
13cfb77811 | ||
|
|
458e08645d | ||
|
|
98d4d3c06f | ||
|
|
2204c35193 | ||
|
|
87827badb8 | ||
|
|
319bedd338 |
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@@ -28,6 +28,8 @@ env:
|
||||
OPENSSL_SOURCE_PATH: ${{ github.workspace }}/src/openssl
|
||||
PYTHON_INSTALL_PATH: ${{ github.workspace }}/bin/python
|
||||
PYTHON_SOURCE_PATH: ${{ github.workspace }}/src/cpython
|
||||
CRYPTOGRAPHY_BUILD_OPENSSL_NO_LEGACY: 1
|
||||
CRYPTOGRAPHY_OPENSSL_NO_LEGACY: 1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -197,7 +199,7 @@ jobs:
|
||||
run: |
|
||||
echo "RUNNING: apt update..."
|
||||
sudo apt-get -qq --yes update
|
||||
sudo apt-get -qq --yes install swig libpcsclite-dev libxslt1-dev libsqlite3-dev
|
||||
sudo apt-get -qq --yes install swig libpcsclite-dev libxslt1-dev libsqlite3-dev libffi-dev pkg-config
|
||||
|
||||
- name: MacOS install tools
|
||||
if: runner.os == 'macOS'
|
||||
@@ -450,6 +452,9 @@ jobs:
|
||||
"$PYTHON" -m pip install --upgrade pip
|
||||
"$PYTHON" -m pip install --upgrade wheel
|
||||
"$PYTHON" -m pip install --upgrade setuptools
|
||||
"$PYTHON" -m pip install --upgrade importlib-metadata
|
||||
"$PYTHON" -m pip install --upgrade setuptools-scm
|
||||
"$PYTHON" -m pip list
|
||||
|
||||
- name: Custom wheels for Win arm64
|
||||
if: runner.os == 'Windows' && runner.arch == 'ARM64'
|
||||
@@ -462,7 +467,14 @@ jobs:
|
||||
echo "Downloading ${latest_crypt_whl}..."
|
||||
curl -O -L "$latest_crypt_whl"
|
||||
"$PYTHON" -m pip install cryptography*.whl
|
||||
|
||||
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
# - name: Compile cryptography from source (no legacy)
|
||||
# if: runner.os != 'Windows' || runner.arch != 'ARM64'
|
||||
# run: |
|
||||
# pip install --no-binary ":all:" --force cryptography
|
||||
|
||||
- name: Install pip requirements
|
||||
run: |
|
||||
echo "before anything..."
|
||||
|
||||
@@ -7,6 +7,7 @@ authors = [
|
||||
{ name="Jay Lee", email="jay0lee@gmail.com" },
|
||||
{ name="Ross Scroggs", email="Ross.Scroggs@gmail.com" },
|
||||
]
|
||||
# # The following files should be edited to match: setup.cfg, requirements.txt
|
||||
dependencies = [
|
||||
"chardet>=5.2.0",
|
||||
"cryptography>=44.0.2",
|
||||
@@ -17,7 +18,7 @@ dependencies = [
|
||||
"google-auth-oauthlib>=1.2.2",
|
||||
"google-auth>=2.39.0",
|
||||
"httplib2>=0.22.0",
|
||||
"lxml",
|
||||
"lxml>=5.4.0",
|
||||
"passlib>=1.7.4",
|
||||
"pathvalidate>=3.2.3",
|
||||
"pyscard==2.2.1",
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
7.06.11
|
||||
|
||||
Improved `gam checkconn`.
|
||||
|
||||
Updated `gam print group-members` and `gam print cigroup-members` to recognize members
|
||||
that are groups representing chat spaces. For now, these groups are not expanded when
|
||||
`recursive` is specified.
|
||||
|
||||
7.06.10
|
||||
|
||||
Added the following license SKU.
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.06.10'
|
||||
__version__ = '7.06.11'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -95,6 +95,8 @@ import wsgiref.simple_server
|
||||
import wsgiref.util
|
||||
import zipfile
|
||||
|
||||
# disable legacy stuff we don't use and isn't secure
|
||||
os.environ['CRYPTOGRAPHY_OPENSSL_NO_LEGACY'] = "1"
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives import hashes, serialization
|
||||
@@ -9358,32 +9360,9 @@ def getOSPlatform():
|
||||
|
||||
# gam checkconnection
|
||||
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',
|
||||
'storage-api.googleapis.com': 'storage.googleapis.com'}
|
||||
api_hosts = ['apps-apis.google.com',
|
||||
'sites.google.com',
|
||||
'versionhistory.googleapis.com',
|
||||
'www.google.com']
|
||||
for host in API.PROJECT_APIS:
|
||||
host = fix_hosts.get(host, host)
|
||||
if host not in api_hosts and host not in hosts:
|
||||
api_hosts.append(host)
|
||||
hosts.extend(sorted(api_hosts))
|
||||
host_count = len(hosts)
|
||||
httpObj = getHttpObj(timeout=30)
|
||||
httpObj.follow_redirects = False
|
||||
headers = {'user-agent': GAM_USER_AGENT}
|
||||
okay = createGreenText('OK')
|
||||
not_okay = createRedText('ERROR')
|
||||
try_count = 0
|
||||
success_count = 0
|
||||
for host in hosts:
|
||||
|
||||
def check_host(host):
|
||||
nonlocal try_count, okay, not_okay, success_count
|
||||
try_count += 1
|
||||
dns_err = None
|
||||
ip = 'unknown'
|
||||
@@ -9393,12 +9372,12 @@ def doCheckConnection():
|
||||
dns_err = f'{not_okay}\n DNS failure: {str(e)}\n'
|
||||
except Exception as e:
|
||||
dns_err = f'{not_okay}\n Unknown DNS failure: {str(e)}\n'
|
||||
check_line = f'Checking {host} ({ip}) ({try_count}/{host_count})...'
|
||||
check_line = f'Checking {host} ({ip}) ({try_count})...'
|
||||
writeStdout(f'{check_line:<100}')
|
||||
flushStdout()
|
||||
if dns_err:
|
||||
writeStdout(dns_err)
|
||||
continue
|
||||
return
|
||||
gen_firewall = 'You probably have security software or a firewall on your machine or network that is preventing GAM from making Internet connections. Check your network configuration or try running GAM on a hotspot or home network to see if the problem exists only on your organization\'s network.'
|
||||
try:
|
||||
if host.startswith('http'):
|
||||
@@ -9427,7 +9406,54 @@ def doCheckConnection():
|
||||
writeStdout(f'{not_okay}\n Timed out trying to connect to host\n')
|
||||
except Exception as e:
|
||||
writeStdout(f'{not_okay}\n {str(e)}\n')
|
||||
if success_count == host_count:
|
||||
|
||||
try_count = 0
|
||||
httpObj = getHttpObj(timeout=30)
|
||||
httpObj.follow_redirects = False
|
||||
headers = {'user-agent': GAM_USER_AGENT}
|
||||
okay = createGreenText('OK')
|
||||
not_okay = createRedText('ERROR')
|
||||
success_count = 0
|
||||
initial_hosts = ['api.github.com',
|
||||
'raw.githubusercontent.com',
|
||||
'accounts.google.com',
|
||||
'oauth2.googleapis.com',
|
||||
'www.googleapis.com']
|
||||
for host in initial_hosts:
|
||||
check_host(host)
|
||||
api_hosts = ['apps-apis.google.com',
|
||||
'www.google.com']
|
||||
for host in api_hosts:
|
||||
check_host(host)
|
||||
# For v2 discovery APIs, GAM gets discovery file from <api>.googleapis.com so
|
||||
# add those domains.
|
||||
disc_hosts = []
|
||||
for api, config in API._INFO.items():
|
||||
if config.get('v2discovery') and not config.get('localdiscovery'):
|
||||
if mapped_api := config.get('mappedAPI'):
|
||||
api = mapped_api
|
||||
host = f'{api}.googleapis.com'
|
||||
if host not in disc_hosts:
|
||||
disc_hosts.append(host)
|
||||
for host in disc_hosts:
|
||||
check_host(host)
|
||||
checked_hosts = initial_hosts + api_hosts + disc_hosts
|
||||
# now we need to "build" each API and check it's base URL host
|
||||
# if we haven't already. This may not be any hosts at all but
|
||||
# to ensure we are checking all hosts GAM may use we should
|
||||
# keep this.
|
||||
for api in API._INFO:
|
||||
if api in [API.CONTACTS, API.EMAIL_AUDIT]:
|
||||
continue
|
||||
svc = getService(api, httpObj)
|
||||
base_url = svc._rootDesc.get('baseUrl')
|
||||
parsed_base_url = urlparse(base_url)
|
||||
base_host = parsed_base_url.netloc
|
||||
if base_host not in checked_hosts:
|
||||
print(f'checking {base_host} for {api}')
|
||||
check_host(base_host)
|
||||
checked_hosts.append(base_host)
|
||||
if success_count == try_count:
|
||||
writeStdout(createGreenText('All hosts passed!\n'))
|
||||
else:
|
||||
systemErrorExit(3, createYellowText('Some hosts failed to connect! Please follow the recommendations for those hosts to correct any issues and try again.'))
|
||||
@@ -34179,7 +34205,8 @@ def getGroupMembers(cd, groupEmail, memberRoles, membersList, membersSet, i, cou
|
||||
elif memberOptions[MEMBEROPTION_NODUPLICATES]:
|
||||
groupMemberList = []
|
||||
for member in groupMembers:
|
||||
if member['type'] != Ent.TYPE_GROUP:
|
||||
namespace = member['email'].find('@') == -1
|
||||
if member['type'] != Ent.TYPE_GROUP or namespace:
|
||||
if ((member['type'] in typesSet and
|
||||
checkMemberMatch(member, memberOptions) and
|
||||
_checkMemberRoleIsSuspendedIsArchived(member, validRoles, memberOptions[MEMBEROPTION_ISSUSPENDED], memberOptions[MEMBEROPTION_ISARCHIVED]) and
|
||||
@@ -34208,7 +34235,8 @@ def getGroupMembers(cd, groupEmail, memberRoles, membersList, membersSet, i, cou
|
||||
memberOptions, memberDisplayOptions, level+1, typesSet)
|
||||
else:
|
||||
for member in groupMembers:
|
||||
if member['type'] != Ent.TYPE_GROUP:
|
||||
namespace = member['email'].find('@') == -1
|
||||
if member['type'] != Ent.TYPE_GROUP or namespace:
|
||||
if ((member['type'] in typesSet) and
|
||||
checkMemberMatch(member, memberOptions) and
|
||||
_checkMemberRoleIsSuspendedIsArchived(member, validRoles,
|
||||
@@ -36307,7 +36335,8 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
|
||||
for member in groupMembers:
|
||||
getCIGroupMemberRoleFixType(member)
|
||||
memberName = member.get('preferredMemberKey', {}).get('id', '')
|
||||
if member['type'] != Ent.TYPE_GROUP:
|
||||
namespace = member.get('preferredMemberKey', {}).get('namespace', '')
|
||||
if member['type'] != Ent.TYPE_GROUP or namespace:
|
||||
if (member['type'] in typesSet and
|
||||
checkCIMemberMatch(member, memberOptions) and
|
||||
_checkMemberRole(member, validRoles) and
|
||||
@@ -36335,7 +36364,8 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
|
||||
for member in groupMembers:
|
||||
getCIGroupMemberRoleFixType(member)
|
||||
memberName = member.get('preferredMemberKey', {}).get('id', '')
|
||||
if member['type'] != Ent.TYPE_GROUP:
|
||||
namespace = member.get('preferredMemberKey', {}).get('namespace', '')
|
||||
if member['type'] != Ent.TYPE_GROUP or namespace:
|
||||
if (member['type'] in typesSet and
|
||||
checkCIMemberMatch(member, memberOptions) and
|
||||
_checkMemberRole(member, validRoles) and
|
||||
|
||||
@@ -244,7 +244,7 @@ _INFO = {
|
||||
EMAIL_AUDIT: {'name': 'Email Audit API', 'version': 'v1', 'v2discovery': False},
|
||||
FORMS: {'name': 'Forms API', 'version': 'v1', 'v2discovery': True},
|
||||
GMAIL: {'name': 'Gmail API', 'version': 'v1', 'v2discovery': True},
|
||||
GROUPSMIGRATION: {'name': 'Groups Migration API', 'version': 'v1', 'v2discovery': False},
|
||||
GROUPSMIGRATION: {'name': 'Groups Migration API', 'version': 'v1', 'v2discovery': True},
|
||||
GROUPSSETTINGS: {'name': 'Groups Settings API', 'version': 'v1', 'v2discovery': True},
|
||||
IAM: {'name': 'Identity and Access Management API', 'version': 'v1', 'v2discovery': True},
|
||||
IAM_CREDENTIALS: {'name': 'Identity and Access Management Credentials API', 'version': 'v1', 'v2discovery': True},
|
||||
|
||||
@@ -7,7 +7,7 @@ google-auth-httplib2>=0.2.0
|
||||
google-auth-oauthlib>=1.2.2
|
||||
google-auth>=2.39.0
|
||||
httplib2>=0.22.0
|
||||
lxml
|
||||
lxml>=5.4.0
|
||||
passlib>=1.7.4
|
||||
pathvalidate>=3.2.3
|
||||
pyscard==2.2.1
|
||||
|
||||
@@ -17,11 +17,13 @@ classifiers =
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
Programming Language :: Python :: 3.13
|
||||
License :: OSI Approved :: Apache License
|
||||
|
||||
[options]
|
||||
packages = find:
|
||||
python_requires = >= 3.8
|
||||
python_requires = >= 3.9
|
||||
# The following files should be edited to match: pyproject.toml, requirements.txt
|
||||
install_requires =
|
||||
chardet >= 5.2.0
|
||||
cryptography >= 44.0.2
|
||||
@@ -32,7 +34,7 @@ install_requires =
|
||||
google-auth-oauthlib >= 1.2.2
|
||||
google-auth >= 2.39.0
|
||||
httplib2 >= 0.22.0
|
||||
lxml
|
||||
lxml >= 5.4.0
|
||||
passlib >= 1.7.4
|
||||
pathvalidate >= 3.2.3
|
||||
pyscard == 2.2.1
|
||||
|
||||
@@ -10,6 +10,14 @@ 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.06.11
|
||||
|
||||
Improved `gam checkconn`.
|
||||
|
||||
Updated `gam print group-members` and `gam print cigroup-members` to recognize members
|
||||
that are groups representing chat spaces. For now, these groups are not expanded when
|
||||
`recursive` is specified.
|
||||
|
||||
### 7.06.10
|
||||
|
||||
Added the following license SKU.
|
||||
|
||||
@@ -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.06.10 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.11 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4.1 x86_64
|
||||
@@ -989,7 +989,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
|
||||
GAM 7.06.10 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM 7.06.11 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.3 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -42,12 +42,12 @@ Google requires that you have a Chat Bot configured in order to use the Chat API
|
||||
|
||||
## Set up a Chat Bot
|
||||
|
||||
* Run the command `gam setup chat`; it will point you to a URL to configure your Chat Bot; this is required to use the Chat API.
|
||||
* Run the command `gam setup chat`; it will point you to a URL to configure your Chat Bot.
|
||||
* Enter an App name and Description of your choosing.
|
||||
* For the Avatar URL you can use `https://dummyimage.com/384x256/4d4d4d/0011ff.png&text=+GAM` or a public URL to an image of your own choosing.
|
||||
* In Functionality, uncheck both "Receive 1:1 messages" and "Join spaces and group conversations"
|
||||
* In Connection settings, choose "Cloud Pub/Sub" and enter "no-topic" for the topic name. GAM doesn't yet listen to pub/sub so this option is not used.
|
||||
* In Visibility, uncheck "Make this Chat app available to specific people and groups in Domain Workspace".
|
||||
* In Connection settings, choose "Cloud Pub/Sub" and enter `projects/<ProjectID>/topics/no-topic` for the topic name. Replace `<ProjectID>` with your GAM project ID. GAM doesn't yet listen to pub/sub so this option is not used.
|
||||
* In Visibility, uncheck "Make this Chat app available to specific people and groups in Domain Workspace".
|
||||
* Click Save.
|
||||
|
||||
## API documentation
|
||||
|
||||
@@ -4,7 +4,7 @@ k
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAM 7.06.10 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.11 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4.1 x86_64
|
||||
@@ -16,7 +16,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.06.10 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.11 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4.1 x86_64
|
||||
@@ -28,7 +28,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.06.10 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.11 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4.1 x86_64
|
||||
@@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 7.06.10
|
||||
Latest: 7.06.11
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -73,7 +73,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
7.06.10
|
||||
7.06.11
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -83,7 +83,7 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 7.06.10 - https://github.com/GAM-team/GAM
|
||||
GAM 7.06.11 - https://github.com/GAM-team/GAM
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4.1 x86_64
|
||||
|
||||
Reference in New Issue
Block a user