Add authentication mechanism to redis-server

Bug #1392113 reported by Raj Reddy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Arvind

Bug Description

need to add user/password authentication for access to redis-server

Tags: analytics
Raj Reddy (rajreddy)
affects: opencontrail → juniperopenstack
Changed in juniperopenstack:
assignee: nobody → Arvind (arvindv)
Raj Reddy (rajreddy)
Changed in juniperopenstack:
importance: Undecided → High
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/6410
Committed: http://github.org/Juniper/contrail-provisioning/commit/0e0d3d5d573d1f8e0eba1e4841b40cd6fb93bdb1
Submitter: Zuul
Branch: master

commit 0e0d3d5d573d1f8e0eba1e4841b40cd6fb93bdb1
Author: arvindvis <email address hidden>
Date: Tue Jan 20 14:05:26 2015 -0800

This commit brings in provisioning changes that will be needed to
support redis authentication. The template conf files are changed
to set the password if we are providing one in testbed.py
The provisioning changes take care of only the changes needed for
analytics daemon and starting redis. Webui changes are tracked
separately
Partial-Bug: 1392113

Change-Id: Ie3d1027509dccc198d5e61c4a092dd59c275a395

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/6411
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/9e0df178298317ea8a6ecdb634c53c53c5cfe453
Submitter: Zuul
Branch: master

commit 9e0df178298317ea8a6ecdb634c53c53c5cfe453
Author: arvindvis <email address hidden>
Date: Tue Jan 20 14:14:47 2015 -0800

This commit adds changes needed for redis authentication. The pass
word field is specified in testbed.py file. In fab we update the
redis conf file if we have specified the password and in setup_
collector call we pass redis_password as an argumenta
The changes here are only for configuring analytics daemon and redis
Webui changes are to be taken care of separately
Partial-Bug: 1392113

Change-Id: I5db2d5b614e06c205293657f54906d767a04e0b8

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/6596
Committed: http://github.org/Juniper/contrail-controller/commit/181a51dc4c368a7da73038d34361c1c9b570a6b5
Submitter: Zuul
Branch: master

commit 181a51dc4c368a7da73038d34361c1c9b570a6b5
Author: arvindvis <email address hidden>
Date: Sun Jan 25 17:29:05 2015 -0800

his fix adds authentication support to REDIS. Analytics, QE
and contrail-api are affected by this change. Here is a
summary of the changes in the individual files in different
modules: Analytics: src/analytics/OpServerProxy.cc:

Change ToOpsConnUp to call Authenticate function before
calling ToOpsConnUpPostProcess.
Add callback to handle reply for authentication command
for both channels.
If authentication succeeds make a call to
ToOpsConnUpPostProcess.
Change some of the API's to include password as argument

src/analytics/redis_processor_vizd.cc:
src/analytics/main.cc:
src/analytics/viz_collector.cc:
change the api to pass the redis password as well

src/analytics/test/utils/mockredis/mockredis/mockredis.py:
Before starting redis instance modify redis.conf to include
password, if specified
nclude password argument to the start and stop api's

src/analytics/redis_connection.cc:
Removed a condition which required async_connection_context
should not have any callback set.This was causing a conflict.

QueryEngine:

src/query_engine/QEOpServerProxy.cc:

Places where redisSync commands where getting called, we first
make a call to AUTH command
For commands invoked in Async context, introduce 2 new API's
viz., ConnAuth,ConnUpPrePostProcess, AuthCallbackProcess
are called to authenticate the context first
Make changes to existing API like QEOpServerImpl,QEOpServerProxy
to include password argument

src/query_engine/qed.cc:
src/query_engine/options.cc:
src/query_engine/query.cc:
src/query_engine/rac_alloc.cc:
Make changes in existing API to take redis_passwd as
additional argument
analytics-api:

src/opserver/opserver.py:
redis_query_start, redis_query_status, redis_query_chunk_iter,
redis_query_chunk, redis_query_result, redis_query_result_dict,
OpStateServer all make calls to StrictRedis, made change to
include password to the API

systemless test:
src/opserver/test/utils/analytics_fixture.py:
change Redis,QueryEngine and Collector class to invoke the
daemons with password as argument. change the Fixture API
to take password.
src/opserver/test/analytics_redistest.py:
New test file which calls the testcases with password
contrail.
Keyword names have been changed from passwd to password
Other changes addressed in the comment are taken care as well

In the case of password conflicts we are going to crash the daemonsa

Change has been made in analytics_redis_test.py to abstract common
code
Closes Bug:#1392113

Change-Id: I707b9a6df9b770ca0f1a396335f190aa780a937e

Arvind (arvindv)
Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/6673
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/22d5bdb19739a5ed00b1667298f6dcdd40e471f7
Submitter: Zuul
Branch: master

commit 22d5bdb19739a5ed00b1667298f6dcdd40e471f7
Author: Biswajit Mandal <email address hidden>
Date: Wed Jan 28 11:08:10 2015 +0530

Adding fabric utils changes for web-ui to have authentication support for
redis-server.

Partial-Bug: #1392113
Change-Id: I4e97e5d84d348643202109d3f7adde88eecce256

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/6674
Committed: http://github.org/Juniper/contrail-provisioning/commit/7c1ec1ef66882e70a165997c14f8472fa17ad759
Submitter: Zuul
Branch: master

commit 7c1ec1ef66882e70a165997c14f8472fa17ad759
Author: Biswajit Mandal <email address hidden>
Date: Wed Jan 28 11:22:35 2015 +0530

Adding contrail provisioing changes for web-ui to have authentication support
for redis-server
Partial-Bug: #1392113

Change-Id: I19941b36df8a5757fd64ebe15f4897a487132964

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/8605
Submitter: Biswajit Mandal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8605
Committed: http://github.org/Juniper/contrail-web-core/commit/18df55da7b4567b1b528a16967693e7e351a745a
Submitter: Zuul
Branch: master

commit 18df55da7b4567b1b528a16967693e7e351a745a
Author: Biswajit Mandal <email address hidden>
Date: Wed Mar 25 10:01:28 2015 +0530

Updating README.md file with redis authentication information.
Related-Bug: #1392113

Change-Id: I1086d931237fb1e50b1486708cfc1a6cea68e543

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.