Yair Zaslavsky has posted comments on this change. Change subject: Introduction of filters to unify AAA flows for UI and REST-API ......................................................................
Patch Set 52: (5 comments) http://gerrit.ovirt.org/#/c/28022/52/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 17: public static final String REQUEST_PROFILE_KEY = "ovirt_aaa_profile"; Line 18: public static final String HEADER_AUTHORIZATION = "Authorization"; Line 19: public static final String HEADER_WWW_AUTHENTICATE = "WWW-Authenticate"; Line 20: public static final String HEADER_PREFER = "Prefer"; Line 21: public static final String JSESSIONID_COOKIE = "JSESSIONID"; > you put it as header, then i is header. Done Line 22: } Line 23: Line 24: public static BackendLocal getBackend(Context context) { Line 25: http://gerrit.ovirt.org/#/c/28022/52/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 57: } Line 58: } Line 59: chain.doFilter(request, response); Line 60: try { Line 61: if (!persistentAuth && FiltersHelper.isAuthenticated(req)) { > I think I expect here: Done Line 62: InitialContext ctx = new InitialContext(); Line 63: try { Line 64: FiltersHelper.getBackend(ctx).runAction( Line 65: VdcActionType.LogoutBySession, Line 72: ctx.close(); Line 73: } Line 74: } else { Line 75: HttpSession session = req.getSession(false); Line 76: if (session != null && session.isNew() && session.getAttribute("async") != null && !Boolean.valueOf((boolean)session.getAttribute("async"))) { > this is relation between the aaa module and the restapi application. ok, we agreed that rest-api code will put on the request a different attribute and internally restapi can use whatever name (i.e - "async") it wants. Line 77: ((HttpServletResponse)response).addHeader(FiltersHelper.Constants.JSESSIONID_COOKIE, session.getId()); Line 78: } Line 79: } Line 80: } catch (Exception ex) { http://gerrit.ovirt.org/#/c/28022/52/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/SessionConstants.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/SessionConstants.java: Line 1: package org.ovirt.engine.core.common.constants; Line 2: Line 3: public class SessionConstants { Line 4: Line 5: public final static String HTTP_SESSION_ENGINE_SESSION_ID_KEY = "engineSessionId"; > please add ovirt_aaa prefix to the value. Done Line 6: http://gerrit.ovirt.org/#/c/28022/52/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/security/auth/LoginValidator.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/security/auth/LoginValidator.java: Line 36: public void postProcess(ServerResponse response) { Line 37: HttpSession httpSession = getCurrentSession(false); Line 38: if (!current.get(MetaData.class).hasKey("async") || Line 39: (!(Boolean.TRUE.equals((Boolean) current.get(MetaData.class).get("async"))))) { Line 40: httpSession.setAttribute("async", false); > why do you set false in session? better to put true if async, please also m Done Line 41: } Line 42: sessionHelper.clean(); Line 43: } Line 44: -- 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: 52 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