diff --git a/warden3/contrib/connectors/hp-kippo/README b/warden3/contrib/connectors/hp-kippo/README index 57ed8604c7d0b6e92a91a657264c525ca7832a09..80edc22ad4156ed47de0978b4d61ebb9c5ff0a14 100644 --- a/warden3/contrib/connectors/hp-kippo/README +++ b/warden3/contrib/connectors/hp-kippo/README @@ -39,6 +39,9 @@ D. Configuration warden_client-kippo.cfg warden - path to warden-client config, e.g. 'warden/warden_client.cfg' name - sensor's source id used as a source of events, e.g. 'cz.cesnet.server.kippo' + secret - secret to authenticate client + - if 'secret' is non empty, is used instead of value in client's configuration + - useful while using more sensors with single client's configuration anonymised - no | yes | omit - no (default value) diff --git a/warden3/contrib/connectors/hp-kippo/warden3-kippo-sender.py b/warden3/contrib/connectors/hp-kippo/warden3-kippo-sender.py index 69eb7f4bcf6b6d22605e5377908d3f2f6bf9c477..b2fe61fa29e8009f99a7dcc126a054100203fe4d 100644 --- a/warden3/contrib/connectors/hp-kippo/warden3-kippo-sender.py +++ b/warden3/contrib/connectors/hp-kippo/warden3-kippo-sender.py @@ -22,6 +22,7 @@ DEFAULT_NAME = 'org.example.warden.test' DEFAULT_AWIN = 5 DEFAULT_ANONYMISED = 'no' DEFAULT_TARGET_NET = '0.0.0.0/0' +DEFAULT_SECRET = '' def gen_event_idea(client_name, detect_time, win_start_time, win_end_time, conn_count, src_ip, dst_ip, aggr_win, anonymised, target_net): @@ -72,6 +73,10 @@ def main(): awin = aconfig.get('awin', DEFAULT_AWIN) * 60 wconfig['name'] = aname + asecret = aconfig.get('secret', DEFAULT_SECRET) + if asecret: + wconfig['secret'] = asecret + wclient = Client(**wconfig) aanonymised = aconfig.get('anonymised', DEFAULT_ANONYMISED) diff --git a/warden3/contrib/connectors/hp-kippo/warden_client-kippo.cfg b/warden3/contrib/connectors/hp-kippo/warden_client-kippo.cfg index 9a274a770abefb7ca774c0c03ed05ecc6b219c46..3faadf50a5306226bdbeaa2951f4e1cd45c06301 100644 --- a/warden3/contrib/connectors/hp-kippo/warden_client-kippo.cfg +++ b/warden3/contrib/connectors/hp-kippo/warden_client-kippo.cfg @@ -1,6 +1,7 @@ { "warden": "warden_client.cfg", "name": "cz.cesnet.server.kippo", + "secret": "", "anonymised": "no", "target_net": "195.113.0.0/16",