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
Reviewed: https:/ /review. opencontrail. org/6596 github. org/Juniper/ contrail- controller/ commit/ 181a51dc4c368a7 da73038d34361c1 c9b570a6b5
Committed: http://
Submitter: Zuul
Branch: master
commit 181a51dc4c368a7 da73038d34361c1 c9b570a6b5
Author: arvindvis <email address hidden>
Date: Sun Jan 25 17:29:05 2015 -0800
his fix adds authentication support to REDIS. Analytics, QE OpServerProxy. cc:
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/
Change ToOpsConnUp to call Authenticate function before Process. Process.
calling ToOpsConnUpPost
Add callback to handle reply for authentication command
for both channels.
If authentication succeeds make a call to
ToOpsConnUpPost
Change some of the API's to include password as argument
src/analytics/ redis_processor _vizd.cc: main.cc: viz_collector. cc:
src/analytics/
src/analytics/
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_connectio n.cc: n_context
Removed a condition which required async_connectio
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 ConnUpPrePostPr ocess, AuthCallbackProcess QEOpServerProxy
make a call to AUTH command
For commands invoked in Async context, introduce 2 new API's
viz., ConnAuth,
are called to authenticate the context first
Make changes to existing API like QEOpServerImpl,
to include password argument
src/query_ engine/ qed.cc: engine/ options. cc: engine/ query.cc: engine/ rac_alloc. cc:
src/query_
src/query_
src/query_
Make changes in existing API to take redis_passwd as
additional argument
analytics-api:
src/opserver/ opserver. py: chunk_iter, result_ dict,
redis_query_start, redis_query_status, redis_query_
redis_query_chunk, redis_query_result, redis_query_
OpStateServer all make calls to StrictRedis, made change to
include password to the API
systemless test: test/utils/ analytics_ fixture. py: test/analytics_ redistest. py:
src/opserver/
change Redis,QueryEngine and Collector class to invoke the
daemons with password as argument. change the Fixture API
to take password.
src/opserver/
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: I707b9a6df9b770 ca0f1a396335f19 0aa780a937e