Skip to content

Commit

Permalink
Merge aebb37a into 54c2fb6
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmerchante committed Feb 9, 2023
2 parents 54c2fb6 + aebb37a commit 24320ac
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions releases/unreleased/sortinghat-option-to-verify-ssl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: SortingHat option to verify SSL
category: added
author: Jose Javier Merchante <jjmerchante@bitergia.com>
issue: null
notes: |
Include `verify_ssl` option to SortingHat configuration to verify
the connection with the server. By default it is `True`.
6 changes: 6 additions & 0 deletions sirmordred/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,12 @@ def general_params(cls):
"default": False,
"type": bool,
"description": "GraphQL server use SSL/TSL connection"
},
"verify_ssl": {
"optional": True,
"default": True,
"type": bool,
"description": "Verify SSL connection to the server"
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion sirmordred/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ def __init__(self, config):
self.db_path = sortinghat.get('path', None) if sortinghat else None
self.db_port = sortinghat.get('port', None) if sortinghat else None
self.db_ssl = sortinghat.get('ssl', False) if sortinghat else False
self.db_verify_ssl = sortinghat.get('verify_ssl', True) if sortinghat else True
self.db_unaffiliate_group = sortinghat['unaffiliated_group'] if sortinghat else None
if sortinghat:
self.client = SortingHatClient(host=self.db_host, port=self.db_port,
path=self.db_path, ssl=self.db_ssl,
user=self.db_user, password=self.db_password)
user=self.db_user, password=self.db_password,
verify_ssl=self.db_verify_ssl)
self.client.connect()
else:
self.client = None
Expand Down
1 change: 1 addition & 0 deletions sirmordred/task_enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def __enrich_items(self):
self.db_port,
self.db_path,
self.db_ssl,
self.db_verify_ssl,
None, # args.refresh_projects,
None, # args.refresh_identities,
author_id=None,
Expand Down

0 comments on commit 24320ac

Please sign in to comment.