From 6186bb874c96c8371966ef7f9cf0ef095d0a5017 Mon Sep 17 00:00:00 2001 From: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue, 19 Apr 2022 11:55:57 +0200 Subject: [PATCH] Updated clouditor host & port config --- .env | 1 + forward_evidence/clouditor_authentication.py | 4 ++-- kubernetes/wazuh-vat-evidence-collector-configmap.yaml | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 6a2efd0..5a34a18 100644 --- a/.env +++ b/.env @@ -16,6 +16,7 @@ redis_queue=low clouditor_host=192.168.33.14 clouditor_port=9090 +clouditor_oauth2_host=192.168.33.14 clouditor_oauth2_port=8080 clouditor_client_id=clouditor clouditor_client_secret=clouditor diff --git a/forward_evidence/clouditor_authentication.py b/forward_evidence/clouditor_authentication.py index 31abd14..4b832f7 100644 --- a/forward_evidence/clouditor_authentication.py +++ b/forward_evidence/clouditor_authentication.py @@ -4,7 +4,7 @@ import requests import urllib3 from datetime import datetime, timedelta -CLOUDITOR_HOST = os.environ.get("clouditor_host") +CLOUDITOR_OAUTH2_HOST = os.environ.get("clouditor_oauth2_host") CLOUDITOR_OAUTH2_PORT = int(os.environ.get("clouditor_oauth2_port")) CLIENT_ID = os.environ.get("clouditor_client_id") CLIENT_SECRET = os.environ.get("clouditor_client_secret") @@ -17,7 +17,7 @@ class ClouditorAuthentication(object): self.__access_token = None self.__token_expiration_time = None - self.__token_url = 'http://{}:{}/v1/auth/token'.format(CLOUDITOR_HOST, CLOUDITOR_OAUTH2_PORT) + self.__token_url = 'http://{}:{}/v1/auth/token'.format(CLOUDITOR_OAUTH2_HOST, CLOUDITOR_OAUTH2_PORT) self.__data = {'grant_type': 'client_credentials'} diff --git a/kubernetes/wazuh-vat-evidence-collector-configmap.yaml b/kubernetes/wazuh-vat-evidence-collector-configmap.yaml index f8f4981..3e7cb43 100644 --- a/kubernetes/wazuh-vat-evidence-collector-configmap.yaml +++ b/kubernetes/wazuh-vat-evidence-collector-configmap.yaml @@ -19,9 +19,10 @@ data: redis_port: '6379' redis_queue: 'low' - clouditor_host: 'security-assessment-svc' - clouditor_port: '9090' - clouditor_oauth2_port: '8080' + clouditor_host: 'security-assessment-grpc-svc' + clouditor_port: '9092' + clouditor_oauth2_host: 'security-assessment-svc' + clouditor_oauth2_port: '8082' wazuh_check_interval: '3600' wazuh_rule_level: '10' -- GitLab