OC4.0: Remove hardcoded admin_token
- admin_token set to an empty string in
contrail-webui-userauth.js as it is referred
to in code;
- removed reference to admin_token in
contrail-svc-monitor.conf
PROD-18320
PROD-20260
Change-Id: Id3c85a692cd1c5b4cada3887f91cb2604d62df9c
diff --git a/opencontrail/files/4.0/contrail-svc-monitor.conf b/opencontrail/files/4.0/contrail-svc-monitor.conf
index 8ebc4ee..d1e2dcc 100644
--- a/opencontrail/files/4.0/contrail-svc-monitor.conf
+++ b/opencontrail/files/4.0/contrail-svc-monitor.conf
@@ -44,7 +44,6 @@
#admin_user=
#admin_password=
#admin_tenant_name=
-#admin_token=
[SECURITY]
use_certs=False
diff --git a/opencontrail/files/4.0/contrail-webui-userauth.js b/opencontrail/files/4.0/contrail-webui-userauth.js
index 29424ea..1490f8c 100644
--- a/opencontrail/files/4.0/contrail-webui-userauth.js
+++ b/opencontrail/files/4.0/contrail-webui-userauth.js
@@ -6,18 +6,17 @@
/****************************************************************************
* Specify the authentication parameters for admin user
****************************************************************************/
- {%- if web.identity.engine == "keystone" %}
var auth = {};
+auth.admin_token = '';
+{%- if web.identity.engine == "keystone" %}
auth.admin_user = '{{ web.identity.user }}';
auth.admin_password = '{{ web.identity.password }}';
-auth.admin_token = '{{ web.identity.token }}';
auth.admin_tenant_name = '{{ web.identity.tenant }}';
+{%- else %}
+/* NOTE(ivasilevskaya) should be configured at the model level */
+auth.admin_user = 'admin';
+/* NOTE(ivasilevskaya) should be configured at the model level */
+auth.admin_password = 'contrail123';
+{%- endif %}
module.exports = auth;
-{%- else %}
-var auth = {};
-auth.admin_user = 'admin';
-auth.admin_password = 'contrail123';
-auth.admin_token = '';
-module.exports = auth;
-{%- endif %}
\ No newline at end of file