private SecurityHandler makeSecurityHandler(String password) {
Constraint constraint = new Constraint(Constraint.__BASIC_AUTH, "user");
constraint.setAuthenticate(true);
constraint.setRoles(new String[]{"user"});
ConstraintMapping cm = new ConstraintMapping();
cm.setConstraint(constraint);
cm.setPathSpec("/*");
ConstraintSecurityHandler csh = new ConstraintSecurityHandler();
csh.setAuthenticator(new BasicAuthenticator());
csh.setRealmName("SecureRealm");
csh.addConstraintMapping(cm);
HashLoginService loginService = new HashLoginService();