AOP breaking security interceptor somehow..

Hello,

I’m trying to use AOP to audit logins. However as soon as I map the aspect in wirebox the login fails.
Comment out the mapAspect call and the login goes through no problem.

I’m not sure where to start debugging this.

the line in wirebox is:
mapAspect(“SecurityAuditAspect”).to(“aspects.SecurityAuditAspect”);

and the invokeMethod function in aspects.SecurityAuditAspect looks like this:

var refLocal = {};
var loginStruct = {};
loginStruct.target = arguments.invocation.getTargetName();
loginStruct.method = arguments.invocation.getMethod();
loginStruct.arguments = arguments.invocation.getArgs();
if(isdefined(“loginStruct.arguments.rc.password”))
{
loginStruct.arguments.rc.password = “”;
}

// log incoming call
log.info(serializeJSON(loginStruct));

// proceed execution
refLocal.results = arguments.invocation.proceed();

I’m using the coldbox.system.interceptors.Security interceptor, with the DB providing the rules. All that works fine, until I map the SecurityAuditAspect

any thoughts?

Cheers
Steve

I am only going to be guessing here, but I think it might be something to do with the order. Interceptors are run in a specific order, which is defined in the order they are created.

But on another note, what you could also look at, which you don’t clarify. Is that is the new interceptor having or throwing errors that might stop the next interceptor from running?

I’ll take a look at the order of the interceptors.

Thanks!