How to enable Syslog-ng authentication with MongoDB
Hi, I would like to harden the security by enabling authentication between syslog-ng and MongoDB. I'm using syslog-ng v3.38 and MongoDB v6.0.8 At the destination I tried the below two methods but none of themt worked, am I doing something wrong? Or the authentication is not supported? *---> First method:* destination d_mongodb_01 { mongodb( uri("mongodb://SampleUser:SamplePass@172.16.17.16:27017/syslog-ng_01") collection("logs") value-pairs( pair("datetime" "${S_ISODATE}") pair("privateip" "${privateip}") pair("portstatus" "${PORTSTATUS}") pair("host" "${HOST}")) ); }; *---> Second method:* destination d_mongodb_01 { mongodb( uri("mongodb://172.16.17.16:27017/syslog-ng_01") username("SampleUser") password("SamplePass") collection("logs") value-pairs( pair("datetime" "${S_ISODATE}") pair("privateip" "${privateip}") pair("portstatus" "${PORTSTATUS}") pair("host" "${HOST}")) ); }; Appreciate your help Best regards
Any solution for this?
Hi, Did you get any error messages? the mongodb destination driver does not have dedicated username/password options, it basically relies on the mongoc library to perform authentication, which takes username/password information from the URI, just as you used it in the first example. I was reading this page, so all it should http://mongoc.org/libmongoc/current/authentication.html On Sun, Aug 20, 2023 at 2:38 PM Ibrahim Al Mahfooz < ibrahim.nezar@sevennet.net> wrote:
Any solution for this?
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-- Bazsi
participants (2)
-
Balazs Scheidler
-
Ibrahim Al Mahfooz