I don't remember the reason authentication was not approached at the time implementing the module, could be that it was not available in hiredis at that time.
Now I just googled quickly to see how can be done. Perhaps makes sense to add it inside the code, I guess it is not complex. For the moment I don't have any time to put a redis testbed up so it may take some time in my side, but someone else sends a patch meanwhile and it will be accepted. You can send a patch to documentation too, for what you want to make it more clear. Update the admin file in modules/ndb_redis/doc/. Cheers, Daniel On Fri, Jan 30, 2015 at 2:46 PM, Marc Soda <ms...@coredial.com> wrote: > Thanks for the insight. I ended up doing something like this: > > redis_cmd("localredis", "AUTH REDIS_PASS", "r"); > > if ($redis(r=>type) == REDIS_REPLY_ERROR) { > xlog("L_ERROR", "Redis authentication error"); > exit; > } > > I think the confusion came from the fact that you do not specify the > password in the modparam() connection string, as you do with other DB > modules. Maybe calling something like this out in the documentation would > help clear that up. > > On Thu, Jan 29, 2015 at 3:48 PM, Marc Soda <ms...@coredial.com> wrote: > >> Ah, so you should be able to do something like: >> >> redis_cmd("localredis", "AUTH $var(redis_password)"); >> >> Nice. I will try that and post my results. >> >> On Thu, Jan 29, 2015 at 1:28 PM, Daniel-Constantin Mierla < >> mico...@gmail.com> wrote: >> >>> Hello, >>> >>> it appears that hiredis library does the authentication after connecting >>> and can be done from config -- that's on a very quick search, not sure if >>> something has changed with the hiredis api meanwhile: >>> >>> - https://github.com/redis/hiredis/issues/56 >>> >>> Cheers, >>> Daniel >>> >>> >>> On 29/01/15 17:20, Marc Soda wrote: >>> >>> The only way it will work right now is to not use a password: >>> >>> modparam("ndb_redis", "server", >>> "name=localredis;addr=localhost;port=6379") >>> >>> I've been wanting to look at contributing support at that, but no time... >>> On Thu, Jan 29, 2015 at 10:16 AM, Yuriy Gorlichenko < >>> ovoshl...@gmail.com> wrote: >>> >>>> Hello. I try to use NDB_REDIS with remote REDIS DB and can not to >>>> connect because remote DB use password, but Kamailio module have no any >>>> variable or attr of modparam that implenets password for DB. >>>> >>>> How I can connect to my REDIS? >>>> >>>> _______________________________________________ >>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>>> sr-users@lists.sip-router.org >>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>> >>>> >>> >>> >>> _______________________________________________ >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing >>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>> >>> >>> -- >>> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - >>> http://www.linkedin.com/in/miconda >>> >>> >>> _______________________________________________ >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>> sr-users@lists.sip-router.org >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>> >>> >> > > -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/micond <http://www.linkedin.com/in/miconda>
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users