expression « Security « Spring Q&A





1. Spring: What parser to use to parse security expressions    stackoverflow.com

I would like to parse standard security expressions like hasRole etc. to get their value in a variable (in a JSP). How can I do that? SpelExpressionParser is the standard EL ...

2. Spring aop pointcut expression to access method return type    stackoverflow.com

I have a service interface with many methods, all of which take a Request object and return a Response object. All request objects have a common ancestor and all response objects ...

3. Use complex expression with Spring EL (conditional & parenthesis)    stackoverflow.com

I'm using spring-EL with spring security Is it possible to make 'complex' conditional expressions with parentesis?

@PreAuthorize("( hasRole('ROLE_USER') and ( isOwnerDocumentUUID( #docUuids ) ) or hasRole('ROLE_ADMIN')  ")
throw an java.lang.IllegalArgumentException:
Failed to ...

4. EL expression can access the son of son object in scope?    stackoverflow.com

Can I use EL expression like this ? Topic comes from a requestScope param that is List.

${topic.person.username}
Taking that Topic has a Person and Person has username. I am getting an error ...

5. Calling static methods from Spring Security Expressions?    stackoverflow.com

I'm looking for a way to extend Spring Security Expressions to support an existing security infrastructure. I'm aware you can extend the MethodSecurityExpressionRoot as described here, but I also ...

6. org.springframework.expression-3.1.0.M2.jar has no source attachment    stackoverflow.com

I am working on spring mvc 3.0 that integrated spring-social-facebook. When I debug the code, there is an error at line

List<Connection<?>> connections = connectionRepository.findConnections(providerId);
in the following method
@RequestMapping(value="/{providerId}", method=RequestMethod.GET)
public String connectionStatus(@PathVariable ...

7. using expression-based authorization with principal    forum.springsource.org

using expression-based authorization with principal I'm trying to use @PreAuthorize expressions to check attributes of the current principal: Code: @PreAuthorize("principal.myAttribute == 'someValue') void myMethod() {} When the user is logged in, ...

8. Spring Web Security Expressions - Order issue    forum.springsource.org

Hi, just stumbled over this Code: does not seem to be equivalent to the 2 same lines in reversed order Code:

9. Problem extending the expression based security control.    forum.springsource.org

Problem extending the expression based security control. I'm trying to extend the expression based security control to handle a custom scenario and Im starting to wonder if this is the correct ...





10. Method Security: default expression    forum.springsource.org

You should be able to use the annotation at class level (though obviously you can't really use method parameters in that case). An annotation only makes sense if you add it ...

11. Logical Operators in Web Security Expressions    forum.springsource.org

In the following documentation (http://static.springsource.org/sprin...#el-access-web), I see "and" and "or" being used in an expression to obtain a value for access. What is the syntax for negation? I've tried "!" and ...

12. Cannot use objects on authorize:access expression    forum.springsource.org

May 3rd, 2011, 06:33 AM #1 wrath View Profile View Forum Posts Private Message Junior Member Join Date Jan 2011 Posts 4 Cannot use objects on authorize:access expression Hi, I am ...

14. pointcut expression for non final field access    forum.springsource.org

I'm currently playing with a ConcurrencyDetectionAspect and I would like to create a pointcut expression for reads/writes on non final fields on a specific package (and all subpackages). This doesn't work: ...

15. Switch user 'source' el expression    forum.springsource.org

All, Can't figure out how to write an EL expression to pull out the 'admin' user's name for display. I'm trying: Code:

16. Configuration of Spring Security 3.0M1 Expression Handler - bug?    forum.springsource.org

Hopefully Luke can answer this I am playing on the bleeding edge and doing research with Spring Sec 3.0M1. I'm trying to figure out if it's possible to write my own ...





17. Global method security with pointcut expressions is VERY slow    forum.springsource.org

Dec 2nd, 2009, 11:02 AM #1 Diegoman View Profile View Forum Posts Private Message Junior Member Join Date Jul 2008 Posts 7 Global method security with pointcut expressions is VERY slow ...

18. Spring Security Expressions    forum.springsource.org

Dec 30th, 2009, 12:56 AM #1 suriin View Profile View Forum Posts Private Message Junior Member Join Date Dec 2009 Posts 16 Spring Security Expressions Hi , I am using Spring ...

19. How to access ServletContext parameter with Spring Expression Language?    forum.springsource.org

Hello, I use a context-param in web.xml to indicate which server is running for my project(the devel, test or production server), but can I access this varaiable in springEL, so I ...

20. problem mixing access-decision-manager and expression-handler    forum.springsource.org

problem mixing access-decision-manager and expression-handler Hello all, I have this problem. My project involves lots of custom logic for access control. So I implemented my own permissionEvaluator, and bound it to ...

21. Evaluating security expressions from inside a method?    forum.springsource.org

Evaluating security expressions from inside a method? I'm attempting to implement spring security for a custom content management system that we have built where I work. Basically, each piece of content ...