KNOX-1422 - Add knoxauth to the default whitelisting services and fix redirect.jsp...
authorSandeep More <more@apache.org>
Thu, 16 Aug 2018 17:57:34 +0000 (13:57 -0400)
committerSandeep More <more@apache.org>
Thu, 16 Aug 2018 17:57:34 +0000 (13:57 -0400)
gateway-applications/src/main/resources/applications/knoxauth/app/redirecting.jsp
gateway-release/home/conf/gateway-site.xml

index f9dc732..193c69a 100644 (file)
@@ -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]-->
           }
         }
         if (whitelist == null) {
-            whitelist = "";
+            whitelist = WhitelistUtils.getDispatchWhitelist(request);
+            if (whitelist == null) {
+                whitelist = "";
+            }
         }
         boolean validRedirect = RegExUtils.checkWhitelist(whitelist, request.getParameter("originalUrl"));
         if (validRedirect) {
index a8dd91f..fe3f52d 100644 (file)
@@ -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>