knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pzamp...@apache.org
Subject [3/3] knox git commit: KNOX-1203 - Shiro-based provider configurations must be produced with correct param order from Admin UI
Date Mon, 12 Mar 2018 01:01:39 GMT
KNOX-1203 - Shiro-based provider configurations must be produced with correct param order from
Admin UI


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/4c1cb80c
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/4c1cb80c
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/4c1cb80c

Branch: refs/heads/master
Commit: 4c1cb80cca7c26b11f32febd23ec887f13b7606d
Parents: 167053b
Author: Phil Zampino <pzampino@apache.org>
Authored: Sat Mar 10 11:35:20 2018 -0500
Committer: Phil Zampino <pzampino@apache.org>
Committed: Sat Mar 10 21:54:26 2018 -0500

----------------------------------------------------------------------
 .../acls-authzn-provider-config.ts              |  5 +-
 .../authentication-provider-config.ts           |  4 +-
 .../authorization-wizard.ts                     |  1 -
 .../display-binding-provider-config.ts          |  1 -
 .../src/app/provider-config-wizard/ha-wizard.ts |  4 +-
 .../identity-assertion-provider-config.ts       |  4 +-
 .../ldap-provider-config.ts                     | 82 +++++++++++++++-----
 .../ordered-param-container.ts                  | 27 +++++++
 .../pam-provider-config.ts                      | 42 ++++++++--
 .../provider-config-wizard.component.ts         | 38 ++++-----
 .../src/app/resource-detail/provider-config.ts  |  2 +-
 .../resource-detail.component.ts                |  9 +--
 .../applications/admin-ui/app/index.html        |  2 +-
 .../app/inline.01f49f7d13670ad68dea.bundle.js   |  1 -
 .../app/inline.823868e44971b225d6b4.bundle.js   |  1 +
 .../app/main.31f4c13b664f32c9ce4d.bundle.js     |  1 +
 .../app/main.db638922a84cdef35de7.bundle.js     |  1 -
 17 files changed, 162 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/acls-authzn-provider-config.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/acls-authzn-provider-config.ts
