Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-18: Class to verify authorization before invoking method #279

Closed
spring-projects-issues opened this issue Jun 24, 2005 · 3 comments
Closed
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

Ben Alex(Migrated from SEC-18) said:

http://forum.springframework.org/viewtopic.php?t=6085

Provide a simple MethodInvocationPrivilegeEvaluator class that has the ObjectDefinitionSource and AccessDecisionManager as collaborators. It would have a single method:

public boolean allowed(MethodInvocation, Authentication);

This allows testing of privileges before calling a method – particularly useful in the case of domain object instance security.

See also SEC-113 for a related helper class.

@spring-projects-issues
Copy link
Author

Ben Alex said:

It will be necessary to ensure the class emphasises to users that the consequences of the AfterInvocationManager are unable to be used in the allowed(MethodInvocation, Authentication) method. Alternatively, an overloaded version might be:

public boolean allowed(MethodInvocation, Authentication, Object)

The final argument could be passed to the AfterInvocationManager. This is useful if the response Object is known to be a particular domain object instance (perhaps an Object argument included within the MethodInvocation), as this enables the AfterInvocationManager’s ability to thrown an AccessDeniedException to be tested pre-invocation.

@spring-projects-issues
Copy link
Author

Ben Alex said:

Checked in CVS. Unit tests all still pass.

@spring-projects-issues
Copy link
Author

Ben Alex said:

Checked in change so SEC-113 changes do not conflict.

@spring-projects-issues spring-projects-issues added in: core An issue in spring-security-core Closed type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 1.0.0 RC1 milestone Feb 5, 2016
@rwinch rwinch added the type: enhancement A general enhancement label May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

3 participants
@rwinch @spring-projects-issues and others