diff --git a/AADInternals_python b/AADInternals_python index 894bc92..e28944d 160000 --- a/AADInternals_python +++ b/AADInternals_python @@ -1 +1 @@ -Subproject commit 894bc927cbf7686d6051c3328288c1e5bad8f240 +Subproject commit e28944d12c41bbb1a8aad6495bd43b9d6c914579 diff --git a/CHANGELOG.md b/CHANGELOG.md index efae46a..8b352fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [2024-11-09] +- Add params verify, Useful when you have a firewall that performs SSL inspection, you can mention the firewall certificate in configuration file. + ## [2024-10-31] - Remove password and mail for login azure, switch to lib msal - Replace DIY cache, by official cache in msal diff --git a/libsync.py b/libsync.py index 01844e9..b8b456b 100644 --- a/libsync.py +++ b/libsync.py @@ -65,6 +65,7 @@ def __init__(self): self.az = None self.dict_az_user={} self.dict_az_group={} + self.verify=True def connect(self): if not self.az: @@ -72,7 +73,8 @@ def connect(self): use_cache=self.use_cache, save_to_cache=self.save_to_cache, tenant_id=self.tenant_id, - cache_file=self.cache_file) + cache_file=self.cache_file, + verify=self.verify) self.tenant_id = self.az.tenant_id self.az.get_token(scopes=["https://graph.windows.net/.default"]) diff --git a/run_sync.py b/run_sync.py index e7bc23d..3bbf279 100644 --- a/run_sync.py +++ b/run_sync.py @@ -102,6 +102,16 @@ def run_sync(force=False,from_db=False): else: azure.proxiesconf = {} + if config.has_option('common', 'verify'): + if config.get('common', 'verify').lower() in ('true', '1'): + azure.verify = True + elif config.get('common', 'verify').lower() in ('false', '0'): + azure.verify = False + else: + azure.verify = config.get('common', 'verify') + else: + azure.verify = True + with open(os.path.join(azureconf.rsplit(os.sep,1)[0] ,'mapping.json'),'r') as f: mapping = json.loads(f.read())