I am trying to use spring-security 3.0.5 acl features and have it working for post-filtering collections and arrays.
But I am unable to get it working when selecting a single object because of missing debug symbol information.
I've read the Peter Mularien book -- Chapter 7, about setting up and using ACLs -- and I know I need to compile the necessary debug info into the classes but can't seem to find out how to get eclipse to do it.
Here is the annotation on the interface method signature:
@PreAuthorize("hasAnyRole('ROLE_SUPER_USER','ROLE_ SYSTEM_ADMIN') and hasPermission(#id, 'com.xyz.db.domain.impl.XyzConfigImpl', 'read')")
public XyzConfig get(Long id);
Here is the warning:
[110224-19:22:25.155 WARN ] o.s.s.a.e.m.MethodSecurityEvaluationContext - Unable to resolve method parameter names for method: public final com.xyz.db.domain.XyzConfig $Proxy77.get(java.lang.Long). Debug symbol information is required if you are using parameter names in expressions.
Here is the exception:
Exception in thread "main" java.lang.IllegalArgumentException: identifier required
at org.springframework.util.Assert.notNull(Assert.jav a:112)
at org.springframework.security.acls.domain.ObjectIde ntityImpl.<init>(ObjectIdentityImpl.java:43)
at org.springframework.security.acls.domain.ObjectIde ntityRetrievalStrategyImpl.createObjectIdentity(Ob jectIdentityRetrievalStrategyImpl.java:38)
at org.springframework.security.acls.AclPermissionEva luator.hasPermission(AclPermissionEvaluator.java:6 3)
at org.springframework.security.access.expression.met hod.MethodSecurityExpressionRoot.hasPermission(Met hodSecurityExpressionRoot.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.expression.spel.support.Reflec tiveMethodExecutor.execute(ReflectiveMethodExecuto r.java:69)
I am using eclipse 3.6.1 to compile and run this spring/hibernate based java application (not ant,, with a javac -g compiler option).
Is using parameter names in expressions not possible when compiling with eclipse, instead of and ant build file (using the javac.debug=on option)?
Could the problem be related to trying to find a param name in a proxy?
Please help! I'm am really keen to use this feature.
Thanks,
Stan


Reply With Quote
