apache / apache/grails-core

Better support for custom AccessDecision voters

Open
#15,866 0 comments 2 reactions 0 assignees View on GitHub
relates-to:spring-security type: improvement
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

@Secured("FOO_BAR")

Let's imagine you have made Voter that wants to make checks for all tokens that starts with "FOO_"
Spring security core now makes WebExpressionConfigAttribute's to your custom voters.
And if your voter now denies the access it's also processed by the WebExpressionVoter that ends up with an exception, because it cannot turn String "FOO_BAR" to boolean value.

Some kind of better mechanism would be nice for custom voters so we do not end up in a situation that the WebExpressionVoter processes the custom access strings.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the @Secured("FOO_BAR") case with a custom voter, WebExpressionConfigAttribute, and WebExpressionVoter. Trace why the custom access string reaches WebExpressionVoter; done means custom FOO_ tokens can be handled by the custom voter without WebExpressionVoter raising a boolean-conversion exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, spring
Domain
authorization, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.