Skip to content

Commit

Permalink
Merge branch 'db-ssl-verify' of 'https://github.com/jjmerchante/grimo…
Browse files Browse the repository at this point in the history
…irelab-elk'

Merges #1101
Closes #1101
  • Loading branch information
sduenas authored Feb 10, 2023
2 parents c4d2c3b + 82dd301 commit 17bea47
Show file tree
Hide file tree
Showing 24 changed files with 61 additions and 50 deletions.
5 changes: 3 additions & 2 deletions grimoire_elk/elk.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def enrich_backend(url, clean, backend_name, backend_params, cfg_section_name,
github_token=None, studies=False, only_studies=False,
url_enrich=None, events_enrich=False,
db_user=None, db_password=None, db_host=None,
db_port=None, db_path=None, db_ssl=False,
db_port=None, db_path=None, db_ssl=False, db_verify_ssl=True,
do_refresh_projects=False, do_refresh_identities=False,
author_id=None, author_uuid=None, filter_raw=None,
jenkins_rename_file=None,
Expand Down Expand Up @@ -538,7 +538,8 @@ def enrich_backend(url, clean, backend_name, backend_params, cfg_section_name,
db_host=db_host,
db_port=db_port,
db_path=db_path,
db_ssl=db_ssl)
db_ssl=db_ssl,
db_verify_ssl=db_verify_ssl)
enrich_backend.set_params(backend_params)
# store the cfg section name in the enrich backend to recover the corresponding project name in projects.json
enrich_backend.set_cfg_section_name(cfg_section_name)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/cocom.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ class CocomEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_cocom_analysis)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/colic.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ class ColicEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_colic_analysis)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/discourse.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ class DiscourseEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)
self.categories = {} # Map from category_id to category_name
self.categories_tree = {} # Categories with subcategories

Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/dockerdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class Dockerdeps(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []

Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/dockersmells.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class Dockersmells(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []

Expand Down
3 changes: 2 additions & 1 deletion grimoire_elk/enriched/enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class Enrich(ElasticItems):

def __init__(self, db_sortinghat=None, json_projects_map=None, db_user='',
db_password='', db_host='', insecure=True, db_port=None, db_path=None,
db_ssl=False):
db_ssl=False, db_verify_ssl=True):

perceval_backend = None
super().__init__(perceval_backend, insecure=insecure)
Expand All @@ -131,6 +131,7 @@ def __init__(self, db_sortinghat=None, json_projects_map=None, db_user='',
if not Enrich.sh_db:
client = SortingHatClient(host=db_host, port=db_port,
path=db_path, ssl=db_ssl,
verify_ssl=db_verify_ssl,
user=db_user, password=db_password)
client.connect()
client.gqlc.logger.setLevel(logging.CRITICAL)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/gerrit.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class GerritEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_demography)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ class GitEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False, pair_programming=False):
db_port=None, db_ssl=False, db_verify_ssl=True, pair_programming=False):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_demography)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ class GitHubEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_onion)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/github2.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ class GitHubEnrich2(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_geolocation)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/githubql.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ class GitHubQLEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = [self.enrich_duration_analysis, self.enrich_reference_analysis]

Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ class GitLabEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.users = {} # cache users
self.studies = []
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/gitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class GitterEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

def get_field_author(self):
return "fromUser"
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ class JenkinsEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False, node_regex=None):
db_port=None, db_ssl=False, db_verify_ssl=True, node_regex=None):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)
self.nodes_rename_file = None
self.nodes_rename = {}
self.node_regex = node_regex
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/launchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ class LaunchpadEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

def get_field_author(self):
return "owner_data"
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/mattermost.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ class MattermostEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_demography)
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/mbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ class MBoxEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = [self.kafka_kip]

Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/pagure.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class PagureEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

def set_elastic(self, elastic):
self.elastic = elastic
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/phabricator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class PhabricatorEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.phab_ids_names = {} # To convert from phab ids to phab names

Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/remo.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ class ReMoEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)
self.author = "user" # changes if we are generating events

def get_field_author(self):
Expand Down
4 changes: 2 additions & 2 deletions grimoire_elk/enriched/weblate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ class WeblateEnrich(Enrich):

def __init__(self, db_sortinghat=None, json_projects_map=None,
db_user='', db_password='', db_host='', db_path=None,
db_port=None, db_ssl=False):
db_port=None, db_ssl=False, db_verify_ssl=True):
super().__init__(db_sortinghat=db_sortinghat, json_projects_map=json_projects_map,
db_user=db_user, db_password=db_password, db_host=db_host,
db_port=db_port, db_path=db_path, db_ssl=db_ssl)
db_port=db_port, db_path=db_path, db_ssl=db_ssl, db_verify_ssl=db_verify_ssl)

self.studies = []
self.studies.append(self.enrich_demography)
Expand Down
Loading

0 comments on commit 17bea47

Please sign in to comment.