knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject knox git commit: KNOX-1422 - Add knoxauth to the default whitelisting services and fix redirect.jsp whitelisting bug
Date Thu, 16 Aug 2018 17:57:40 GMT
Repository: knox
Updated Branches:
  refs/heads/master 401680462 -> c60417751


KNOX-1422 - Add knoxauth to the default whitelisting services and fix redirect.jsp whitelisting
bug


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

Branch: refs/heads/master
Commit: c60417751b9602050c3dd95b1659558900add5ba
Parents: 4016804
Author: Sandeep More <more@apache.org>
Authored: Thu Aug 16 13:57:34 2018 -0400
Committer: Sandeep More <more@apache.org>
Committed: Thu Aug 16 13:57:34 2018 -0400

----------------------------------------------------------------------
 .../main/resources/applications/knoxauth/app/redirecting.jsp   | 6 +++++-
 gateway-release/home/conf/gateway-site.xml                     | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/c6041775/gateway-applications/src/main/resources/applications/knoxauth/app/redirecting.jsp
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/knoxauth/app/redirecting.jsp
b/gateway-applications/src/main/resources/applications/knoxauth/app/redirecting.jsp
index f9dc732..193c69a 100644
--- a/gateway-applications/src/main/resources/applications/knoxauth/app/redirecting.jsp
+++ b/gateway-applications/src/main/resources/applications/knoxauth/app/redirecting.jsp
@@ -17,6 +17,7 @@
 <%@ page import="org.apache.knox.gateway.topology.Topology" %>
 <%@ page import="org.apache.knox.gateway.topology.Service" %>
 <%@ page import="org.apache.knox.gateway.util.RegExUtils" %>
+<%@ page import="org.apache.knox.gateway.util.WhitelistUtils" %>
 
 <!DOCTYPE html>
 <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
@@ -51,7 +52,10 @@
           }
         }
         if (whitelist == null) {
-            whitelist = "";
+            whitelist = WhitelistUtils.getDispatchWhitelist(request);
+            if (whitelist == null) {
+                whitelist = "";
+            }
         }
         boolean validRedirect = RegExUtils.checkWhitelist(whitelist, request.getParameter("originalUrl"));
         if (validRedirect) {

http://git-wip-us.apache.org/repos/asf/knox/blob/c6041775/gateway-release/home/conf/gateway-site.xml
----------------------------------------------------------------------
diff --git a/gateway-release/home/conf/gateway-site.xml b/gateway-release/home/conf/gateway-site.xml
index a8dd91f..fe3f52d 100644
--- a/gateway-release/home/conf/gateway-site.xml
+++ b/gateway-release/home/conf/gateway-site.xml
@@ -130,7 +130,7 @@ limitations under the License.
     </property>
     <property>
         <name>gateway.dispatch.whitelist.services</name>
-        <value>DATANODE,HBASEUI,HDFSUI,JOBHISTORYUI,NODEUI,YARNUI</value>
+        <value>DATANODE,HBASEUI,HDFSUI,JOBHISTORYUI,NODEUI,YARNUI,knoxauth</value>
         <description>The comma-delimited list of service roles for which the gateway.dispatch.whitelist
should be applied.</description>
     </property>
     <property>


Mime
View raw message