[ 
https://issues.apache.org/jira/browse/KNOX-2625?focusedWorklogId=643101&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-643101
 ]

ASF GitHub Bot logged work on KNOX-2625:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Aug/21 13:51
            Start Date: 28/Aug/21 13:51
    Worklog Time Spent: 10m 
      Work Description: moresandeep commented on a change in pull request #476:
URL: https://github.com/apache/knox/pull/476#discussion_r697872780



##########
File path: 
gateway-applications/src/main/resources/applications/knoxauth/app/logout.jsp
##########
@@ -0,0 +1,164 @@
+<!--
+  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.
+-->
+<%@ page import="java.util.Collection" %>
+<%@ page import="java.util.Map" %>
+<%@ 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" %>
+<%@ page import="org.apache.knox.gateway.config.GatewayConfig" %>
+<%@ page import="java.net.MalformedURLException" %>
+<%@ page import="org.apache.knox.gateway.util.Urls" %>
+
+<!DOCTYPE html>
+<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
+<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]-->
+<!--[if IE 8]><html class="no-js lt-ie9"><![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+    <!--<![endif]-->
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+        <meta name="description" content="">
+        <meta name="viewport" content="width=device-width">
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+        <meta http-equiv="Cache-Control" content="no-cache, no-store, 
must-revalidate">
+        <meta http-equiv="Pragma" content="no-cache">
+        <meta http-equiv="Expires" content="0">
+
+        <link rel="shortcut icon" href="images/favicon.ico">
+        <link href="styles/bootstrap.min.css" media="all" rel="stylesheet" 
type="text/css" id="bootstrap-css">
+        <link href="styles/knox.css" media="all" rel="stylesheet" 
type="text/css" >
+
+        <script src="libs/bower/jquery/js/jquery-3.5.1.min.js" ></script>
+
+        <script type="text/javascript" src="js/knoxauth.js"></script>
+    <%
+        String originalUrl = request.getParameter("originalUrl");
+        Topology topology = 
(Topology)request.getSession().getServletContext().getAttribute("org.apache.knox.gateway.topology");
+        String whitelist = null;
+        String cookieName = null;
+        GatewayConfig gatewayConfig =
+                (GatewayConfig) request.getServletContext().
+                getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+        String globalLogoutPageURL = gatewayConfig.getGlobalLogoutPageUrl();
+        Collection<Service> services = topology.getServices();
+        for (Object service : services) {
+          Service svc = (Service)service;
+          if (svc.getRole().equals("KNOXSSO")) {
+            Map<String, String> params = svc.getParams();
+            whitelist = params.get("knoxsso.redirect.whitelist.regex");
+            // LJM TODO: get cookie name and possibly domain prefix info for 
use in logout
+            cookieName = params.get("knoxsso.cookie.name");
+            if (cookieName == null) {
+                cookieName = "hadoop-jwt";

Review comment:
       Darn it, you are right! 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 643101)
    Time Spent: 1.5h  (was: 1h 20m)

> Enhance KnoxSSO to Support Session Timeout and Logout
> -----------------------------------------------------
>
>                 Key: KNOX-2625
>                 URL: https://issues.apache.org/jira/browse/KNOX-2625
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: KnoxSSO
>            Reporter: Larry McCay
>            Assignee: Larry McCay
>            Priority: Major
>             Fix For: 1.6.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> By extending the WebSSOResource in KnoxSSO to accept redirects with a 
> session-state query param, we can provide hooks for handling session 
> expiry/timeout and logout.
> This will assume that a participating application redirects to a given 
> session timeout or logout page which can be rewritten to or be configured to 
> be the knoxsso endpoint with a session-state change query param.
> We will then be able to determine how to handle each and to give the user a 
> choice when appropriate.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to