Alon Bar-Lev has posted comments on this change.

Change subject: aaa : Add engine sso
......................................................................


Patch Set 59:

(5 comments)

https://gerrit.ovirt.org/#/c/36119/59/backend/manager/modules/enginesso/src/main/java/org/ovirt/engine/core/sso/servlets/SSOServiceInteractiveServlet.java
File 
backend/manager/modules/enginesso/src/main/java/org/ovirt/engine/core/sso/servlets/SSOServiceInteractiveServlet.java:

Line 49:                 setRequestId(request, response);
Line 50:             }
Line 51:             public String getName() {
Line 52:                 return "request-id";
Line 53:             }
what is this command? why do we need it?
Line 54:         },
Line 55:         Switch() {
Line 56:             public void execute(HttpServletRequest request, 
HttpServletResponse response) throws IOException, ServletException {
Line 57:                 switchUser(request, response);


Line 116:     }
Line 117: 
Line 118:     private static void login(HttpServletRequest request, 
HttpServletResponse response) throws IOException, ServletException {
Line 119:         log.debug("Entered login queryString: {}", 
request.getQueryString());
Line 120:         if 
(StringUtils.isEmpty(request.getParameter(SSOUtils.POST_COMMAND_URL))) {
what about the error?
Line 121:             throw new RuntimeException("No post command url found in 
request.");
Line 122:         }
Line 123: 
Line 124:         if (!request.getParameterMap().isEmpty()) {


Line 146:     }
Line 147: 
Line 148:     private static void logout(HttpServletRequest request, 
HttpServletResponse response) throws IOException, ServletException {
Line 149:         log.debug("Entered logout queryString: {}", 
request.getQueryString());
Line 150:         HttpSession existingSession = request.getSession(false);
post command, error should apply here as well
Line 151:         if (existingSession != null) {
Line 152:             Map<String, Object> sessionData = 
SSOUtils.getSessionData(existingSession);
Line 153:             AuthenticationProfileRepository repo = 
(AuthenticationProfileRepository) 
existingSession.getServletContext().getAttribute(SSOUtils.AUTH_PROFILE_REPOSITORY);
Line 154:             if (sessionData != null && repo != null && 
sessionData.containsKey(SSOUtils.SSO_PROFILE_ATTR_NAME)) {


Line 171:         }
Line 172:         SSOUtils.redirectToModule(request, response);
Line 173:     }
Line 174: 
Line 175:     private static void setRequestId(HttpServletRequest request, 
HttpServletResponse response) throws IOException, ServletException {
not sure why we need this
Line 176:         log.debug("Performing set request id queryString: {}", 
request.getQueryString());
Line 177:         if 
(StringUtils.isEmpty(request.getParameter(SSOUtils.POST_COMMAND_URL))) {
Line 178:             throw new RuntimeException("No post command url found in 
request.");
Line 179:         }


Line 189:     private static void switchUser(HttpServletRequest request, 
HttpServletResponse response) throws IOException, ServletException {
Line 190:         log.debug("Performing switch user queryString: {}", 
request.getQueryString());
Line 191:         if 
(StringUtils.isEmpty(request.getParameter(SSOUtils.POST_COMMAND_URL))) {
Line 192:             throw new RuntimeException("No post command url found in 
request.");
Line 193:         }
error should apply as well
Line 194: 
Line 195:         SSOConfig config = (SSOConfig) 
request.getServletContext().getAttribute(SSOUtils.SSO_CONFIG);
Line 196:         if (!config.isAllowDisableExternalAuth()) {
Line 197:             throw new RuntimeException("Switch user is not 
permitted");


-- 
To view, visit https://gerrit.ovirt.org/36119
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4894fc12653027271b6abd4dd5313b10593703fa
Gerrit-PatchSet: 59
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to