Loading cadc-access-control-server/src/main/java/ca/nrc/cadc/ac/server/web/ResetPasswordServlet.java +16 −12 Original line number Diff line number Diff line Loading @@ -130,25 +130,22 @@ public class ResetPasswordServlet extends HttpServlet * using input parameters read from it. Users who do augment * subject calls are constructed by taking the principals out of the ServletConfig * input parameter. * </p> * * <p> * The ResetPasswordServlet configuration in the web deployment descriptor file * <code>web.xml</code> must have two input parameters: * <ul> * <li><code>ca.nrc.cadc.ac.server.web.ResetPasswordServlet.PrivilegedX500Principals</code> * is a list of trusted administrators DNs. It is a multi-line list with * line breaks between the trusted DNs and each DN eclosed in double quotes.</li> * is a list of trusted administrators DNs. Each DN must be enclosed in double quotes. * The list can be multi-line for readability.</li> * <li><code>ca.nrc.cadc.ac.server.web.ResetPasswordServlet.PrivilegedHttpPrincipals</code> * is a list of space separated userids (HTTP identities) corresponding * to the previous DNs.</li> * is a list of space separated userids (HTTP identities), enclosed in double quotes, * corresponding to the previous DNs.</li> * </ul> * The two lists of principal names must be of the same * length and correspond to each other in order. * </p> * * @param config The servlet configuration object. * @param response The HTTP Response. * * @throws javax.servlet.ServletException For general Servlet exceptions. */ Loading Loading @@ -205,7 +202,7 @@ public class ResetPasswordServlet extends HttpServlet log.warn("No Privileged users configured."); } PluginFactory pluginFactory = new PluginFactory(); PluginFactory pluginFactory = getPluginFactory(); userPersistence = pluginFactory.createUserPersistence(); } catch (Throwable t) Loading @@ -215,6 +212,13 @@ public class ResetPasswordServlet extends HttpServlet } } protected PluginFactory getPluginFactory() { return new PluginFactory(); } protected boolean isPrivilegedSubject(final HttpServletRequest request) { if (privilegedSubjects == null || privilegedSubjects.isEmpty()) Loading cadc-access-control-server/src/main/java/ca/nrc/cadc/ac/server/web/UserRequestServlet.java +12 −10 Original line number Diff line number Diff line Loading @@ -118,25 +118,22 @@ public class UserRequestServlet extends HttpServlet * using input parameters read from it. Users who do augment * subject calls are constructed by taking the principals out of the ServletConfig * input parameter. * </p> * * <p> * The UserRequestServlet in the web deployment descriptor file * The UserRequestServlet configuration in the web deployment descriptor file * <code>web.xml</code> must have two input parameters: * <ul> * <li><code>ca.nrc.cadc.ac.server.web.UserRequestServlet.PrivilegedX500Principals</code> * is a list of trusted administrators DNs. It is a multi-line list with * line breaks between the trusted DNs and each DN eclosed in double quotes.</li> * is a list of trusted administrators DNs. Each DN must be enclosed in double quotes. * The list can be multi-line for readability.</li> * <li><code>ca.nrc.cadc.ac.server.web.UserRequestServlet.PrivilegedHttpPrincipals</code> * is a list of space separated userids (HTTP identities) corresponding * to the previous DNs.</li> * is a list of space separated userids (HTTP identities), enclosed in double quotes, * corresponding to the previous DNs.</li> * </ul> * The two lists of principal names must be of the same * length and correspond to each other in order. * </p> * * @param config The servlet configuration object. * @param response The HTTP Response. * * @throws javax.servlet.ServletException For general Servlet exceptions. */ Loading @@ -160,7 +157,6 @@ public class UserRequestServlet extends HttpServlet Pattern pattern = Pattern.compile("([^\"]\\S*|\".+?\")\\s*"); Matcher x500Matcher = pattern.matcher(x500Users); Matcher httpMatcher = pattern.matcher(httpUsers); while (x500Matcher.find()) { String next = x500Matcher.group(1); Loading Loading @@ -193,7 +189,7 @@ public class UserRequestServlet extends HttpServlet log.warn("No Privileged users configured."); } PluginFactory pluginFactory = new PluginFactory(); PluginFactory pluginFactory = getPluginFactory(); userPersistence = pluginFactory.createUserPersistence(); } catch (Throwable t) Loading @@ -203,6 +199,12 @@ public class UserRequestServlet extends HttpServlet } } protected PluginFactory getPluginFactory() { return new PluginFactory(); } /** * Create a UserAction and run the action safely. */ Loading cadc-access-control-server/src/main/java/ca/nrc/cadc/ac/server/web/UserServlet.java +4 −7 Original line number Diff line number Diff line Loading @@ -118,25 +118,22 @@ public class UserServlet extends HttpServlet * using input parameters read from it. Users who do augment * subject calls are constructed by taking the principals out of the ServletConfig * input parameter. * </p> * * <p> * The UserServlet configuration in the web deployment descriptor file * <code>web.xml</code> must have two input parameters: * <ul> * <li><code>ca.nrc.cadc.ac.server.web.UserServlet.PrivilegedX500Principals</code> * is a list of trusted administrators DNs. It is a multi-line list with * line breaks between the trusted DNs and each DN eclosed in double quotes.</li> * is a list of trusted administrators DNs. Each DN must be enclosed in double quotes. * The list can be multi-line for readability.</li> * <li><code>ca.nrc.cadc.ac.server.web.UserServlet.PrivilegedHttpPrincipals</code> * is a list of space separated userids (HTTP identities) corresponding * to the previous DNs.</li> * is a list of space separated userids (HTTP identities), enclosed in double quotes, * corresponding to the previous DNs.</li> * </ul> * The two lists of principal names must be of the same * length and correspond to each other in order. * </p> * * @param config The servlet configuration object. * @param response The HTTP Response. * * @throws javax.servlet.ServletException For general Servlet exceptions. */ Loading Loading
cadc-access-control-server/src/main/java/ca/nrc/cadc/ac/server/web/ResetPasswordServlet.java +16 −12 Original line number Diff line number Diff line Loading @@ -130,25 +130,22 @@ public class ResetPasswordServlet extends HttpServlet * using input parameters read from it. Users who do augment * subject calls are constructed by taking the principals out of the ServletConfig * input parameter. * </p> * * <p> * The ResetPasswordServlet configuration in the web deployment descriptor file * <code>web.xml</code> must have two input parameters: * <ul> * <li><code>ca.nrc.cadc.ac.server.web.ResetPasswordServlet.PrivilegedX500Principals</code> * is a list of trusted administrators DNs. It is a multi-line list with * line breaks between the trusted DNs and each DN eclosed in double quotes.</li> * is a list of trusted administrators DNs. Each DN must be enclosed in double quotes. * The list can be multi-line for readability.</li> * <li><code>ca.nrc.cadc.ac.server.web.ResetPasswordServlet.PrivilegedHttpPrincipals</code> * is a list of space separated userids (HTTP identities) corresponding * to the previous DNs.</li> * is a list of space separated userids (HTTP identities), enclosed in double quotes, * corresponding to the previous DNs.</li> * </ul> * The two lists of principal names must be of the same * length and correspond to each other in order. * </p> * * @param config The servlet configuration object. * @param response The HTTP Response. * * @throws javax.servlet.ServletException For general Servlet exceptions. */ Loading Loading @@ -205,7 +202,7 @@ public class ResetPasswordServlet extends HttpServlet log.warn("No Privileged users configured."); } PluginFactory pluginFactory = new PluginFactory(); PluginFactory pluginFactory = getPluginFactory(); userPersistence = pluginFactory.createUserPersistence(); } catch (Throwable t) Loading @@ -215,6 +212,13 @@ public class ResetPasswordServlet extends HttpServlet } } protected PluginFactory getPluginFactory() { return new PluginFactory(); } protected boolean isPrivilegedSubject(final HttpServletRequest request) { if (privilegedSubjects == null || privilegedSubjects.isEmpty()) Loading
cadc-access-control-server/src/main/java/ca/nrc/cadc/ac/server/web/UserRequestServlet.java +12 −10 Original line number Diff line number Diff line Loading @@ -118,25 +118,22 @@ public class UserRequestServlet extends HttpServlet * using input parameters read from it. Users who do augment * subject calls are constructed by taking the principals out of the ServletConfig * input parameter. * </p> * * <p> * The UserRequestServlet in the web deployment descriptor file * The UserRequestServlet configuration in the web deployment descriptor file * <code>web.xml</code> must have two input parameters: * <ul> * <li><code>ca.nrc.cadc.ac.server.web.UserRequestServlet.PrivilegedX500Principals</code> * is a list of trusted administrators DNs. It is a multi-line list with * line breaks between the trusted DNs and each DN eclosed in double quotes.</li> * is a list of trusted administrators DNs. Each DN must be enclosed in double quotes. * The list can be multi-line for readability.</li> * <li><code>ca.nrc.cadc.ac.server.web.UserRequestServlet.PrivilegedHttpPrincipals</code> * is a list of space separated userids (HTTP identities) corresponding * to the previous DNs.</li> * is a list of space separated userids (HTTP identities), enclosed in double quotes, * corresponding to the previous DNs.</li> * </ul> * The two lists of principal names must be of the same * length and correspond to each other in order. * </p> * * @param config The servlet configuration object. * @param response The HTTP Response. * * @throws javax.servlet.ServletException For general Servlet exceptions. */ Loading @@ -160,7 +157,6 @@ public class UserRequestServlet extends HttpServlet Pattern pattern = Pattern.compile("([^\"]\\S*|\".+?\")\\s*"); Matcher x500Matcher = pattern.matcher(x500Users); Matcher httpMatcher = pattern.matcher(httpUsers); while (x500Matcher.find()) { String next = x500Matcher.group(1); Loading Loading @@ -193,7 +189,7 @@ public class UserRequestServlet extends HttpServlet log.warn("No Privileged users configured."); } PluginFactory pluginFactory = new PluginFactory(); PluginFactory pluginFactory = getPluginFactory(); userPersistence = pluginFactory.createUserPersistence(); } catch (Throwable t) Loading @@ -203,6 +199,12 @@ public class UserRequestServlet extends HttpServlet } } protected PluginFactory getPluginFactory() { return new PluginFactory(); } /** * Create a UserAction and run the action safely. */ Loading
cadc-access-control-server/src/main/java/ca/nrc/cadc/ac/server/web/UserServlet.java +4 −7 Original line number Diff line number Diff line Loading @@ -118,25 +118,22 @@ public class UserServlet extends HttpServlet * using input parameters read from it. Users who do augment * subject calls are constructed by taking the principals out of the ServletConfig * input parameter. * </p> * * <p> * The UserServlet configuration in the web deployment descriptor file * <code>web.xml</code> must have two input parameters: * <ul> * <li><code>ca.nrc.cadc.ac.server.web.UserServlet.PrivilegedX500Principals</code> * is a list of trusted administrators DNs. It is a multi-line list with * line breaks between the trusted DNs and each DN eclosed in double quotes.</li> * is a list of trusted administrators DNs. Each DN must be enclosed in double quotes. * The list can be multi-line for readability.</li> * <li><code>ca.nrc.cadc.ac.server.web.UserServlet.PrivilegedHttpPrincipals</code> * is a list of space separated userids (HTTP identities) corresponding * to the previous DNs.</li> * is a list of space separated userids (HTTP identities), enclosed in double quotes, * corresponding to the previous DNs.</li> * </ul> * The two lists of principal names must be of the same * length and correspond to each other in order. * </p> * * @param config The servlet configuration object. * @param response The HTTP Response. * * @throws javax.servlet.ServletException For general Servlet exceptions. */ Loading