b/gateway-admin-ui/src/app/provider-config-wizard/acls-authzn-provider-config.ts
index fc5a2f5..76dcdff 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/acls-authzn-provider-config.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/acls-authzn-provider-config.ts
@@ -33,11 +33,10 @@ export class ACLsAuthznProviderConfig extends DisplayBindingProviderConfig
{
 
   constructor() {
     super();
-    console.debug('new ACLsAuthznProviderConfig()');
-    this.name    = 'AclsAuthz';
     this.role    = 'authorization';
+    this.name    = 'AclsAuthz';
     this.enabled = 'true';
-    this.params  = {};
+    this.params  = new Map<string, string>();
   }
 
   getDisplayPropertyNames(): string[] {

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/authentication-provider-config.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/authentication-provider-config.ts
b/gateway-admin-ui/src/app/provider-config-wizard/authentication-provider-config.ts
index 59923ff..931bc2f 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/authentication-provider-config.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/authentication-provider-config.ts
@@ -24,10 +24,10 @@ export abstract class AuthenticationProviderConfig extends DisplayBindingProvide
 
   constructor(name: string, role?: string) {
     super();
-    this.name = name;
     this.role = role ? role : AuthenticationProviderConfig.AUTHENTICATION_ROLE;
-    this.params = {};
+    this.name = name;
     this.enabled = 'true'; // enable by default
+    this.params = new Map<string, string>();
   }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/authorization-wizard.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/authorization-wizard.ts b/gateway-admin-ui/src/app/provider-config-wizard/authorization-wizard.ts
index bb690b9..814282c 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/authorization-wizard.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/authorization-wizard.ts
@@ -45,7 +45,6 @@ export class AuthorizationWizard extends CategoryWizard {
   onChange() {
     let configType = AuthorizationWizard.typeConfigMap.get(this.selectedType);
     if (configType) {
-      console.debug(configType.prototype.toString() + ' resolved for config type  ' + this.selectedType);
       this.providerConfig = Object.create(configType.prototype) as DisplayBindingProviderConfig;
       this.providerConfig.constructor.apply(this.providerConfig);
     } else {

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/display-binding-provider-config.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/display-binding-provider-config.ts
b/gateway-admin-ui/src/app/provider-config-wizard/display-binding-provider-config.ts
index 4cc4d6c..c39025f 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/display-binding-provider-config.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/display-binding-provider-config.ts
@@ -32,7 +32,6 @@ export abstract class DisplayBindingProviderConfig extends ProviderConfig
{
   }
 
   setParam(name: string, value: string) {
-    console.debug('ProviderConfig --> setParam(' + name + ', ' + value + ')');
     this.params[name] = value;
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/ha-wizard.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/ha-wizard.ts b/gateway-admin-ui/src/app/provider-config-wizard/ha-wizard.ts
index ee6b30e..df742bb 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/ha-wizard.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/ha-wizard.ts
@@ -36,10 +36,10 @@ export class HaWizard extends CategoryWizard {
 
   getProviderConfig(): ProviderConfig {
     this.providerConfig = new ProviderConfig();
-    this.providerConfig.name = 'HaProvider';
     this.providerConfig.role = 'ha';
+    this.providerConfig.name = 'HaProvider';
     this.providerConfig.enabled = 'true';
-    this.providerConfig.params = {};
+    this.providerConfig.params = new Map<string, string>();
     return this.providerConfig;
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/identity-assertion-provider-config.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/identity-assertion-provider-config.ts
b/gateway-admin-ui/src/app/provider-config-wizard/identity-assertion-provider-config.ts
index 32f9e92..2c6abfa 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/identity-assertion-provider-config.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/identity-assertion-provider-config.ts
@@ -23,10 +23,10 @@ export abstract class IdentityAssertionProviderConfig extends DisplayBindingProv
 
   constructor(name: string, role?: string) {
     super();
-    this.name = name;
     this.role = role ? role : IdentityAssertionProviderConfig.ID_ASSERTION_ROLE;
-    this.params = {};
+    this.name = name;
     this.enabled = 'true'; // enable by default
+    this.params  = new Map<string, string>();
   }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/ldap-provider-config.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/ldap-provider-config.ts b/gateway-admin-ui/src/app/provider-config-wizard/ldap-provider-config.ts
index 38e3b81..deb855a 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/ldap-provider-config.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/ldap-provider-config.ts
@@ -16,35 +16,64 @@
  */
 
 import {AuthenticationProviderConfig} from "./authentication-provider-config";
+import {OrderedParamContainer} from "./ordered-param-container";
 
-export class LDAPProviderConfig extends AuthenticationProviderConfig {
+export class LDAPProviderConfig extends AuthenticationProviderConfig implements OrderedParamContainer
{
 
-  static SESSION_TIMEOUT  = 'Session Timeout';
-  static DN_TEMPLATE      = 'User DN Template';
-  static URL              = 'URL';
-  static MECHANISM        = 'Mechanism';
+  static SESSION_TIMEOUT       = 'Session Timeout';
+  static DN_TEMPLATE           = 'User DN Template';
+  static URL                   = 'URL';
+  static MECHANISM             = 'Mechanism';
+  static REALM                 = 'Realm';
+  static CONTEXT_FACTORY       = 'LDAP Context Factory';
+  static REALM_CONTEXT_FACTORY = 'Realm Context Factory';
+  static AUTH_CHAIN            = 'Authentication Chain';
 
   private static displayPropertyNames = [ LDAPProviderConfig.SESSION_TIMEOUT,
-                                          LDAPProviderConfig.DN_TEMPLATE,
                                           LDAPProviderConfig.URL,
-                                          LDAPProviderConfig.MECHANISM
+                                          LDAPProviderConfig.DN_TEMPLATE,
+                                          LDAPProviderConfig.MECHANISM,
+                                          LDAPProviderConfig.AUTH_CHAIN
                                         ];
 
   private static displayPropertyNameBindings: Map<string, string> =
-                            new Map([
-                              [LDAPProviderConfig.SESSION_TIMEOUT, 'sessionTimeout'],
-                              [LDAPProviderConfig.DN_TEMPLATE, 'main.ldapRealm.userDnTemplate'],
-                              [LDAPProviderConfig.URL, 'main.ldapRealm.contextFactory.url'],
-                              [LDAPProviderConfig.MECHANISM, 'main.ldapRealm.contextFactory.authenticationMechanism']
-                            ]);
+            new Map([
+              [LDAPProviderConfig.SESSION_TIMEOUT,       'sessionTimeout'],
+              [LDAPProviderConfig.DN_TEMPLATE,           'main.ldapRealm.userDnTemplate'],
+              [LDAPProviderConfig.URL,                   'main.ldapRealm.contextFactory.url'],
+              [LDAPProviderConfig.MECHANISM,             'main.ldapRealm.contextFactory.authenticationMechanism'],
+              [LDAPProviderConfig.REALM,                 'main.ldapRealm'],
+              [LDAPProviderConfig.CONTEXT_FACTORY,       'main.ldapContextFactory'],
+              [LDAPProviderConfig.REALM_CONTEXT_FACTORY, 'main.ldapRealm.contextFactory'],
+              [LDAPProviderConfig.AUTH_CHAIN,            'urls./**']
+            ] as [string, string][]);
 
+  private static paramsOrder: string[] =
+            [ LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.SESSION_TIMEOUT),
+              LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.REALM),
+              LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.CONTEXT_FACTORY),
+              LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.REALM_CONTEXT_FACTORY),
+              LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.DN_TEMPLATE),
+              LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.URL),
+              // user search attr name,              // TODO: PJZ: Define Me
+              // authzn enabled,                     // TODO: PJZ: Define Me
+              // realm context fact system user,     // TODO: PJZ: Define Me
+              // realm context fact system user pwd, // TODO: PJZ: Define Me
+              LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.MECHANISM),
+              // user object class,                  // TODO: PJZ: Define Me
+              // realm search base,                  // TODO: PJZ: Define Me
+              // realm user search base              // TODO: PJZ: Define Me
+              LDAPProviderConfig.displayPropertyNameBindings.get(LDAPProviderConfig.AUTH_CHAIN)
+            ];
 
   constructor() {
     super('ShiroProvider');
-    this.setParam('main.ldapRealm', 'org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm');
-    this.setParam('main.ldapContextFactory', 'org.apache.hadoop.gateway.shirorealm.KnoxLdapContextFactory');
-    this.setParam('main.ldapRealm.contextFactory', '$ldapContextFactory');
-    this.setParam('urls./**', 'authcBasic');
+    this.setParam(this.getDisplayNamePropertyBinding(LDAPProviderConfig.REALM),
+                  'org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm');
+    this.setParam(this.getDisplayNamePropertyBinding(LDAPProviderConfig.CONTEXT_FACTORY),
+                  'org.apache.hadoop.gateway.shirorealm.KnoxLdapContextFactory');
+    this.setParam(this.getDisplayNamePropertyBinding(LDAPProviderConfig.REALM_CONTEXT_FACTORY),
'$ldapContextFactory');
+    this.setParam(this.getDisplayNamePropertyBinding(LDAPProviderConfig.AUTH_CHAIN), 'authcBasic');
   }
 
   getDisplayPropertyNames(): string[] {
@@ -55,5 +84,22 @@ export class LDAPProviderConfig extends AuthenticationProviderConfig {
     return LDAPProviderConfig.displayPropertyNameBindings.get(name);
   }
 
-  // TODO: PJZ: Shiro-based providers have param ordering requirements; need to accommodate
that
+
+  getOrderedParamNames(): string[] {
+    return LDAPProviderConfig.paramsOrder;
+  }
+
+  orderParams(params: Map<string, string>): Map<string, string> {
+    let result = new Map<string, string>();
+
+    for (let name of this.getOrderedParamNames()) {
+      let value = params[name];
+      if (value) {
+        result[name] = value;
+      }
+    }
+
+    return result;
+  }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/ordered-param-container.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/ordered-param-container.ts b/gateway-admin-ui/src/app/provider-config-wizard/ordered-param-container.ts
new file mode 100644
index 0000000..e6123f0
--- /dev/null
+++ b/gateway-admin-ui/src/app/provider-config-wizard/ordered-param-container.ts
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// ProviderConfig implementations, for which parameter order is important, should implement
this interface
+export interface OrderedParamContainer {
+
+  // Get the param names in the correct order
+  getOrderedParamNames(): string[];
+
+  // Ensure the specified set of params is ordered correctly
+  orderParams(params: Map<string, string>): Map<string, string>;
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/pam-provider-config.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/pam-provider-config.ts b/gateway-admin-ui/src/app/provider-config-wizard/pam-provider-config.ts
index f93c94e..55bc22c 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/pam-provider-config.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/pam-provider-config.ts
@@ -16,24 +16,38 @@
  */
 
 import {AuthenticationProviderConfig} from "./authentication-provider-config";
+import {OrderedParamContainer} from "./ordered-param-container";
 
-export class PAMProviderConfig extends AuthenticationProviderConfig {
+export class PAMProviderConfig extends AuthenticationProviderConfig implements OrderedParamContainer
{
 
   static SESSION_TIMEOUT  = 'Session Timeout';
+  static REALM            = 'Realm';
+  static SERVICE          = 'Service';
+  static AUTH_CHAIN       = 'Authentication Chain';
 
   private static displayPropertyNames = [ PAMProviderConfig.SESSION_TIMEOUT ];
 
   private static displayPropertyNameBindings: Map<string, string> =
                             new Map([
-                              [PAMProviderConfig.SESSION_TIMEOUT, 'sessionTimeout']
+                              [PAMProviderConfig.SESSION_TIMEOUT, 'sessionTimeout'],
+                              [PAMProviderConfig.REALM,           'main.pamRealm'],
+                              [PAMProviderConfig.SERVICE,         'main.pamRealm.service'],
+                              [PAMProviderConfig.AUTH_CHAIN,      'urls./**']
                             ]);
 
+  private static paramsOrder: string[] =
+                            [ PAMProviderConfig.displayPropertyNameBindings.get(PAMProviderConfig.SESSION_TIMEOUT),
+                              PAMProviderConfig.displayPropertyNameBindings.get(PAMProviderConfig.REALM),
+                              PAMProviderConfig.displayPropertyNameBindings.get(PAMProviderConfig.SERVICE),
+                              PAMProviderConfig.displayPropertyNameBindings.get(PAMProviderConfig.AUTH_CHAIN)
+                            ];
 
   constructor() {
     super('ShiroProvider');
-    this.setParam('main.pamRealm', 'org.apache.knox.gateway.shirorealm.KnoxPamRealm');
-    this.setParam('main.pamRealm.service', 'login');
-    this.setParam('urls./**', 'authcBasic');
+    this.setParam(this.getDisplayNamePropertyBinding(PAMProviderConfig.REALM),
+                  'org.apache.knox.gateway.shirorealm.KnoxPamRealm');
+    this.setParam(this.getDisplayNamePropertyBinding(PAMProviderConfig.SERVICE), 'login');
+    this.setParam(this.getDisplayNamePropertyBinding(PAMProviderConfig.AUTH_CHAIN), 'authcBasic');
   }
 
   getDisplayPropertyNames(): string[] {
@@ -44,5 +58,21 @@ export class PAMProviderConfig extends AuthenticationProviderConfig {
     return PAMProviderConfig.displayPropertyNameBindings.get(name);
   }
 
-  // TODO: PJZ: Shiro-based providers have param ordering requirements; need to accommodate
that
+  getOrderedParamNames(): string[] {
+    return PAMProviderConfig.paramsOrder;
+  }
+
+  orderParams(params: Map<string, string>): Map<string, string> {
+    let result = new Map<string, string>();
+
+    for (let name of this.getOrderedParamNames()) {
+      let value = params[name];
+      if (value) {
+        result[name] = value;
+      }
+    }
+
+    return result;
+  }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/provider-config-wizard/provider-config-wizard.component.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/provider-config-wizard.component.ts
b/gateway-admin-ui/src/app/provider-config-wizard/provider-config-wizard.component.ts
index 8cb4fb9..1453611 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/provider-config-wizard.component.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/provider-config-wizard.component.ts
@@ -27,6 +27,8 @@ import {IdentityAssertionWizard} from "./identity-assertion-wizard";
 import {HaWizard} from "./ha-wizard";
 import {Resource} from "../resource/resource";
 import {DisplayBindingProviderConfig} from "./display-binding-provider-config";
+import {OrderedParamContainer} from "./ordered-param-container";
+
 
 @Component({
   selector: 'app-provider-config-wizard',
@@ -87,26 +89,31 @@ export class ProviderConfigWizardComponent implements OnInit {
     this.selectedCategory = ProviderConfigWizardComponent.CATEGORY_AUTHENTICATION;
   }
 
+
+  // Type Guard for identifying OrderedParamContainer implementations
+  static isOrderedParamContainer = (x: any): x is OrderedParamContainer => x.orderParams;
+
   onFinishAdd() {
-    console.debug('Selected provider category: ' + this.selectedCategory);
+    console.debug('ProviderConfigWizard --> Selected provider category: ' + this.selectedCategory);
 
     let catWizard = this.getCategoryWizard(this.selectedCategory);
     let type = catWizard ? catWizard.getSelectedType() : 'undefined';
-    console.debug('Selected provider type: ' + type);
+    console.debug('ProviderConfigWizard --> Selected provider type: ' + type);
 
     if (catWizard) {
       let pc: ProviderConfig = catWizard.getProviderConfig();
       if (pc) {
         this.providers.push(pc);
-        console.debug('\tProvider Name: ' + pc.name);
-        console.debug('\tProvider Role: ' + pc.role);
-        console.debug('\tProvider Enabled: ' + pc.enabled);
+        console.debug('ProviderConfigWizard --> Provider: name=' + pc.name + ', role='
+ pc.role + ', enabled=' + pc.enabled);
         if (pc.params) {
+          // If the provider is managing its own param order, allow it to re-order the params
now
+          if (ProviderConfigWizardComponent.isOrderedParamContainer(pc)) {
+            pc.params = (pc as OrderedParamContainer).orderParams(pc.params);
+          }
+
           for (let name of Object.getOwnPropertyNames(pc.params)) {
-            console.debug('\t\tParam: ' + name + ' = ' + pc.params[name]);
+            console.debug('\tParam: ' + name + ' = ' + pc.params[name]);
           }
-        } else {
-          console.debug('\tNo Params');
         }
       }
     }
@@ -115,12 +122,6 @@ export class ProviderConfigWizardComponent implements OnInit {
   }
 
   onClose() {
-    console.debug('Provider Configuration: ' + this.name);
-
-    for (let pc of this.providers) {
-      console.debug('\tProvider: ' + pc.name + ' (' + pc.role + ')');
-    }
-
     // Identify the new resource
     let newResource = new Resource();
     newResource.name = this.name + '.json';
@@ -195,7 +196,7 @@ export class ProviderConfigWizardComponent implements OnInit {
     if (catWizard) {
       return catWizard.getTypes();
     } else {
-      console.debug('Unresolved category wizard for ' + (category ? category : this.selectedCategory));
+      console.debug('ProviderConfigWizard --> Unresolved category wizard for ' + (category
? category : this.selectedCategory));
     }
     return [];
   }
@@ -209,14 +210,13 @@ export class ProviderConfigWizardComponent implements OnInit {
           let dispPC = pc as DisplayBindingProviderConfig;
           return dispPC.getDisplayPropertyNames();
         } else {
-          console.debug('Got Vanilla ProviderConfig');
           return [];
         }
       } else {
-        console.log('No provider config from category wizard ' + typeof(catWizard));
+        console.log('ProviderConfigWizard --> No provider config from category wizard
' + typeof(catWizard));
       }
     } else {
-      console.debug('Unresolved category wizard for ' + this.selectedCategory);
+      console.debug('ProviderConfigWizard --> Unresolved category wizard for ' + this.selectedCategory);
     }
     return [];
   }
@@ -230,7 +230,7 @@ export class ProviderConfigWizardComponent implements OnInit {
           let dispPC = pc as DisplayBindingProviderConfig;
           let property = dispPC.getDisplayNamePropertyBinding(name);
           pc.setParam(property, value);
-          console.debug('Set ProviderConfig param value: ' + property + '=' + value);
+          console.debug('ProviderConfigWizard --> Set ProviderConfig param value: ' +
property + '=' + value);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/resource-detail/provider-config.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/resource-detail/provider-config.ts b/gateway-admin-ui/src/app/resource-detail/provider-config.ts
index 0811b9a..6be24f2 100644
--- a/gateway-admin-ui/src/app/resource-detail/provider-config.ts
+++ b/gateway-admin-ui/src/app/resource-detail/provider-config.ts
@@ -19,5 +19,5 @@ export class ProviderConfig {
     name: string;
     role: string;
     enabled: string;
-    params: Object;
+    params: Map<string, string>;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-admin-ui/src/app/resource-detail/resource-detail.component.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/resource-detail/resource-detail.component.ts b/gateway-admin-ui/src/app/resource-detail/resource-detail.component.ts
index 2ffaf77..a50a381 100644
--- a/gateway-admin-ui/src/app/resource-detail/resource-detail.component.ts
+++ b/gateway-admin-ui/src/app/resource-detail/resource-detail.component.ts
@@ -137,7 +137,7 @@ export class ResourceDetailComponent implements OnInit {
 
                             // There may not be params
                             if (entry.param) {
-                                let params = {};
+                                let params = new Map<string, string>();
                                 for (let i = 0; i < entry.param.length; i++) {
                                     let param = entry.param[i];
                                     params[param.name[0]] = param.value[0];
@@ -518,7 +518,7 @@ export class ResourceDetailComponent implements OnInit {
 
   addProviderParam(provider: ProviderConfig, name: string, value: string) {
       if (!provider.params) {
-          provider.params = {};
+          provider.params = new Map<string, string>();
       }
       provider.params[name] = value;
       this.changedProviders = this.providers;
@@ -526,12 +526,11 @@ export class ResourceDetailComponent implements OnInit {
 
   getProviderParamNames(provider: ProviderConfig): string[] {
       if (!provider.params) {
-          provider.params = {};
+          provider.params = new Map<string, string>();
       }
-      return Object.getOwnPropertyNames(provider.params);
+      return Object.keys(provider.params);
   }
 
-
   isProviderEnabled(pc: ProviderConfig): boolean {
       let result: boolean = false;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-applications/src/main/resources/applications/admin-ui/app/index.html
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/admin-ui/app/index.html
b/gateway-applications/src/main/resources/applications/admin-ui/app/index.html
index aae1ecd..69cc800 100644
--- a/gateway-applications/src/main/resources/applications/admin-ui/app/index.html
+++ b/gateway-applications/src/main/resources/applications/admin-ui/app/index.html
@@ -11,4 +11,4 @@
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
---><!doctype html><html><head><meta charset="utf-8"><title>Apache
Knox Manager</title><meta name="viewport" content="width=device-width,initial-scale=1"><link
rel="icon" type="image/x-icon" href="favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1"><!--
Latest compiled and minified CSS --><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"><!--
Optional theme --><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"><!--
Custom styles for this template --><link href="assets/sticky-footer.css" rel="stylesheet"><script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script><!--
Latest compiled and minified JavaScript --><scr
 ipt src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script><script src="assets/vkbeautify.js"></script><link
href="styles.2ee5b7f4cd59a6cf015e.bundle.css" rel="stylesheet"/></head><body><div
class="navbar-wrapper"><div class="container-fluid"><nav class="navbar navbar-inverse
navbar-static-top"><div class="container-fluid"><div class="navbar-header"><button
type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span> <span
class="icon-bar"></span></button> <a class="navbar-brand" href="#"><img
style="max-width:200px; margin-top: -9px;" src="assets/knox-logo-transparent.gif" alt="Apache
Knox Manager"></a></div></div></nav></div><!-- Content
--><resource-management></res
 ource-management><footer class="footer"><div>Knox Manager Version 0.1.0</div><gateway-version></gateway-version></footer><script
type="text/javascript" src="inline.01f49f7d13670ad68dea.bundle.js"></script><script
type="text/javascript" src="scripts.c50bb762c438ae0f8842.bundle.js"></script><script
type="text/javascript" src="main.db638922a84cdef35de7.bundle.js"></script></div></body></html>
\ No newline at end of file
+--><!doctype html><html><head><meta charset="utf-8"><title>Apache
Knox Manager</title><meta name="viewport" content="width=device-width,initial-scale=1"><link
rel="icon" type="image/x-icon" href="favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1"><!--
Latest compiled and minified CSS --><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"><!--
Optional theme --><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"><!--
Custom styles for this template --><link href="assets/sticky-footer.css" rel="stylesheet"><script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script><!--
Latest compiled and minified JavaScript --><scr
 ipt src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script><script src="assets/vkbeautify.js"></script><link
href="styles.2ee5b7f4cd59a6cf015e.bundle.css" rel="stylesheet"/></head><body><div
class="navbar-wrapper"><div class="container-fluid"><nav class="navbar navbar-inverse
navbar-static-top"><div class="container-fluid"><div class="navbar-header"><button
type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span> <span
class="icon-bar"></span></button> <a class="navbar-brand" href="#"><img
style="max-width:200px; margin-top: -9px;" src="assets/knox-logo-transparent.gif" alt="Apache
Knox Manager"></a></div></div></nav></div><!-- Content
--><resource-management></res
 ource-management><footer class="footer"><div>Knox Manager Version 0.1.0</div><gateway-version></gateway-version></footer><script
type="text/javascript" src="inline.823868e44971b225d6b4.bundle.js"></script><script
type="text/javascript" src="scripts.c50bb762c438ae0f8842.bundle.js"></script><script
type="text/javascript" src="main.31f4c13b664f32c9ce4d.bundle.js"></script></div></body></html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-applications/src/main/resources/applications/admin-ui/app/inline.01f49f7d13670ad68dea.bundle.js
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/admin-ui/app/inline.01f49f7d13670ad68dea.bundle.js
b/gateway-applications/src/main/resources/applications/admin-ui/app/inline.01f49f7d13670ad68dea.bundle.js
deleted file mode 100644
index 7cbd9f2..0000000
--- a/gateway-applications/src/main/resources/applications/admin-ui/app/inline.01f49f7d13670ad68dea.bundle.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,u){for(var a,i,f,l=0,s=[];l<r.length;l++)t[i=r[l]]&&s.push(t[i][0]),t[i]=0;for(a
in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=o(o.s=u[l]);return
f};var r={},t={2:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return
e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return
new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var
c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,o.nc&&u.setAttribute("nonce",o.nc),u.src=o.p+""+e+"."+{0:"db638922a84cdef35de7",1:"aed76669724804835353"}[e]+".chunk.js";var
a=setTimeout(i,12e4);function i(){u.onerror=u.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new
Error("Loading chu
 nk "+e+" failed.")),t[e]=void 0)}return u.onerror=u.onload=i,c.appendChild(u),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var
n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return
Object.prototype.hasOwnProperty.call(e,n)},o.p="",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/4c1cb80c/gateway-applications/src/main/resources/applications/admin-ui/app/inline.823868e44971b225d6b4.bundle.js
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/admin-ui/app/inline.823868e44971b225d6b4.bundle.js
b/gateway-applications/src/main/resources/applications/admin-ui/app/inline.823868e44971b225d6b4.bundle.js
new file mode 100644
index 0000000..d865f38
--- /dev/null
+++ b/gateway-applications/src/main/resources/applications/admin-ui/app/inline.823868e44971b225d6b4.bundle.js
@@ -0,0 +1 @@
+!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,u){for(var a,i,f,l=0,s=[];l<r.length;l++)t[i=r[l]]&&s.push(t[i][0]),t[i]=0;for(a
in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=o(o.s=u[l]);return
f};var r={},t={2:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return
e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return
new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var
c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,o.nc&&u.setAttribute("nonce",o.nc),u.src=o.p+""+e+"."+{0:"31f4c13b664f32c9ce4d",1:"aed76669724804835353"}[e]+".chunk.js";var
a=setTimeout(i,12e4);function i(){u.onerror=u.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new
Error("Loading chu
 nk "+e+" failed.")),t[e]=void 0)}return u.onerror=u.onload=i,c.appendChild(u),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var
n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return
Object.prototype.hasOwnProperty.call(e,n)},o.p="",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file


Mime
View raw message