Implementing Redis authentication in GenieACS

Sergio sergio.fernandez at
Fri Aug 19 16:14:26 EDT 2016

Hello again!

I would like to implement Redis authentication as an additional option 
in config.json file.

This is what I've investigated so far:

I am assuming that we are using this *version of redis*:

Regarding the file */lib/* in 
, What would be the best thing to do regarding this new functionality? I 
think the best is to add a new option whose name would be /REDIS_PWD : 
{type: 'string', default : ''}/ so when you call it in other files, 
maybe you can have a function which "extracts its content, and if it's 
blank, don't make any auth". I don't know if this can be done

But maybe the best is to have two independent entries, like /REDIS_AUTH 
: {type: 'bool', default : false}/ and REDIS_PWD : /{type: 'string', 
default : ''}/

Regarding the file */lib/* in 
, then, supposing we choose the first option, in the line 98, we would 
rewrite it as the following:
/exports.redisClient = redisClient = 
redis.createClient(config.get('REDIS_PORT'), config.get('REDIS_HOST'), 
config.get('REDIS_PWD'))/ , isn't it? Or would it create problems if the 
password is not set?

Do you think that we need to change any more files?

If you say to me that it would be OK, then I could test it using a fork 
of the master branch, so then I could make a pull request. Do you have 
any compiler/bundler script that makes the test easier? What will I have 
to test/verify when everything is compiled?

Thank you for your kind help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Users mailing list