atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-atlas git commit: ATLAS-1420: use ATLASSESSIONID as cookie name instead of JSESSIONID
Date Thu, 29 Dec 2016 20:01:48 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/0.7-incubating a5160017e -> 340e1a5ff


ATLAS-1420: use ATLASSESSIONID as cookie name instead of JSESSIONID

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/340e1a5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/340e1a5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/340e1a5f

Branch: refs/heads/0.7-incubating
Commit: 340e1a5ff664cb70a599997fb5187d020e8458fa
Parents: a516001
Author: nixonrodrigues <nixon.rodrigues@freestoneinfotech.com>
Authored: Wed Dec 28 20:17:43 2016 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Thu Dec 29 10:21:31 2016 -0800

----------------------------------------------------------------------
 .../apache/atlas/web/filters/AtlasAuthenticationFilter.java | 2 +-
 webapp/src/main/resources/spring-security.xml               | 2 +-
 webapp/src/main/webapp/WEB-INF/web.xml                      | 9 ++++++++-
 webapp/src/test/webapp/WEB-INF/web.xml                      | 9 +++++++++
 4 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/340e1a5f/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
index 30200b5..3307015 100644
--- a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
+++ b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java
@@ -435,7 +435,7 @@ public class AtlasAuthenticationFilter extends AuthenticationFilter {
                         Collection<String> headerNames = httpResponse.getHeaderNames();
                         for (String headerName : headerNames) {
                             String value = httpResponse.getHeader(headerName);
-                            if (headerName.equalsIgnoreCase("Set-Cookie") && value.startsWith("JSESSIONID"))
{
+                            if (headerName.equalsIgnoreCase("Set-Cookie") && value.startsWith("ATLASSESSIONID"))
{
                                 chk = false;
                                 break;
                             }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/340e1a5f/webapp/src/main/resources/spring-security.xml
----------------------------------------------------------------------
diff --git a/webapp/src/main/resources/spring-security.xml b/webapp/src/main/resources/spring-security.xml
index 5395d4e..714fdc5 100644
--- a/webapp/src/main/resources/spring-security.xml
+++ b/webapp/src/main/resources/spring-security.xml
@@ -53,7 +53,7 @@
                 username-parameter="j_username"
                 password-parameter="j_password" />
 
-        <security:logout logout-success-url="/login.jsp" delete-cookies="JSESSIONID"
+        <security:logout logout-success-url="/login.jsp" delete-cookies="ATLASSESSIONID"
                          logout-url="/logout.html" />
         <http-basic />
         <security:custom-filter position="LAST" ref="atlasAuthorizationFilter"/>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/340e1a5f/webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/webapp/src/main/webapp/WEB-INF/web.xml b/webapp/src/main/webapp/WEB-INF/web.xml
index e2a85e9..f80a078 100755
--- a/webapp/src/main/webapp/WEB-INF/web.xml
+++ b/webapp/src/main/webapp/WEB-INF/web.xml
@@ -78,6 +78,13 @@
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
 
-
+    <session-config>
+        <session-timeout>60</session-timeout>
+        <tracking-mode>COOKIE</tracking-mode>
+        <cookie-config>
+            <name>ATLASSESSIONID</name>
+            <http-only>true</http-only>
+        </cookie-config>
+    </session-config>
 	
 </web-app>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/340e1a5f/webapp/src/test/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/webapp/src/test/webapp/WEB-INF/web.xml b/webapp/src/test/webapp/WEB-INF/web.xml
index 1b152ee..6649043 100755
--- a/webapp/src/test/webapp/WEB-INF/web.xml
+++ b/webapp/src/test/webapp/WEB-INF/web.xml
@@ -73,4 +73,13 @@
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
 
+    <session-config>
+        <session-timeout>60</session-timeout>
+        <tracking-mode>COOKIE</tracking-mode>
+        <cookie-config>
+            <name>ATLASSESSIONID</name>
+            <http-only>true</http-only>
+        </cookie-config>
+    </session-config>
+
 </web-app>


Mime
View raw message