Skip to content

Commit

Permalink
Changes to bring analytics authenticated access in sync with config
Browse files Browse the repository at this point in the history
1. Rename aaa_mode value cloud-admin-only to cloud-admin
2. CLOUD_ADMIN_ROLE defaults to admin instead of cloud-admin

Change-Id: Id7d5af81b136a5072c8f7e1e933dcd51521b0709
Partial-Bug: #1607563
  • Loading branch information
Megh Bhatt committed Jul 29, 2016
1 parent 25b0e18 commit 42db6e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/opserver/opserver.py
Expand Up @@ -47,8 +47,8 @@
ModuleCategoryMap, Module2NodeType, NodeTypeNames, ModuleIds,\
INSTANCE_ID_DEFAULT, COLLECTOR_DISCOVERY_SERVICE_NAME,\
ANALYTICS_API_SERVER_DISCOVERY_SERVICE_NAME, ALARM_GENERATOR_SERVICE_NAME, \
OpServerAdminPort, CLOUD_ADMIN_ROLE, AnalyticsAPIAAAModes, \
AAA_MODE_CLOUD_ADMIN_ONLY, AAA_MODE_NO_AUTH
OpServerAdminPort, CLOUD_ADMIN_ROLE, APIAAAModes, \
AAA_MODE_CLOUD_ADMIN, AAA_MODE_NO_AUTH
from sandesh.viz.constants import _TABLES, _OBJECT_TABLES,\
_OBJECT_TABLE_SCHEMA, _OBJECT_TABLE_COLUMN_VALUES, \
_STAT_TABLES, STAT_OBJECTID_FIELD, STAT_VT_PREFIX, \
Expand Down Expand Up @@ -778,7 +778,7 @@ def _parse_args(self, args_str=' '.join(sys.argv[1:])):
'partitions' : 15,
'sandesh_send_rate_limit': SandeshSystem. \
get_sandesh_send_rate_limit(),
'aaa_mode' : AAA_MODE_CLOUD_ADMIN_ONLY,
'aaa_mode' : AAA_MODE_CLOUD_ADMIN,
'api_server' : '127.0.0.1:8082',
'admin_port' : OpServerAdminPort,
'cloud_admin_role' : CLOUD_ADMIN_ROLE,
Expand Down Expand Up @@ -907,7 +907,7 @@ def _parse_args(self, args_str=' '.join(sys.argv[1:])):
help="Sandesh send rate limit in messages/sec")
parser.add_argument("--cloud_admin_role",
help="Name of cloud-admin role")
parser.add_argument("--aaa_mode", choices=AnalyticsAPIAAAModes,
parser.add_argument("--aaa_mode", choices=APIAAAModes,
help="AAA mode")
parser.add_argument("--auth_host",
help="IP address of keystone server")
Expand Down
6 changes: 4 additions & 2 deletions src/sandesh/common/vns.sandesh
Expand Up @@ -507,12 +507,14 @@ const list<string> ThreadPoolNames = [
COMPACTIONEXECUTOR,
]

const string CLOUD_ADMIN_ROLE = "cloud-admin"
const string CLOUD_ADMIN_ROLE = "admin"

const string AAA_MODE_NO_AUTH = "no-auth"
const string AAA_MODE_CLOUD_ADMIN = "cloud-admin"
const string AAA_MODE_CLOUD_ADMIN_ONLY = "cloud-admin-only"

const list <string> AnalyticsAPIAAAModes = [
const list <string> APIAAAModes = [
AAA_MODE_NO_AUTH,
AAA_MODE_CLOUD_ADMIN,
AAA_MODE_CLOUD_ADMIN_ONLY,
]

0 comments on commit 42db6e3

Please sign in to comment.