Alon Bar-Lev has posted comments on this change.

Change subject: Introduction of filters to unify AAA flows for UI and REST-API
......................................................................


Patch Set 53:

(3 comments)

Great!

Minor comments.

http://gerrit.ovirt.org/#/c/28022/53/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/FiltersHelper.java
File 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/FiltersHelper.java:

Line 14:     public static class Constants {
Line 15:         public static  final String REQUEST_AUTH_RECORD_KEY = 
"ovirt_aaa_auth_record";
Line 16:         public static final String REQUEST_SCHEMES_KEY = 
"ovirt_aaa_schemes";
Line 17:         public static final String REQUEST_PROFILE_KEY = 
"ovirt_aaa_profile";
Line 18:         public static final String REQUEST_ASYNC_KEY = 
"ovirt_aaa_async";
ovirt_aaa_restapi_?
Line 19:         public static final String HEADER_AUTHORIZATION = 
"Authorization";
Line 20:         public static final String HEADER_WWW_AUTHENTICATE = 
"WWW-Authenticate";
Line 21:         public static final String HEADER_PREFER = "Prefer";
Line 22:         public static final String HEADER_JSESSIONID_COOKIE = 
"JSESSIONID";


http://gerrit.ovirt.org/#/c/28022/53/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/RestApiSessionMgmtFilter.java
File 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/RestApiSessionMgmtFilter.java:

Line 54:                         
SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY,
Line 55:                         engineSessionId
Line 56:                         );
Line 57:             } else {
Line 58:                 if 
(session.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY) != 
null)
I would have put this logic anyway... not only if persistent auth.

 if we do not have engine session id on request:
     if we have engine session in http session:
         set engine session within request
Line 59:                     
request.setAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, 
session.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY));
Line 60:             }
Line 61:         }
Line 62:         chain.doFilter(request, response);


Line 76:                         ctx.close();
Line 77:                     }
Line 78:                 } else {
Line 79:                     HttpSession session = req.getSession(false);
Line 80:                     if (session != null && session.isNew() && 
req.getAttribute(FiltersHelper.Constants.REQUEST_ASYNC_KEY) == null
so do we need the isNew() now?
Line 81:                             || !Boolean.valueOf((boolean) 
req.getAttribute(FiltersHelper.Constants.REQUEST_ASYNC_KEY))) {
Line 82:                         ((HttpServletResponse) 
response).addHeader(FiltersHelper.Constants.HEADER_JSESSIONID_COOKIE,
Line 83:                                 session.getId());
Line 84:                     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5536d123b6407acf41b6946dde796bd67d1e073
Gerrit-PatchSet: 53
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to