You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2021/08/31 15:28:12 UTC

[GitHub] [knox] nixonrodrigues opened a new pull request #489: KNOX-2653:- Update Atlas Service definition for knox logout/timeout in KNOX-2625

nixonrodrigues opened a new pull request #489:
URL: https://github.com/apache/knox/pull/489


   
   ## What changes were proposed in this pull request?
   Updated Atlas Service definition for knox logout/timeout to support knox logout page in Atlas timeout and logout flow.
   
   
   ## How was this patch tested?
   This patch was tested  by deploying updated servicedef in knox and test against Atlas changes on CDP cluster.
   Manually tested the logout and timeout flow in Atlas redirecting to knox logout.jsp page.
   
   


-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] moresandeep closed pull request #489: KNOX-2653:- Update Atlas Service definition for knox logout/timeout in KNOX-2625

Posted by GitBox <gi...@apache.org>.
moresandeep closed pull request #489:
URL: https://github.com/apache/knox/pull/489


   


-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] moresandeep commented on a change in pull request #489: KNOX-2653:- Update Atlas Service definition for knox logout/timeout in KNOX-2625

Posted by GitBox <gi...@apache.org>.
moresandeep commented on a change in pull request #489:
URL: https://github.com/apache/knox/pull/489#discussion_r699476790



##########
File path: gateway-service-definitions/src/main/resources/services/atlas/2.1.0/rewrite.xml
##########
@@ -32,14 +32,20 @@
         <rewrite template="{$frontend[path]}/atlas/"/>
     </rule>
 
-    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location">
-        <match pattern="*://*:*/login.jsp"/>
-        <rewrite template="{$frontend[url]}/atlas/login.jsp"/>
+    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location" flow="OR">
+        <match pattern="*://*:*/login.jsp">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?originalUrl={$postfix[url,/atlas/]}" />
+        </match>
+
+        <match pattern="*://*:*/logout.html?{**}">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?{**}"/>

Review comment:
       Here we are assuming that the cluster name is `gateway` which will not be the case always. 

##########
File path: gateway-service-definitions/src/main/resources/services/atlas/2.1.0/rewrite.xml
##########
@@ -32,14 +32,20 @@
         <rewrite template="{$frontend[path]}/atlas/"/>
     </rule>
 
-    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location">
-        <match pattern="*://*:*/login.jsp"/>
-        <rewrite template="{$frontend[url]}/atlas/login.jsp"/>
+    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location" flow="OR">
+        <match pattern="*://*:*/login.jsp">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?originalUrl={$postfix[url,/atlas/]}" />

Review comment:
       Here we are assuming that the cluster name is gateway which will not be the case always.




-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] moresandeep commented on a change in pull request #489: KNOX-2653:- Update Atlas Service definition for knox logout/timeout in KNOX-2625

Posted by GitBox <gi...@apache.org>.
moresandeep commented on a change in pull request #489:
URL: https://github.com/apache/knox/pull/489#discussion_r699476790



##########
File path: gateway-service-definitions/src/main/resources/services/atlas/2.1.0/rewrite.xml
##########
@@ -32,14 +32,20 @@
         <rewrite template="{$frontend[path]}/atlas/"/>
     </rule>
 
-    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location">
-        <match pattern="*://*:*/login.jsp"/>
-        <rewrite template="{$frontend[url]}/atlas/login.jsp"/>
+    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location" flow="OR">
+        <match pattern="*://*:*/login.jsp">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?originalUrl={$postfix[url,/atlas/]}" />
+        </match>
+
+        <match pattern="*://*:*/logout.html?{**}">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?{**}"/>

Review comment:
       Here we are assuming that the cluster name is `gateway` which will not be the case always. 

##########
File path: gateway-service-definitions/src/main/resources/services/atlas/2.1.0/rewrite.xml
##########
@@ -32,14 +32,20 @@
         <rewrite template="{$frontend[path]}/atlas/"/>
     </rule>
 
-    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location">
-        <match pattern="*://*:*/login.jsp"/>
-        <rewrite template="{$frontend[url]}/atlas/login.jsp"/>
+    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location" flow="OR">
+        <match pattern="*://*:*/login.jsp">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?originalUrl={$postfix[url,/atlas/]}" />

Review comment:
       Here we are assuming that the cluster name is gateway which will not be the case always.




-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] ashutoshm commented on a change in pull request #489: KNOX-2653:- Update Atlas Service definition for knox logout/timeout in KNOX-2625

Posted by GitBox <gi...@apache.org>.
ashutoshm commented on a change in pull request #489:
URL: https://github.com/apache/knox/pull/489#discussion_r709316096



##########
File path: gateway-service-definitions/src/main/resources/services/atlas/2.1.0/rewrite.xml
##########
@@ -32,14 +32,20 @@
         <rewrite template="{$frontend[path]}/atlas/"/>
     </rule>
 
-    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location">
-        <match pattern="*://*:*/login.jsp"/>
-        <rewrite template="{$frontend[url]}/atlas/login.jsp"/>
+    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location" flow="OR">
+        <match pattern="*://*:*/login.jsp">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?originalUrl={$postfix[url,/atlas/]}" />
+        </match>
+
+        <match pattern="*://*:*/logout.html?{**}">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?{**}"/>

Review comment:
       @moresandeep Fix would be to replace gateway with {gateway} and knoxsso with {knoxsso}. Correct?




-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [knox] moresandeep commented on a change in pull request #489: KNOX-2653:- Update Atlas Service definition for knox logout/timeout in KNOX-2625

Posted by GitBox <gi...@apache.org>.
moresandeep commented on a change in pull request #489:
URL: https://github.com/apache/knox/pull/489#discussion_r709495441



##########
File path: gateway-service-definitions/src/main/resources/services/atlas/2.1.0/rewrite.xml
##########
@@ -32,14 +32,20 @@
         <rewrite template="{$frontend[path]}/atlas/"/>
     </rule>
 
-    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location">
-        <match pattern="*://*:*/login.jsp"/>
-        <rewrite template="{$frontend[url]}/atlas/login.jsp"/>
+    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location" flow="OR">
+        <match pattern="*://*:*/login.jsp">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?originalUrl={$postfix[url,/atlas/]}" />
+        </match>
+
+        <match pattern="*://*:*/logout.html?{**}">
+            <rewrite template="https://{$frontend[addr]}/gateway/knoxsso/knoxauth/logout.jsp?{**}"/>

Review comment:
       We can leave knoxsso as is since it is not a custom topology name, for gateway I think we can use `{gateway.path}`




-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org