You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2013/11/05 09:22:32 UTC
svn commit: r1538902 [4/4] - in /syncope/branches/1_1_X:
client/src/main/java/org/apache/syncope/client/services/proxy/
client/src/test/java/org/apache/syncope/client/test/
common/src/main/java/org/apache/syncope/common/services/
common/src/main/java/o...
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java Tue Nov 5 08:22:31 2013
@@ -18,14 +18,16 @@
*/
package org.apache.syncope.core.rest.controller;
+import static org.apache.syncope.core.rest.controller.AbstractController.LOG;
+import java.lang.reflect.Method;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.syncope.common.mod.UserMod;
import org.apache.syncope.common.search.NodeCond;
import org.apache.syncope.common.services.InvalidSearchConditionException;
@@ -37,15 +39,10 @@ import org.apache.syncope.common.to.Prop
import org.apache.syncope.common.to.UserTO;
import org.apache.syncope.common.to.WorkflowFormTO;
import org.apache.syncope.common.types.AttributableType;
-import org.apache.syncope.common.types.AuditElements.Category;
-import org.apache.syncope.common.types.AuditElements.Result;
-import org.apache.syncope.common.types.AuditElements.UserSubCategory;
import org.apache.syncope.common.types.ResourceOperation;
import org.apache.syncope.common.types.SyncopeClientExceptionType;
import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
import org.apache.syncope.common.validation.SyncopeClientException;
-import org.apache.syncope.core.audit.AuditManager;
-import org.apache.syncope.core.notification.NotificationManager;
import org.apache.syncope.core.persistence.beans.PropagationTask;
import org.apache.syncope.core.persistence.beans.role.SyncopeRole;
import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
@@ -64,8 +61,6 @@ import org.apache.syncope.core.util.Attr
import org.apache.syncope.core.util.EntitlementUtil;
import org.apache.syncope.core.workflow.WorkflowResult;
import org.apache.syncope.core.workflow.user.UserWorkflowAdapter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -87,15 +82,7 @@ import org.springframework.web.servlet.M
*/
@Controller
@RequestMapping("/user")
-public class UserController {
-
- /**
- * Logger.
- */
- protected static final Logger LOG = LoggerFactory.getLogger(UserController.class);
-
- @Autowired
- protected AuditManager auditManager;
+public class UserController extends AbstractController<UserTO> {
@Autowired
protected UserDAO userDAO;
@@ -119,9 +106,6 @@ public class UserController {
protected PropagationTaskExecutor taskExecutor;
@Autowired
- protected NotificationManager notificationManager;
-
- @Autowired
protected AttributableTransformer attrTransformer;
@RequestMapping(method = RequestMethod.GET, value = "/verifyPassword/{username}")
@@ -134,8 +118,6 @@ public class UserController {
@PreAuthorize("hasRole('USER_READ')")
@Transactional(readOnly = true)
public Boolean verifyPasswordInternal(final String username, final String password) {
- auditManager.audit(Category.user, UserSubCategory.create, Result.success,
- "Verified password for: " + username);
return binder.verifyPassword(username, password);
}
@@ -181,9 +163,6 @@ public class UserController {
userTOs.add(binder.getUserTO(user));
}
- auditManager.audit(Category.user, UserSubCategory.list, Result.success,
- "Successfully listed all users: " + userTOs.size());
-
return userTOs;
}
@@ -199,9 +178,6 @@ public class UserController {
userTOs.add(binder.getUserTO(user));
}
- auditManager.audit(Category.user, UserSubCategory.list, Result.success,
- "Successfully listed all users (page=" + page + ", size=" + size + "): " + userTOs.size());
-
return userTOs;
}
@@ -209,36 +185,21 @@ public class UserController {
@RequestMapping(method = RequestMethod.GET, value = "/read/{userId}")
@Transactional(readOnly = true, rollbackFor = {Throwable.class})
public UserTO read(@PathVariable("userId") final Long userId) {
- UserTO result = binder.getUserTO(userId);
-
- auditManager.audit(Category.user, UserSubCategory.read, Result.success,
- "Successfully read user: " + userId);
-
- return result;
+ return binder.getUserTO(userId);
}
@PreAuthorize("#username == authentication.name or hasRole('USER_READ')")
@RequestMapping(method = RequestMethod.GET, value = "/readByUsername/{username}")
@Transactional(readOnly = true, rollbackFor = {Throwable.class})
public UserTO read(@PathVariable final String username) {
- UserTO result = binder.getUserTO(username);
-
- auditManager.audit(Category.user, UserSubCategory.read, Result.success,
- "Successfully read user: " + username);
-
- return result;
+ return binder.getUserTO(username);
}
@PreAuthorize("isAuthenticated()")
@RequestMapping(method = RequestMethod.GET, value = "/read/self")
@Transactional(readOnly = true)
public UserTO read() {
- UserTO userTO = binder.getAuthenticatedUserTO();
-
- auditManager.audit(Category.user, UserSubCategory.read, Result.success,
- "Successfully read own data: " + userTO.getUsername());
-
- return userTO;
+ return binder.getAuthenticatedUserTO();
}
@PreAuthorize("hasRole('USER_READ')")
@@ -273,9 +234,6 @@ public class UserController {
result.add(binder.getUserTO(user));
}
- auditManager.audit(Category.user, UserSubCategory.read, Result.success,
- "Successfully searched for users (page=" + page + ", size=" + size + "): " + result.size());
-
return result;
}
@@ -322,16 +280,11 @@ public class UserController {
propagationReporter.onPrimaryResourceFailure(tasks);
}
- notificationManager.createTasks(created.getResult().getKey(), created.getPerformedTasks());
-
final UserTO savedTO = binder.getUserTO(created.getResult().getKey());
savedTO.setPropagationStatusTOs(propagationReporter.getStatuses());
LOG.debug("About to return created user\n{}", savedTO);
- auditManager.audit(Category.user, UserSubCategory.create, Result.success,
- "Successfully created user: " + savedTO.getUsername());
-
return savedTO;
}
@@ -410,16 +363,10 @@ public class UserController {
propagationReporter.onPrimaryResourceFailure(tasks);
}
- // 3. create notification tasks
- notificationManager.createTasks(updated.getResult().getKey(), updated.getPerformedTasks());
-
// 4. prepare result, including propagation status on external resources
final UserTO updatedTO = binder.getUserTO(updated.getResult().getKey());
updatedTO.setPropagationStatusTOs(propagationReporter.getStatuses());
- auditManager.audit(Category.user, UserSubCategory.update, Result.success,
- "Successfully updated user: " + updatedTO.getUsername());
-
LOG.debug("About to return updated user\n{}", updatedTO);
return updatedTO;
@@ -585,15 +532,10 @@ public class UserController {
taskExecutor.execute(tasks);
- notificationManager.createTasks(updated.getResult(), updated.getPerformedTasks());
-
final UserTO savedTO = binder.getUserTO(updated.getResult());
LOG.debug("About to return updated user\n{}", savedTO);
- auditManager.audit(Category.user, UserSubCategory.executeWorkflow, Result.success,
- "Successfully executed workflow action " + taskId + " on user: " + userTO.getUsername());
-
return savedTO;
}
@@ -601,12 +543,7 @@ public class UserController {
@RequestMapping(method = RequestMethod.GET, value = "/workflow/form/list")
@Transactional(rollbackFor = {Throwable.class})
public List<WorkflowFormTO> getForms() {
- List<WorkflowFormTO> forms = uwfAdapter.getForms();
-
- auditManager.audit(Category.user, UserSubCategory.getForms, Result.success,
- "Successfully list workflow forms: " + forms.size());
-
- return forms;
+ return uwfAdapter.getForms();
}
@PreAuthorize("hasRole('WORKFLOW_FORM_READ') and hasRole('USER_READ')")
@@ -614,25 +551,14 @@ public class UserController {
@Transactional(rollbackFor = {Throwable.class})
public WorkflowFormTO getFormForUser(@PathVariable("userId") final Long userId) {
SyncopeUser user = binder.getUserFromId(userId);
- WorkflowFormTO result = uwfAdapter.getForm(user.getWorkflowId());
-
- auditManager.audit(Category.user, UserSubCategory.getFormForUser, Result.success,
- "Successfully read workflow form for user: " + user.getUsername());
-
- return result;
+ return uwfAdapter.getForm(user.getWorkflowId());
}
@PreAuthorize("hasRole('WORKFLOW_FORM_CLAIM')")
@RequestMapping(method = RequestMethod.GET, value = "/workflow/form/claim/{taskId}")
@Transactional(rollbackFor = {Throwable.class})
public WorkflowFormTO claimForm(@PathVariable("taskId") final String taskId) {
- WorkflowFormTO result = uwfAdapter.claimForm(taskId,
- SecurityContextHolder.getContext().getAuthentication().getName());
-
- auditManager.audit(Category.user, UserSubCategory.claimForm, Result.success,
- "Successfully claimed workflow form: " + taskId);
-
- return result;
+ return uwfAdapter.claimForm(taskId, SecurityContextHolder.getContext().getAuthentication().getName());
}
@PreAuthorize("hasRole('WORKFLOW_FORM_SUBMIT')")
@@ -661,9 +587,6 @@ public class UserController {
final UserTO savedTO = binder.getUserTO(updated.getResult().getKey());
- auditManager.audit(Category.user, UserSubCategory.submitForm, Result.success,
- "Successfully submitted workflow form for user: " + savedTO.getUsername());
-
LOG.debug("About to return user after form processing\n{}", savedTO);
return savedTO;
@@ -688,14 +611,17 @@ public class UserController {
}
List<PropagationTask> tasks = propagationManager.getUserUpdateTaskIds(user, status, resourcesToBeExcluded);
- taskExecutor.execute(tasks);
-
- notificationManager.createTasks(updated.getResult(), updated.getPerformedTasks());
+ PropagationReporter propReporter =
+ ApplicationContextProvider.getApplicationContext().getBean(PropagationReporter.class);
+ try {
+ taskExecutor.execute(tasks, propReporter);
+ } catch (PropagationException e) {
+ LOG.error("Error propagation primary resource", e);
+ propReporter.onPrimaryResourceFailure(tasks);
+ }
final UserTO savedTO = binder.getUserTO(updated.getResult());
-
- auditManager.audit(Category.user, UserSubCategory.setStatus, Result.success,
- "Successfully changed status to " + savedTO.getStatus() + " for user: " + savedTO.getUsername());
+ savedTO.setPropagationStatusTOs(propReporter.getStatuses());
LOG.debug("About to return updated user\n{}", savedTO);
@@ -722,9 +648,6 @@ public class UserController {
owned.add(role.getId() + " " + role.getName());
}
- auditManager.audit(Category.user, UserSubCategory.delete, Result.failure,
- "Could not delete user: " + userId + " because of role(s) ownership " + owned);
-
SyncopeClientCompositeErrorException sccee =
new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
@@ -740,7 +663,6 @@ public class UserController {
// information could only be available after uwfAdapter.delete(), which
// will also effectively remove user from db, thus making virtually
// impossible by NotificationManager to fetch required user information
- notificationManager.createTasks(userId, Collections.singleton("delete"));
List<PropagationTask> tasks = propagationManager.getUserDeleteTaskIds(userId);
@@ -760,9 +682,6 @@ public class UserController {
uwfAdapter.delete(userId);
- auditManager.audit(Category.user, UserSubCategory.delete, Result.success,
- "Successfully deleted user: " + userId);
-
LOG.debug("User successfully deleted: {}", userId);
return userTO;
@@ -814,4 +733,37 @@ public class UserController {
return res;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected UserTO resolveReference(final Method method, final Object... args) throws UnresolvedReferenceException {
+ Object id = null;
+
+ if (ArrayUtils.isNotEmpty(args) && !"claimForm".equals(method.getName())) {
+ for (int i = 0; id == null && i < args.length; i++) {
+ if (args[i] instanceof Long) {
+ id = (Long) args[i];
+ } else if (args[i] instanceof String) {
+ id = (String) args[i];
+ } else if (args[i] instanceof UserTO) {
+ id = ((UserTO) args[i]).getId();
+ } else if (args[i] instanceof UserMod) {
+ id = ((UserMod) args[i]).getId();
+ }
+ }
+ }
+
+ if (id != null) {
+ try {
+ return id instanceof Long ? binder.getUserTO((Long) id) : binder.getUserTO((String) id);
+ } catch (Throwable ignore) {
+ LOG.debug("Unresolved reference", ignore);
+ throw new UnresolvedReferenceException(ignore);
+ }
+ }
+
+ throw new UnresolvedReferenceException();
+ }
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserRequestController.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserRequestController.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserRequestController.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/UserRequestController.java Tue Nov 5 08:22:31 2013
@@ -18,26 +18,20 @@
*/
package org.apache.syncope.core.rest.controller;
+import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
-
import javax.persistence.RollbackException;
-
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.syncope.common.mod.UserMod;
import org.apache.syncope.common.to.UserRequestTO;
import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.common.types.AuditElements.Category;
-import org.apache.syncope.common.types.AuditElements.Result;
-import org.apache.syncope.common.types.AuditElements.UserRequestSubCategory;
-import org.apache.syncope.core.audit.AuditManager;
import org.apache.syncope.core.persistence.beans.SyncopeConf;
import org.apache.syncope.core.persistence.beans.UserRequest;
import org.apache.syncope.core.persistence.dao.ConfDAO;
import org.apache.syncope.core.persistence.dao.NotFoundException;
import org.apache.syncope.core.persistence.dao.UserRequestDAO;
import org.apache.syncope.core.rest.data.UserRequestDataBinder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
@@ -50,15 +44,7 @@ import org.springframework.web.servlet.M
@Controller
@RequestMapping("/user/request")
-public class UserRequestController {
-
- /**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(UserRequestController.class);
-
- @Autowired
- private AuditManager auditManager;
+public class UserRequestController extends AbstractController<UserRequestTO> {
@Autowired
private ConfDAO confDAO;
@@ -78,9 +64,6 @@ public class UserRequestController {
@RequestMapping(method = RequestMethod.GET, value = "/create/allowed")
@Transactional(readOnly = true)
public ModelAndView isCreateAllowed() {
- auditManager.audit(Category.userRequest, UserRequestSubCategory.isCreateAllowed, Result.success,
- "Successfully checked whether self create is allowed");
-
return new ModelAndView().addObject(isCreateAllowedByConf());
}
@@ -102,12 +85,7 @@ public class UserRequestController {
UserRequest request = new UserRequest();
request.setUserTO(userTO);
- request = userRequestDAO.save(request);
-
- auditManager.audit(Category.userRequest, UserRequestSubCategory.create, Result.success,
- "Successfully created user request for " + request.getUserTO().getUsername());
-
- return binder.getUserRequestTO(request);
+ return binder.getUserRequestTO(userRequestDAO.save(request));
}
@PreAuthorize("isAuthenticated()")
@@ -123,12 +101,7 @@ public class UserRequestController {
UserRequest request = new UserRequest();
request.setUserMod(userMod);
- request = userRequestDAO.save(request);
-
- auditManager.audit(Category.userRequest, UserRequestSubCategory.update, Result.success,
- "Successfully updated user request for " + request.getUserMod().getUsername());
-
- return binder.getUserRequestTO(request);
+ return binder.getUserRequestTO(userRequestDAO.save(request));
}
@PreAuthorize("hasRole('USER_REQUEST_LIST')")
@@ -136,14 +109,9 @@ public class UserRequestController {
@Transactional(readOnly = true)
public List<UserRequestTO> list() {
List<UserRequestTO> result = new ArrayList<UserRequestTO>();
-
for (UserRequest request : userRequestDAO.findAll()) {
result.add(binder.getUserRequestTO(request));
}
-
- auditManager.audit(Category.userRequest, UserRequestSubCategory.list, Result.success,
- "Successfully listed all user requests: " + result.size());
-
return result;
}
@@ -155,10 +123,6 @@ public class UserRequestController {
if (request == null) {
throw new NotFoundException("User request " + requestId);
}
-
- auditManager.audit(Category.userRequest, UserRequestSubCategory.read, Result.success,
- "Successfully read user request for " + request.getUserTO().getUsername());
-
return binder.getUserRequestTO(request);
}
@@ -175,12 +139,7 @@ public class UserRequestController {
UserRequest request = new UserRequest();
request.setUserId(userId);
- request = userRequestDAO.save(request);
-
- auditManager.audit(Category.userRequest, UserRequestSubCategory.delete, Result.success,
- "Successfully deleted user request for user" + userId);
-
- return binder.getUserRequestTO(request);
+ return binder.getUserRequestTO(userRequestDAO.save(request));
}
@PreAuthorize("hasRole('USER_REQUEST_DELETE')")
@@ -192,12 +151,25 @@ public class UserRequestController {
}
UserRequestTO requestToDelete = binder.getUserRequestTO(request);
-
- auditManager.audit(Category.userRequest, UserRequestSubCategory.delete, Result.success,
- "Successfully deleted user request for user" + request.getUserId());
-
userRequestDAO.delete(requestId);
-
return requestToDelete;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected UserRequestTO resolveReference(final Method method, final Object... obj) {
+ final UserRequestTO result;
+
+ if (ArrayUtils.isNotEmpty(obj) && obj[0] instanceof Long
+ && ("deleteRequest".equals(method.getName()) || "read".equals(method.getName()))) {
+ final UserRequest request = userRequestDAO.find((Long) obj[0]);
+ result = request == null ? null : binder.getUserRequestTO(request);
+ } else {
+ result = null;
+ }
+
+ return result;
+ }
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java Tue Nov 5 08:22:31 2013
@@ -18,19 +18,17 @@
*/
package org.apache.syncope.core.rest.controller;
+import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityExistsException;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.syncope.common.to.VirtualSchemaTO;
-import org.apache.syncope.common.types.AuditElements.Category;
-import org.apache.syncope.common.types.AuditElements.Result;
-import org.apache.syncope.common.types.AuditElements.SchemaSubCategory;
import org.apache.syncope.common.types.SyncopeClientExceptionType;
import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
import org.apache.syncope.common.validation.SyncopeClientException;
-import org.apache.syncope.core.audit.AuditManager;
import org.apache.syncope.core.persistence.beans.AbstractVirSchema;
import org.apache.syncope.core.persistence.dao.NotFoundException;
import org.apache.syncope.core.persistence.dao.VirSchemaDAO;
@@ -47,10 +45,7 @@ import org.springframework.web.bind.anno
@Controller
@RequestMapping("/virtualSchema")
-public class VirtualSchemaController extends AbstractController {
-
- @Autowired
- private AuditManager auditManager;
+public class VirtualSchemaController extends AbstractTransactionalController<VirtualSchemaTO> {
@Autowired
private VirSchemaDAO virSchemaDAO;
@@ -80,10 +75,6 @@ public class VirtualSchemaController ext
}
AbstractVirSchema virSchema = virSchemaDAO.save(binder.create(virSchemaTO, attrUtil.newVirSchema()));
-
- auditManager.audit(Category.schema, SchemaSubCategory.createVirtual, Result.success,
- "Successfully created virtual schema: " + kind + "/" + virSchema.getName());
-
response.setStatus(HttpServletResponse.SC_CREATED);
return binder.getVirtualSchemaTO(virSchema);
}
@@ -97,10 +88,6 @@ public class VirtualSchemaController ext
for (AbstractVirSchema virSchema : virSchemaDAO.findAll(reference)) {
virtualSchemaTOs.add(binder.getVirtualSchemaTO(virSchema));
}
-
- auditManager.audit(Category.schema, SchemaSubCategory.listVirtual, Result.success,
- "Successfully listed all virtual schemas: " + kind + "/" + virtualSchemaTOs.size());
-
return virtualSchemaTOs;
}
@@ -114,10 +101,6 @@ public class VirtualSchemaController ext
if (virtualSchema == null) {
throw new NotFoundException("Virtual schema '" + virtualSchemaName + "'");
}
-
- auditManager.audit(Category.schema, SchemaSubCategory.readVirtual, Result.success,
- "Successfully read virtual schema: " + kind + "/" + virtualSchema.getName());
-
return binder.getVirtualSchemaTO(virtualSchema);
}
@@ -133,12 +116,7 @@ public class VirtualSchemaController ext
}
virtualSchema = binder.update(virtualSchemaTO, virtualSchema);
- virtualSchema = virSchemaDAO.save(virtualSchema);
-
- auditManager.audit(Category.schema, SchemaSubCategory.updateVirtual, Result.success,
- "Successfully updated virtual schema: " + kind + "/" + virtualSchema.getName());
-
- return binder.getVirtualSchemaTO(virtualSchema);
+ return binder.getVirtualSchemaTO(virSchemaDAO.save(virtualSchema));
}
@PreAuthorize("hasRole('SCHEMA_DELETE')")
@@ -154,9 +132,41 @@ public class VirtualSchemaController ext
VirtualSchemaTO schemaToDelete = binder.getVirtualSchemaTO(virSchema);
virSchemaDAO.delete(virtualSchemaName, getAttributableUtil(kind));
-
- auditManager.audit(Category.schema, SchemaSubCategory.deleteVirtual, Result.success,
- "Successfully deleted virtual schema: " + kind + "/" + virSchema.getName());
return schemaToDelete;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected VirtualSchemaTO resolveReference(final Method method, final Object... args) throws
+ UnresolvedReferenceException {
+ String kind = null;
+ String name = null;
+
+ if (ArrayUtils.isNotEmpty(args)) {
+ for (int i = 0; (name == null || kind == null) && i < args.length; i++) {
+ if (args[i] instanceof String) {
+ if (kind == null) {
+ kind = (String) args[i];
+ } else {
+ name = (String) args[i];
+ }
+ } else if (args[i] instanceof VirtualSchemaTO) {
+ name = ((VirtualSchemaTO) args[i]).getName();
+ }
+ }
+ }
+
+ if (name != null) {
+ try {
+ return binder.getVirtualSchemaTO(virSchemaDAO.find(name, getAttributableUtil(kind).virSchemaClass()));
+ } catch (Throwable ignore) {
+ LOG.debug("Unresolved reference", ignore);
+ throw new UnresolvedReferenceException(ignore);
+ }
+ }
+
+ throw new UnresolvedReferenceException();
+ }
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java Tue Nov 5 08:22:31 2013
@@ -18,13 +18,9 @@
*/
package org.apache.syncope.core.rest.controller;
+import java.lang.reflect.Method;
import java.util.List;
-
import org.apache.syncope.common.to.WorkflowDefinitionTO;
-import org.apache.syncope.common.types.AuditElements.Category;
-import org.apache.syncope.common.types.AuditElements.Result;
-import org.apache.syncope.common.types.AuditElements.WorkflowSubCategory;
-import org.apache.syncope.core.audit.AuditManager;
import org.apache.syncope.core.workflow.WorkflowAdapter;
import org.apache.syncope.core.workflow.WorkflowException;
import org.apache.syncope.core.workflow.role.RoleWorkflowAdapter;
@@ -40,10 +36,7 @@ import org.springframework.web.servlet.M
@Controller
@RequestMapping("/workflow")
-public class WorkflowController extends AbstractController {
-
- @Autowired
- private AuditManager auditManager;
+public class WorkflowController extends AbstractTransactionalController<WorkflowDefinitionTO> {
@Autowired
private UserWorkflowAdapter uwfAdapter;
@@ -53,10 +46,6 @@ public class WorkflowController extends
private WorkflowDefinitionTO getDefinition(final WorkflowAdapter adapter) throws WorkflowException {
WorkflowDefinitionTO result = adapter.getDefinition();
-
- auditManager.audit(Category.workflow, WorkflowSubCategory.getDefinition, Result.success,
- "Successfully read workflow definition");
-
return result;
}
@@ -76,9 +65,6 @@ public class WorkflowController extends
private void updateDefinition(final WorkflowAdapter adapter, final WorkflowDefinitionTO definition) {
adapter.updateDefinition(definition);
-
- auditManager.audit(Category.workflow, WorkflowSubCategory.updateDefinition, Result.success,
- "Successfully updated workflow definition");
}
@PreAuthorize("hasRole('WORKFLOW_DEF_UPDATE')")
@@ -94,12 +80,7 @@ public class WorkflowController extends
}
private List<String> getDefinedTasks(final WorkflowAdapter adapter) {
- List<String> definedTasks = adapter.getDefinedTasks();
-
- auditManager.audit(Category.workflow, WorkflowSubCategory.getDefinedTasks, Result.success,
- "Successfully got the list of defined workflow tasks: " + definedTasks.size());
-
- return definedTasks;
+ return adapter.getDefinedTasks();
}
@PreAuthorize("hasRole('WORKFLOW_TASK_LIST')")
@@ -113,4 +94,13 @@ public class WorkflowController extends
public ModelAndView getDefinedRoleTasks() {
return new ModelAndView().addObject(getDefinedTasks(rwfAdapter));
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected WorkflowDefinitionTO resolveReference(final Method method, final Object... args)
+ throws UnresolvedReferenceException {
+ throw new UnresolvedReferenceException();
+ }
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/NotificationDataBinder.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/NotificationDataBinder.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/NotificationDataBinder.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/NotificationDataBinder.java Tue Nov 5 08:22:31 2013
@@ -42,15 +42,12 @@ public class NotificationDataBinder {
public Notification createNotification(final NotificationTO notificationTO) {
Notification result = new Notification();
-
updateNotification(result, notificationTO);
-
return result;
}
public void updateNotification(final Notification notification, final NotificationTO notificationTO) {
BeanUtils.copyProperties(notificationTO, notification, IGNORE_PROPERTIES);
-
notification.setAbout(notificationTO.getAbout());
notification.setRecipients(notificationTO.getRecipients());
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java Tue Nov 5 08:22:31 2013
@@ -91,7 +91,7 @@ public class SchemaDataBinder {
populate(schema, schemaTO);
}
- public <T extends AbstractSchema> SchemaTO getSchemaTO(final T schema, final AttributableUtil attributableUtil) {
+ public <T extends AbstractSchema> SchemaTO getSchemaTO(final T schema) {
SchemaTO schemaTO = new SchemaTO();
BeanUtils.copyProperties(schema, schemaTO);
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java Tue Nov 5 08:22:31 2013
@@ -53,7 +53,6 @@ import org.apache.syncope.core.propagati
import org.apache.syncope.core.rest.controller.UnauthorizedRoleException;
import org.apache.syncope.core.util.AttributableUtil;
import org.apache.syncope.core.util.EntitlementUtil;
-import org.apache.syncope.core.util.MappingUtil;
import org.apache.syncope.core.util.PasswordEncoder;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/security/SyncopeAuthenticationProvider.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/security/SyncopeAuthenticationProvider.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/security/SyncopeAuthenticationProvider.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/security/SyncopeAuthenticationProvider.java Tue Nov 5 08:22:31 2013
@@ -20,8 +20,7 @@ package org.apache.syncope.core.security
import java.util.Date;
import javax.annotation.Resource;
-import org.apache.syncope.common.types.AuditElements.AuthenticationSubCategory;
-import org.apache.syncope.common.types.AuditElements.Category;
+import org.apache.syncope.common.types.AuditElements;
import org.apache.syncope.common.types.AuditElements.Result;
import org.apache.syncope.common.types.CipherAlgorithm;
import org.apache.syncope.core.audit.AuditManager;
@@ -119,7 +118,15 @@ public class SyncopeAuthenticationProvid
token.setDetails(authentication.getDetails());
- auditManager.audit(Category.authentication, AuthenticationSubCategory.login, Result.success,
+ auditManager.audit(
+ AuditElements.EventCategoryType.REST,
+ "AuthenticationController",
+ null,
+ "login",
+ Result.SUCCESS,
+ null,
+ authenticated,
+ authentication,
"Successfully authenticated, with roles: " + token.getAuthorities());
LOG.debug("User {} successfully authenticated, with roles {}",
@@ -136,7 +143,15 @@ public class SyncopeAuthenticationProvid
userDAO.save(user);
}
- auditManager.audit(Category.authentication, AuthenticationSubCategory.login, Result.failure,
+ auditManager.audit(
+ AuditElements.EventCategoryType.REST,
+ "AuthenticationController",
+ null,
+ "login",
+ Result.FAILURE,
+ null,
+ authenticated,
+ authentication,
"User " + authentication.getPrincipal() + " not authenticated");
LOG.debug("User {} not authenticated", authentication.getPrincipal());
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/LoggerServiceImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/LoggerServiceImpl.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/LoggerServiceImpl.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/LoggerServiceImpl.java Tue Nov 5 08:22:31 2013
@@ -18,6 +18,8 @@
*/
package org.apache.syncope.core.services;
+import static org.apache.syncope.common.types.LoggerType.AUDIT;
+import static org.apache.syncope.common.types.LoggerType.NORMAL;
import java.text.ParseException;
import java.util.List;
@@ -25,6 +27,7 @@ import javax.ws.rs.BadRequestException;
import javax.ws.rs.NotFoundException;
import org.apache.syncope.common.services.LoggerService;
+import org.apache.syncope.common.to.EventCategoryTO;
import org.apache.syncope.common.to.LoggerTO;
import org.apache.syncope.common.types.AuditLoggerName;
import org.apache.syncope.common.types.LoggerType;
@@ -110,4 +113,8 @@ public class LoggerServiceImpl implement
}
}
+ @Override
+ public List<EventCategoryTO> events() {
+ return loggerController.listAuditEvents();
+ }
}
Added: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java?rev=1538902&view=auto
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java (added)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java Tue Nov 5 08:22:31 2013
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2013 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.syncope.core.services;
+
+import java.lang.reflect.Method;
+import org.apache.syncope.common.types.AuditElements;
+import org.apache.syncope.core.audit.AuditManager;
+import org.apache.syncope.core.notification.NotificationManager;
+import org.apache.syncope.core.rest.controller.AbstractController;
+import org.apache.syncope.core.rest.controller.UnresolvedReferenceException;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+@Aspect
+public class ServiceHandler {
+
+ /**
+ * Logger.
+ */
+ private static final Logger LOG = LoggerFactory.getLogger(ServiceHandler.class);
+
+ @Autowired
+ private NotificationManager notificationManager;
+
+ @Autowired
+ private AuditManager auditManager;
+
+ @Around("within(@org.springframework.stereotype.Controller *)")
+ public Object around(final ProceedingJoinPoint joinPoint) throws Throwable {
+ final Class<?> clazz = joinPoint.getTarget().getClass();
+
+ final Object[] input = joinPoint.getArgs();
+
+ final String category = clazz.getSimpleName();
+
+ final MethodSignature ms = (MethodSignature) joinPoint.getSignature();
+ Method method = ms.getMethod();
+
+ final String event = joinPoint.getSignature().getName();
+
+ AuditElements.Result result = null;
+ Object output = null;
+ Object before = null;
+
+ try {
+ LOG.debug("Before {}.{}({})",
+ new Object[] {clazz.getSimpleName(), event, input == null || input.length == 0 ? "" : "..."});
+
+ try {
+ before = ((AbstractController) joinPoint.getTarget()).resolveBeanReference(method, input);
+ } catch (UnresolvedReferenceException ignore) {
+ LOG.debug("Unresolved bean reference ...");
+ }
+
+ output = joinPoint.proceed();
+ result = AuditElements.Result.SUCCESS;
+
+ LOG.debug("After returning {}.{}", clazz.getSimpleName(), event);
+ return output;
+ } catch (Throwable t) {
+ output = t;
+ result = AuditElements.Result.FAILURE;
+
+ LOG.debug("After throwing {}.{}", clazz.getSimpleName(), event);
+ throw t;
+ } finally {
+ notificationManager.createTasks(
+ AuditElements.EventCategoryType.REST,
+ category,
+ null,
+ event,
+ result,
+ before,
+ output,
+ input);
+
+ auditManager.audit(
+ AuditElements.EventCategoryType.REST,
+ category,
+ null,
+ event,
+ result,
+ before,
+ output,
+ input);
+ }
+ }
+}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java Tue Nov 5 08:22:31 2013
@@ -29,7 +29,10 @@ import org.apache.syncope.common.mod.Mem
import org.apache.syncope.common.mod.UserMod;
import org.apache.syncope.common.to.AbstractAttributableTO;
import org.apache.syncope.common.to.RoleTO;
+import org.apache.syncope.common.types.AuditElements;
+import org.apache.syncope.common.types.AuditElements.Result;
import org.apache.syncope.common.types.ConnConfProperty;
+import org.apache.syncope.core.audit.AuditManager;
import org.apache.syncope.core.notification.NotificationManager;
import org.apache.syncope.core.persistence.beans.ConnInstance;
import org.apache.syncope.core.persistence.beans.ExternalResource;
@@ -82,6 +85,9 @@ public class LDAPMembershipSyncActions e
@Autowired
private NotificationManager notificationManager;
+ @Autowired
+ private AuditManager auditManager;
+
protected Map<Long, Long> membersBeforeRoleUpdate = Collections.<Long, Long>emptyMap();
/**
@@ -97,12 +103,12 @@ public class LDAPMembershipSyncActions e
while (propertyIterator.hasNext()) {
ConnConfProperty property = propertyIterator.next();
if ("groupMemberAttribute".equals(property.getSchema().getName())
- && property.getValues() != null && !property.getValues().isEmpty()) {
- groupMembershipName = (String)property.getValues().get(0);
+ && property.getValues() != null && !property.getValues().isEmpty()) {
+ groupMembershipName = (String) property.getValues().get(0);
break;
}
}
-
+
return groupMembershipName;
}
@@ -170,7 +176,7 @@ public class LDAPMembershipSyncActions e
protected List<Object> getMembAttrValues(final SyncDelta delta, final Connector connector) {
List<Object> result = Collections.<Object>emptyList();
String groupMemberName = getGroupMembershipAttrName(connector);
-
+
// first, try to read the configured attribute from delta, returned by the ongoing synchronization
Attribute membAttr = delta.getObject().getAttributeByName(groupMemberName);
// if not found, perform an additional read on the underlying connector for the same connector object
@@ -197,8 +203,12 @@ public class LDAPMembershipSyncActions e
return;
}
+ Result result;
+
+ WorkflowResult<Map.Entry<Long, Boolean>> updated = null;
+
try {
- WorkflowResult<Map.Entry<Long, Boolean>> updated = uwfAdapter.update(userMod);
+ updated = uwfAdapter.update(userMod);
List<PropagationTask> tasks = propagationManager.getUserUpdateTaskIds(updated,
userMod.getPassword(), userMod.getVirtualAttributesToBeRemoved(),
@@ -206,13 +216,37 @@ public class LDAPMembershipSyncActions e
Collections.singleton(resourceName));
taskExecutor.execute(tasks);
+ result = Result.SUCCESS;
- notificationManager.createTasks(updated.getResult().getKey(), updated.getPerformedTasks());
} catch (PropagationException e) {
+ result = Result.FAILURE;
LOG.error("Could not propagate {}", userMod, e);
} catch (Exception e) {
+ result = Result.FAILURE;
LOG.error("Could not perform update {}", userMod, e);
}
+
+ notificationManager.createTasks(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ this.getClass().getSimpleName(),
+ null,
+ "update",
+ result,
+ null, // searching for before object is too much expensive ...
+ updated == null ? null : updated.getResult().getKey(),
+ userMod,
+ resourceName);
+
+ auditManager.audit(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ this.getClass().getSimpleName(),
+ null,
+ "update",
+ result,
+ null, // searching for before object is too much expensive ...
+ updated == null ? null : updated.getResult().getKey(),
+ userMod,
+ resourceName);
}
/**
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/sync/impl/SyncopeSyncResultHandler.java Tue Nov 5 08:22:31 2013
@@ -39,10 +39,13 @@ import org.apache.syncope.common.to.Attr
import org.apache.syncope.common.to.RoleTO;
import org.apache.syncope.common.to.UserTO;
import org.apache.syncope.common.types.AttributableType;
+import org.apache.syncope.common.types.AuditElements;
+import org.apache.syncope.common.types.AuditElements.Result;
import org.apache.syncope.common.types.ConflictResolutionAction;
import org.apache.syncope.common.types.MappingPurpose;
import org.apache.syncope.common.types.ResourceOperation;
import org.apache.syncope.common.types.SyncPolicySpec;
+import org.apache.syncope.core.audit.AuditManager;
import org.apache.syncope.core.connid.ConnObjectUtil;
import org.apache.syncope.core.notification.NotificationManager;
import org.apache.syncope.core.persistence.beans.AbstractAttrValue;
@@ -185,6 +188,12 @@ public class SyncopeSyncResultHandler im
@Autowired
protected NotificationManager notificationManager;
+ /**
+ * Audit Manager.
+ */
+ @Autowired
+ protected AuditManager auditManager;
+
@Autowired
protected AttributableTransformer attrTransformer;
@@ -535,6 +544,9 @@ public class SyncopeSyncResultHandler im
result.setName(((RoleTO) actual).getName());
}
} else {
+ Object output = null;
+ Result resultStatus;
+
try {
if (AttributableType.USER == attrUtil.getType()) {
Boolean enabled = readEnabled(delta.getObject());
@@ -547,14 +559,11 @@ public class SyncopeSyncResultHandler im
taskExecutor.execute(tasks);
- notificationManager.createTasks(created.getResult().getKey(), created.getPerformedTasks());
-
actual = userDataBinder.getUserTO(created.getResult().getKey());
result.setId(created.getResult().getKey());
result.setName(((UserTO) actual).getUsername());
- }
- if (AttributableType.ROLE == attrUtil.getType()) {
+ } else if (AttributableType.ROLE == attrUtil.getType()) {
WorkflowResult<Long> created = rwfAdapter.create((RoleTO) actual);
AttributeTO roleOwner = actual.getAttributeMap().get(StringUtils.EMPTY);
if (roleOwner != null) {
@@ -574,15 +583,42 @@ public class SyncopeSyncResultHandler im
result.setName(((RoleTO) actual).getName());
}
+ output = subjectTO;
+ resultStatus = Result.SUCCESS;
+
} catch (PropagationException e) {
// A propagation failure doesn't imply a synchronization failure.
// The propagation exception status will be reported into the propagation task execution.
LOG.error("Could not propagate {} {}", attrUtil.getType(), delta.getUid().getUidValue(), e);
+ output = e;
+ resultStatus = Result.FAILURE;
} catch (Exception e) {
result.setStatus(SyncResult.Status.FAILURE);
result.setMessage(e.getMessage());
LOG.error("Could not create {} {} ", attrUtil.getType(), delta.getUid().getUidValue(), e);
+ output = e;
+ resultStatus = Result.FAILURE;
}
+
+ notificationManager.createTasks(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ AttributableType.USER.name().toLowerCase(),
+ syncTask.getResource().getName(),
+ "create",
+ resultStatus,
+ null, // searching for before object is too much expensive ...
+ output,
+ delta);
+
+ auditManager.audit(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ AttributableType.USER.name().toLowerCase(),
+ syncTask.getResource().getName(),
+ "create",
+ resultStatus,
+ null, // searching for before object is too much expensive ...
+ output,
+ delta);
}
actions.after(this, delta, actual, result);
@@ -650,8 +686,6 @@ public class SyncopeSyncResultHandler im
taskExecutor.execute(tasks);
- notificationManager.createTasks(updated.getResult().getKey(), updated.getPerformedTasks());
-
userTO = userDataBinder.getUserTO(updated.getResult().getKey());
actions.after(this, delta, userTO, result);
@@ -717,6 +751,9 @@ public class SyncopeSyncResultHandler im
for (Long id : subjects) {
LOG.debug("About to update {}", id);
+ Object output = null;
+ Result resultStatus;
+
final SyncResult result = new SyncResult();
result.setOperation(ResourceOperation.UPDATE);
result.setSubjectType(attrUtil.getType());
@@ -724,27 +761,55 @@ public class SyncopeSyncResultHandler im
result.setId(id);
try {
+ final AbstractAttributableTO updated;
if (AttributableType.USER == attrUtil.getType()) {
- UserTO updated = updateUser(id, delta, dryRun, result);
- result.setName(updated.getUsername());
- }
-
- if (AttributableType.ROLE == attrUtil.getType()) {
- RoleTO updated = updateRole(id, delta, dryRun, result);
- result.setName(updated.getName());
+ updated = updateUser(id, delta, dryRun, result);
+ result.setName(((UserTO) updated).getUsername());
+ } else if (AttributableType.ROLE == attrUtil.getType()) {
+ updated = updateRole(id, delta, dryRun, result);
+ result.setName(((RoleTO) updated).getName());
+ } else {
+ updated = null;
}
+ output = updated;
+ resultStatus = Result.SUCCESS;
} catch (PropagationException e) {
// A propagation failure doesn't imply a synchronization failure.
// The propagation exception status will be reported into the propagation task execution.
LOG.error("Could not propagate {} {}", attrUtil.getType(), delta.getUid().getUidValue(), e);
+ output = e;
+ resultStatus = Result.FAILURE;
} catch (Exception e) {
result.setStatus(SyncResult.Status.FAILURE);
result.setMessage(e.getMessage());
-
LOG.error("Could not update {} {}", attrUtil.getType(), delta.getUid().getUidValue(), e);
+ output = e;
+ resultStatus = Result.FAILURE;
}
updResults.add(result);
+ if (!dryRun) {
+ notificationManager.createTasks(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ attrUtil.getType().name().toLowerCase(),
+ syncTask.getResource().getName(),
+ "update",
+ resultStatus,
+ null, // searching for before object is too much expensive ...
+ output,
+ delta);
+
+ auditManager.audit(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ attrUtil.getType().name().toLowerCase(),
+ syncTask.getResource().getName(),
+ "update",
+ resultStatus,
+ null, // searching for before object is too much expensive ...
+ output,
+ delta);
+ }
+
LOG.debug("{} {} successfully updated", attrUtil.getType(), id);
}
@@ -765,6 +830,9 @@ public class SyncopeSyncResultHandler im
List<SyncResult> delResults = new ArrayList<SyncResult>();
for (Long id : subjects) {
+ Object output = null;
+ Result resultStatus = Result.FAILURE;
+
try {
AbstractAttributableTO subjectTO = AttributableType.USER == attrUtil.getType()
? userDataBinder.getUserTO(id)
@@ -788,9 +856,7 @@ public class SyncopeSyncResultHandler im
List<PropagationTask> tasks = Collections.<PropagationTask>emptyList();
if (AttributableType.USER == attrUtil.getType()) {
tasks = propagationManager.getUserDeleteTaskIds(id, syncTask.getResource().getName());
- notificationManager.createTasks(id, Collections.<String>singleton("delete"));
- }
- if (AttributableType.ROLE == attrUtil.getType()) {
+ } else if (AttributableType.ROLE == attrUtil.getType()) {
tasks = propagationManager.getRoleDeleteTaskIds(id, syncTask.getResource().getName());
}
taskExecutor.execute(tasks);
@@ -803,24 +869,49 @@ public class SyncopeSyncResultHandler im
try {
if (AttributableType.USER == attrUtil.getType()) {
uwfAdapter.delete(id);
- }
- if (AttributableType.ROLE == attrUtil.getType()) {
+ } else if (AttributableType.ROLE == attrUtil.getType()) {
rwfAdapter.delete(id);
}
+ output = null;
+ resultStatus = Result.SUCCESS;
} catch (Exception e) {
result.setStatus(SyncResult.Status.FAILURE);
result.setMessage(e.getMessage());
LOG.error("Could not delete {} {}", attrUtil.getType(), id, e);
+ output = e;
}
}
actions.after(this, delta, subjectTO, result);
delResults.add(result);
+
} catch (NotFoundException e) {
LOG.error("Could not find {} {}", attrUtil.getType(), id, e);
} catch (UnauthorizedRoleException e) {
LOG.error("Not allowed to read {} {}", attrUtil.getType(), id, e);
}
+
+ if (!dryRun) {
+ notificationManager.createTasks(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ attrUtil.getType().name().toLowerCase(),
+ syncTask.getResource().getName(),
+ "delete",
+ resultStatus,
+ null, // searching for before object is too much expensive ...
+ output,
+ delta);
+
+ auditManager.audit(
+ AuditElements.EventCategoryType.SYNCHRONIZATION,
+ attrUtil.getType().name().toLowerCase(),
+ syncTask.getResource().getName(),
+ "delete",
+ resultStatus,
+ null, // searching for before object is too much expensive ...
+ output,
+ delta);
+ }
}
return delResults;
@@ -876,9 +967,7 @@ public class SyncopeSyncResultHandler im
default:
}
}
- }
-
- if (SyncDeltaType.DELETE == delta.getDeltaType()) {
+ } else if (SyncDeltaType.DELETE == delta.getDeltaType()) {
if (subjectIds.isEmpty()) {
LOG.debug("No match found for deletion");
} else if (subjectIds.size() == 1) {
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowUserSuspender.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowUserSuspender.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowUserSuspender.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowUserSuspender.java Tue Nov 5 08:22:31 2013
@@ -21,13 +21,11 @@ package org.apache.syncope.core.workflow
import java.util.AbstractMap.SimpleEntry;
import java.util.List;
import java.util.Map;
-import org.apache.syncope.common.to.UserTO;
import org.apache.syncope.core.persistence.beans.PropagationTask;
import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
import org.apache.syncope.core.policy.UserSuspender;
import org.apache.syncope.core.propagation.PropagationTaskExecutor;
import org.apache.syncope.core.propagation.impl.PropagationManager;
-import org.apache.syncope.core.rest.data.UserDataBinder;
import org.apache.syncope.core.workflow.user.UserWorkflowAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,9 +46,6 @@ public class WorkflowUserSuspender imple
@Autowired
private PropagationTaskExecutor taskExecutor;
- @Autowired
- private UserDataBinder userDataBinder;
-
@Override
public void suspend(final SyncopeUser user, final boolean suspend) {
try {
Modified: syncope/branches/1_1_X/core/src/main/resources/restContext.xml
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/restContext.xml?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/restContext.xml (original)
+++ syncope/branches/1_1_X/core/src/main/resources/restContext.xml Tue Nov 5 08:22:31 2013
@@ -22,6 +22,7 @@ under the License.
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:oxm="http://www.springframework.org/schema/oxm"
+ xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxrs
@@ -29,7 +30,9 @@ under the License.
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/oxm
- http://www.springframework.org/schema/oxm/spring-oxm.xsd">
+ http://www.springframework.org/schema/oxm/spring-oxm.xsd
+ http://www.springframework.org/schema/aop
+ http://www.springframework.org/schema/aop/spring-aop.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
@@ -38,6 +41,8 @@ under the License.
<!-- CXF Configuration - BEGIN -->
<context:component-scan base-package="org.apache.syncope.core.services"/>
+
+ <bean id="serviceHandler" name="serviceHandler" class="org.apache.syncope.core.services.ServiceHandler" />
<bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
<property name="depthProperties">
Modified: syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java (original)
+++ syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java Tue Nov 5 08:22:31 2013
@@ -18,9 +18,9 @@
*/
package org.apache.syncope.core.notification;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
import com.icegreen.greenmail.util.GreenMail;
import com.icegreen.greenmail.util.ServerSetup;
@@ -193,6 +193,7 @@ public class NotificationTest {
messages[i].setFlag(Flag.DELETED, true);
}
}
+
inbox.close(true);
store.close();
return found;
@@ -202,7 +203,7 @@ public class NotificationTest {
public void notifyByMail() throws Exception {
// 1. create suitable notification for subsequent tests
Notification notification = new Notification();
- notification.addEvent("create");
+ notification.addEvent("[REST]:[UserController]:[]:[create]:[SUCCESS]");
MembershipCond membCond = new MembershipCond();
membCond.setRoleId(7L);
@@ -258,7 +259,7 @@ public class NotificationTest {
public void issueSYNCOPE192() throws Exception {
// 1. create suitable notification for subsequent tests
Notification notification = new Notification();
- notification.addEvent("create");
+ notification.addEvent("[REST]:[UserController]:[]:[create]:[SUCCESS]");
MembershipCond membCond = new MembershipCond();
membCond.setRoleId(7L);
@@ -316,7 +317,7 @@ public class NotificationTest {
public void notifyByMailEmptyAbout() throws Exception {
// 1. create suitable notification for subsequent tests
Notification notification = new Notification();
- notification.addEvent("create");
+ notification.addEvent("[REST]:[UserController]:[]:[create]:[SUCCESS]");
notification.setAbout(null);
@@ -370,7 +371,7 @@ public class NotificationTest {
public void notifyByMailWithRetry() throws Exception {
// 1. create suitable notification for subsequent tests
Notification notification = new Notification();
- notification.addEvent("create");
+ notification.addEvent("[REST]:[UserController]:[]:[create]:[SUCCESS]");
notification.setAbout(null);
Modified: syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/LoggerTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/LoggerTestITCase.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/LoggerTestITCase.java (original)
+++ syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/LoggerTestITCase.java Tue Nov 5 08:22:31 2013
@@ -19,18 +19,26 @@
package org.apache.syncope.core.rest;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.text.ParseException;
import java.util.List;
+import org.apache.syncope.common.to.EventCategoryTO;
import org.apache.syncope.common.to.LoggerTO;
+import org.apache.syncope.common.types.AttributableType;
import org.apache.syncope.common.types.AuditElements;
+import org.apache.syncope.common.types.AuditElements.EventCategoryType;
import org.apache.syncope.common.types.AuditLoggerName;
import org.apache.syncope.common.types.LoggerType;
+import org.apache.syncope.common.types.ResourceOperation;
import org.apache.syncope.common.types.SyncopeLoggerLevel;
import org.apache.syncope.common.util.CollectionWrapper;
+import org.apache.syncope.core.rest.controller.ReportController;
+import org.apache.syncope.core.rest.controller.ResourceController;
+import org.apache.syncope.core.rest.controller.RoleController;
+import org.apache.syncope.core.rest.controller.UserController;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
@@ -86,8 +94,12 @@ public class LoggerTestITCase extends Ab
@Test
public void enableDisableAudit() {
- AuditLoggerName auditLoggerName = new AuditLoggerName(AuditElements.Category.report,
- AuditElements.ReportSubCategory.deleteExecution, AuditElements.Result.failure);
+ AuditLoggerName auditLoggerName = new AuditLoggerName(
+ EventCategoryType.REST,
+ ReportController.class.getSimpleName(),
+ null,
+ "deleteExecution",
+ AuditElements.Result.FAILURE);
List<AuditLoggerName> audits = CollectionWrapper.wrapLogger(loggerService.list(LoggerType.AUDIT));
assertNotNull(audits);
@@ -109,4 +121,96 @@ public class LoggerTestITCase extends Ab
assertNotNull(audits);
assertFalse(audits.contains(auditLoggerName));
}
+
+ @Test
+ public void listAuditEvents() {
+ final List<EventCategoryTO> events = loggerService.events();
+
+ boolean found = false;
+
+ for (EventCategoryTO eventCategoryTO : events) {
+ if (UserController.class.getSimpleName().equals(eventCategoryTO.getCategory())) {
+ assertEquals(EventCategoryType.REST, eventCategoryTO.getType());
+ assertTrue(eventCategoryTO.getEvents().contains("create"));
+ assertTrue(eventCategoryTO.getEvents().contains("createInternal"));
+ assertTrue(eventCategoryTO.getEvents().contains("list"));
+ assertFalse(eventCategoryTO.getEvents().contains("doDelete"));
+ assertFalse(eventCategoryTO.getEvents().contains("setStatus"));
+ assertFalse(eventCategoryTO.getEvents().contains("resolveReference"));
+ found = true;
+ }
+ }
+ assertTrue(found);
+
+ found = false;
+ for (EventCategoryTO eventCategoryTO : events) {
+ if (RoleController.class.getSimpleName().equals(eventCategoryTO.getCategory())) {
+ assertEquals(EventCategoryType.REST, eventCategoryTO.getType());
+ assertTrue(eventCategoryTO.getEvents().contains("create"));
+ assertTrue(eventCategoryTO.getEvents().contains("list"));
+ assertFalse(eventCategoryTO.getEvents().contains("resolveReference"));
+ found = true;
+ }
+ }
+ assertTrue(found);
+
+ found = false;
+ for (EventCategoryTO eventCategoryTO : events) {
+ if (ResourceController.class.getSimpleName().equals(eventCategoryTO.getCategory())) {
+ assertEquals(EventCategoryType.REST, eventCategoryTO.getType());
+ assertTrue(eventCategoryTO.getEvents().contains("create"));
+ assertTrue(eventCategoryTO.getEvents().contains("read"));
+ assertTrue(eventCategoryTO.getEvents().contains("delete"));
+ assertFalse(eventCategoryTO.getEvents().contains("resolveReference"));
+ found = true;
+ }
+ }
+ assertTrue(found);
+
+ found = false;
+ for (EventCategoryTO eventCategoryTO : events) {
+ if (AttributableType.USER.name().toLowerCase().equals(eventCategoryTO.getCategory())) {
+ if ("resource-ldap".equals(eventCategoryTO.getSubcategory())
+ && EventCategoryType.SYNCHRONIZATION == eventCategoryTO.getType()) {
+ assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.CREATE.name().toLowerCase()));
+ assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.UPDATE.name().toLowerCase()));
+ assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.DELETE.name().toLowerCase()));
+ found = true;
+ }
+ }
+ }
+ assertTrue(found);
+
+ found = false;
+ for (EventCategoryTO eventCategoryTO : events) {
+ if (AttributableType.USER.name().toLowerCase().equals(eventCategoryTO.getCategory())) {
+ if ("resource-csv".equals(eventCategoryTO.getSubcategory())
+ && EventCategoryType.PROPAGATION == eventCategoryTO.getType()) {
+ assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.CREATE.name().toLowerCase()));
+ assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.UPDATE.name().toLowerCase()));
+ assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.DELETE.name().toLowerCase()));
+ found = true;
+ }
+ }
+ }
+ assertTrue(found);
+
+ found = false;
+ for (EventCategoryTO eventCategoryTO : events) {
+ if (EventCategoryType.TASK == eventCategoryTO.getType()
+ && "SampleJob".equals(eventCategoryTO.getCategory())) {
+ found = true;
+ }
+ }
+ assertTrue(found);
+
+ found = false;
+ for (EventCategoryTO eventCategoryTO : events) {
+ if (EventCategoryType.TASK == eventCategoryTO.getType()
+ && "SyncJob".equals(eventCategoryTO.getCategory())) {
+ found = true;
+ }
+ }
+ assertTrue(found);
+ }
}
Modified: syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java (original)
+++ syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java Tue Nov 5 08:22:31 2013
@@ -516,7 +516,6 @@ public class TaskTestITCase extends Abst
List<NotificationTaskTO> tasks = (List<NotificationTaskTO>) taskService.list(TaskType.NOTIFICATION);
assertNotNull(tasks);
assertFalse(tasks.isEmpty());
-
NotificationTaskTO taskTO = null;
for (NotificationTaskTO task : tasks) {
if (sender.equals(task.getSender())) {
@@ -530,7 +529,7 @@ public class TaskTestITCase extends Abst
// 1. Create notification
NotificationTO notification = new NotificationTO();
notification.setTraceLevel(TraceLevel.FAILURES);
- notification.addEvent("create");
+ notification.addEvent("[REST]:[UserController]:[]:[create]:[SUCCESS]");
MembershipCond membCond = new MembershipCond();
membCond.setRoleId(7L);
Modified: syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java (original)
+++ syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Tue Nov 5 08:22:31 2013
@@ -253,7 +253,7 @@ public class UserTestITCase extends Abst
sce = null;
try {
- userTO = userService.update(userMod.getId(), userMod);
+ userService.update(userMod.getId(), userMod);
} catch (SyncopeClientCompositeErrorException scce) {
sce = scce.getException(SyncopeClientExceptionType.InvalidSyncopeUser);
}
@@ -829,7 +829,7 @@ public class UserTestITCase extends Abst
userMod.setId(userTO.getId());
userMod.setPassword("pass");
- userTO = userService.update(userMod.getId(), userMod);
+ userService.update(userMod.getId(), userMod);
}
@Test(expected = SyncopeClientCompositeErrorException.class)
@@ -843,7 +843,7 @@ public class UserTestITCase extends Abst
userMod.setId(userTO.getId());
userMod.setPassword("password123");
- userTO = userService.update(userMod.getId(), userMod);
+ userService.update(userMod.getId(), userMod);
}
@Test
@@ -1160,7 +1160,7 @@ public class UserTestITCase extends Abst
propagationRequestTO = new PropagationRequestTO();
propagationRequestTO.setOnSyncope(false);
propagationRequestTO.addResource(RESOURCE_NAME_LDAP);
- userTO = userService.suspend(userId, propagationRequestTO);
+ userService.suspend(userId, propagationRequestTO);
userTO = userService.reactivate(userId, propagationRequestTO);
assertNotNull(userTO);
assertEquals("suspended", userTO.getStatus());
Modified: syncope/branches/1_1_X/core/src/test/resources/content.xml
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/test/resources/content.xml?rev=1538902&r1=1538901&r2=1538902&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/test/resources/content.xml (original)
+++ syncope/branches/1_1_X/core/src/test/resources/content.xml Tue Nov 5 08:22:31 2013
@@ -830,7 +830,7 @@ under the License.
<ReportletConfInstance id="1" Report_id="1" serializedInstance="%3Corg.apache.syncope.common.report.UserReportletConf%3E%0A++%3Cname%3EtestUserReportlet%3C%2Fname%3E%0A++%3Cattrs%3E%0A++++%3Cstring%3Efullname%3C%2Fstring%3E%0A++++%3Cstring%3Egender%3C%2Fstring%3E%0A++%3C%2Fattrs%3E%0A++%3CderAttrs+class%3D%22singleton-list%22%3E%0A++++%3Cstring%3Ecn%3C%2Fstring%3E%0A++%3C%2FderAttrs%3E%0A++%3CvirAttrs+class%3D%22singleton-list%22%3E%0A++++%3Cstring%3Evirtualdata%3C%2Fstring%3E%0A++%3C%2FvirAttrs%3E%0A++%3Cfeatures+class%3D%22java.util.Arrays%24ArrayList%22%3E%0A++++%3Ca+class%3D%22org.apache.syncope.common.report.UserReportletConf%24Feature-array%22%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eid%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eusername%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.rep
ort.UserReportletConf_-Feature%3EworkflowId%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Estatus%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EcreationDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3ElastLoginDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EchangePwdDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EpasswordHistorySize%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EfailedLoginCount%3C%2Forg.apache.syncop
e.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Ememberships%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eresources%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++%3C%2Fa%3E%0A++%3C%2Ffeatures%3E%0A%3C%2Forg.apache.syncope.common.report.UserReportletConf%3E"/>
<ReportExec Report_id="1" id="1" status="SUCCESS" startDate="2012-02-26 15:40:04" endDate="2012-02-26 15:41:04"/>
- <SyncopeLogger logName="syncope.audit.authentication.getEntitlements.success" logLevel="DEBUG" logType="AUDIT"/>
+ <SyncopeLogger logName="syncope.audit.[REST]:[AuthenticationController]:[]:[getEntitlements]:[SUCCESS]" logLevel="DEBUG" logType="AUDIT"/>
<ACT_RU_EXECUTION ID_="4" REV_="2" PROC_INST_ID_="4" PROC_DEF_ID_="userWorkflow:1:3" ACT_ID_="active" IS_ACTIVE_="1" IS_CONCURRENT_="0" IS_SCOPE_="1" IS_EVENT_SCOPE_="0" SUSPENSION_STATE_="1"/>
<ACT_RU_TASK ID_="5" REV_="2" EXECUTION_ID_="4" PROC_INST_ID_="4" PROC_DEF_ID_="userWorkflow:1:3" NAME_="Active" TASK_DEF_KEY_="active" PRIORITY_="50" CREATE_TIME_="2013-02-25T17:19:03+0100"/>