You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by pz...@apache.org on 2018/04/20 20:27:51 UTC
[3/3] knox git commit: KNOX-1258 - Add Anonymous authentication
provider to provider config wizard options.
KNOX-1258 - Add Anonymous authentication provider to provider config wizard options.
Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/105dacd6
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/105dacd6
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/105dacd6
Branch: refs/heads/master
Commit: 105dacd6a9018cd82a8e4837dbff8de112b60069
Parents: d8ba648
Author: Phil Zampino <pz...@apache.org>
Authored: Fri Apr 20 16:12:02 2018 -0400
Committer: Phil Zampino <pz...@apache.org>
Committed: Fri Apr 20 16:14:20 2018 -0400
----------------------------------------------------------------------
.../AnonymousProviderConfig.ts | 37 ++++++++++++++++++++
.../authentication-wizard.ts | 6 +++-
.../provider-config-wizard.component.ts | 10 ++++++
gateway-admin-ui/src/index.html | 2 +-
.../applications/admin-ui/app/index.html | 2 +-
.../app/inline.16974ba5282691a55526.bundle.js | 1 +
.../app/inline.eb52fe76e011daf0055a.bundle.js | 1 -
.../app/main.287637e368c54fc02610.bundle.js | 1 -
.../app/main.99134704228150aa98b5.bundle.js | 1 +
9 files changed, 56 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/knox/blob/105dacd6/gateway-admin-ui/src/app/provider-config-wizard/AnonymousProviderConfig.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/AnonymousProviderConfig.ts b/gateway-admin-ui/src/app/provider-config-wizard/AnonymousProviderConfig.ts
new file mode 100644
index 0000000..0d79fd3
--- /dev/null
+++ b/gateway-admin-ui/src/app/provider-config-wizard/AnonymousProviderConfig.ts
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+import {AuthenticationProviderConfig} from "./authentication-provider-config";
+
+
+export class AnonymousProviderConfig extends AuthenticationProviderConfig {
+
+ private displayBindingPropertyNames: string[] = [];
+
+ constructor() {
+ super('Anonymous');
+ }
+
+ getDisplayPropertyNames(): string[] {
+ return this.displayBindingPropertyNames;
+ }
+
+ getDisplayNamePropertyBinding(name: string): string {
+ return null;
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/105dacd6/gateway-admin-ui/src/app/provider-config-wizard/authentication-wizard.ts
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/app/provider-config-wizard/authentication-wizard.ts b/gateway-admin-ui/src/app/provider-config-wizard/authentication-wizard.ts
index dc9682b..0f8ec4f 100644
--- a/gateway-admin-ui/src/app/provider-config-wizard/authentication-wizard.ts
+++ b/gateway-admin-ui/src/app/provider-config-wizard/authentication-wizard.ts
@@ -27,6 +27,7 @@ import {CASProviderConfig} from "./cas-provider-config";
import {SAMLProviderConfig} from "./saml-provider-config";
import {OIDCProviderConfig} from "./oidc-provider-config";
import {OAUTHProviderConfig} from "./oauth-provider-config";
+import {AnonymousProviderConfig} from "./AnonymousProviderConfig";
export class AuthenticationWizard extends CategoryWizard {
@@ -43,6 +44,7 @@ export class AuthenticationWizard extends CategoryWizard {
private static AUTH_OAUTH: string = 'OAuth';
private static AUTH_SAML: string = 'SAML';
private static AUTH_OIDC: string = 'OpenID Connect';
+ private static AUTH_ANONYMOUS: string = 'Anonymous';
private static authTypes: string[] = [ AuthenticationWizard.AUTH_LDAP,
AuthenticationWizard.AUTH_PAM,
AuthenticationWizard.AUTH_HADOOP,
@@ -52,7 +54,8 @@ export class AuthenticationWizard extends CategoryWizard {
AuthenticationWizard.AUTH_CAS,
AuthenticationWizard.AUTH_OAUTH,
AuthenticationWizard.AUTH_SAML,
- AuthenticationWizard.AUTH_OIDC
+ AuthenticationWizard.AUTH_OIDC,
+ AuthenticationWizard.AUTH_ANONYMOUS
];
private static typeConfigMap: Map<string, typeof AuthenticationProviderConfig> =
@@ -66,6 +69,7 @@ export class AuthenticationWizard extends CategoryWizard {
[AuthenticationWizard.AUTH_OAUTH, OAUTHProviderConfig],
[AuthenticationWizard.AUTH_SAML, SAMLProviderConfig],
[AuthenticationWizard.AUTH_OIDC, OIDCProviderConfig],
+ [AuthenticationWizard.AUTH_ANONYMOUS, AnonymousProviderConfig]
] as [string, typeof AuthenticationProviderConfig][]);
http://git-wip-us.apache.org/repos/asf/knox/blob/105dacd6/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 a56ce2b..6985355 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
@@ -182,6 +182,16 @@ export class ProviderConfigWizardComponent implements OnInit {
let catWizard = this.getCategoryWizard(this.selectedCategory);
if (catWizard) {
result = (this.step < (catWizard.getSteps() - 1));
+ if (result) {
+ if (this.isProviderTypeStep()) { // Next step would be params
+ // Check for the need to display the params step
+ let pc = catWizard.getProviderConfig();
+ if (pc && pc instanceof DisplayBindingProviderConfig) {
+ let propNames: string[] = (pc as DisplayBindingProviderConfig).getDisplayPropertyNames();
+ result = propNames.length > 0;
+ }
+ }
+ }
}
return result;
}
http://git-wip-us.apache.org/repos/asf/knox/blob/105dacd6/gateway-admin-ui/src/index.html
----------------------------------------------------------------------
diff --git a/gateway-admin-ui/src/index.html b/gateway-admin-ui/src/index.html
index 6036348..e01447f 100644
--- a/gateway-admin-ui/src/index.html
+++ b/gateway-admin-ui/src/index.html
@@ -58,7 +58,7 @@
<footer class="footer">
<div class="container-fluid">
- <div>Knox Manager Version 0.1.0</div>
+ <div>Knox Manager Version 1.0.0</div>
<gateway-version></gateway-version>
</div>
</footer>
http://git-wip-us.apache.org/repos/asf/knox/blob/105dacd6/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 a38258d..dd4572e 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 class="container-fluid"><div>Knox Manager Version 0.1.0</div><gateway-version></gateway-version></div></footer><script type="text/javascript" src="inline.eb52fe76e011daf0055a.bundle.js"></script><script type="text/javascript" src="scripts.c50bb762c438ae0f8842.bundle.js"></script><script type="text/javascript" src="main.287637e368c54fc02610.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 class="container-fluid"><div>Knox Manager Version 1.0.0</div><gateway-version></gateway-version></div></footer><script type="text/javascript" src="inline.16974ba5282691a55526.bundle.js"></script><script type="text/javascript" src="scripts.c50bb762c438ae0f8842.bundle.js"></script><script type="text/javascript" src="main.99134704228150aa98b5.bundle.js"></script></div></body></html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/105dacd6/gateway-applications/src/main/resources/applications/admin-ui/app/inline.16974ba5282691a55526.bundle.js
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/admin-ui/app/inline.16974ba5282691a55526.bundle.js b/gateway-applications/src/main/resources/applications/admin-ui/app/inline.16974ba5282691a55526.bundle.js
new file mode 100644
index 0000000..f3ba438
--- /dev/null
+++ b/gateway-applications/src/main/resources/applications/admin-ui/app/inline.16974ba5282691a55526.bundle.js
@@ -0,0 +1 @@
+!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var u,i,f,l=0,s=[];l<r.length;l++)t[i=r[l]]&&s.push(t[i][0]),t[i]=0;for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&(e[u]=a[u]);for(n&&n(r,a,c);s.length;)s.shift()();if(c)for(l=0;l<c.length;l++)f=o(o.s=c[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 a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+""+e+"."+{0:"99134704228150aa98b5",1:"aed76669724804835353"}[e]+".chunk.js";var u=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(u);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chu
nk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),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/105dacd6/gateway-applications/src/main/resources/applications/admin-ui/app/inline.eb52fe76e011daf0055a.bundle.js
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/admin-ui/app/inline.eb52fe76e011daf0055a.bundle.js b/gateway-applications/src/main/resources/applications/admin-ui/app/inline.eb52fe76e011daf0055a.bundle.js
deleted file mode 100644
index e744357..0000000
--- a/gateway-applications/src/main/resources/applications/admin-ui/app/inline.eb52fe76e011daf0055a.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:"287637e368c54fc02610",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