Alon Bar-Lev has uploaded a new change for review.

Change subject: core: modify uri location of engine get session user service
......................................................................

core: modify uri location of engine get session user service

part of ovirt-engine uri rework, to make it more well behaved
application.

the location of the servlet was moved.

/OvirtEngineWeb/ValidateSession ->
/ovirt-engine/services/get-session-user

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=961677
Change-Id: Ie90780b44759afb94cd34f5bf931e9bc0e6f7dba
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M packaging/ovirt-engine-reports-setup.py
M 
reports/jars/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java
M server-customizations/WEB-INF/applicationContext-security-web.xml
3 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-reports refs/changes/89/20789/1

diff --git a/packaging/ovirt-engine-reports-setup.py 
b/packaging/ovirt-engine-reports-setup.py
index f72ffc8..41c161b 100755
--- a/packaging/ovirt-engine-reports-setup.py
+++ b/packaging/ovirt-engine-reports-setup.py
@@ -810,8 +810,8 @@
         )
     logging.debug("editing applicationContext-security-web file")
     protocol, fqdn, port = getHostParams()
-    hostValidateSessionUrl = (
-        '{proto}://{fqdn}:{port}/OvirtEngineWeb/ValidateSession'
+    hostGetSessionUserUrl = (
+        '{proto}://{fqdn}:{port}/ovirt-engine/services/get-session-user'
     ).format(
         proto=protocol,
         fqdn=fqdn,
@@ -821,7 +821,7 @@
         file_content = fd.read()
 
     logging.debug("replace servlet URL")
-    file_content = 
file_content.replace("http://localhost/OvirtEngineWeb/ValidateSession";, 
hostValidateSessionUrl)
+    file_content = 
file_content.replace("http://localhost/ovirt-engine/services/get-session-user";, 
hostGetSessionUserUrl)
 
     logging.debug("replace trust store path and pass")
     file_content = file_content.replace(
diff --git 
a/reports/jars/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java
 
b/reports/jars/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java
index d0d9b67..9ca1336 100755
--- 
a/reports/jars/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java
+++ 
b/reports/jars/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java
@@ -187,7 +187,7 @@
     /*
      * This method gets a sessionID, and validates it with the engine, using 
the servlet input URL
      */
-    protected String callValidateSession(String sessionID) {
+    protected String callGetSessionUser(String sessionID) {
         DataOutputStream output = null;
 
         try {
@@ -209,7 +209,7 @@
 
             // Checking the result
             if (servletConnection.getResponseCode() != 
HttpURLConnection.HTTP_OK) {
-                logger.error("ValidateSession servlet returned " + 
servletConnection.getResponseCode());
+                logger.error("GetSessionUser servlet returned " + 
servletConnection.getResponseCode());
                 return null;
             }
 
@@ -245,7 +245,7 @@
     public UsernamePasswordAuthenticationToken 
getAuthRequest(HttpServletRequest request, String sessionID) {
         UsernamePasswordAuthenticationToken authRequest = null;
         if (sessionID != null) {
-            String result = callValidateSession(sessionID);
+            String result = callGetSessionUser(sessionID);
             if (result == null) {
                 return null;
             } else if (result.isEmpty()) {
diff --git a/server-customizations/WEB-INF/applicationContext-security-web.xml 
b/server-customizations/WEB-INF/applicationContext-security-web.xml
index e821bed..f63fe6a 100644
--- a/server-customizations/WEB-INF/applicationContext-security-web.xml
+++ b/server-customizations/WEB-INF/applicationContext-security-web.xml
@@ -49,7 +49,7 @@
         <property name="authenticationManager">
             <ref bean="authenticationManager"/>
         </property>
-        <property name="servletURL" 
value="http://localhost/OvirtEngineWeb/ValidateSession"/>
+        <property name="servletURL" 
value="http://localhost/ovirt-engine/services/get-session-user"/>
         <property name="pollingTimeout" value="60"/>
         <property name="trustStorePath" 
value="/usr/local/jboss-as/truststore"/>
         <property name="trustStorePassword" value="NoSoup4U"/>


-- 
To view, visit http://gerrit.ovirt.org/20789
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie90780b44759afb94cd34f5bf931e9bc0e6f7dba
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-reports
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to