spring-projects / spring-projects/spring-security
Reintroduce expressions for http security
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
When trying to migrate our codebase to Spring 3, I realized, that our security configuration cannot be migrated easily.
Code, that cannot be migrated (not real code, just an example):
http
.authorizeRequests()
.mvcMatchers("/admin/{id}")
.access("hasRole('ADMIN') && @webSecurity.check(#id)"))
According to the documentation, we should write an AuthorizationManager for this use-case.
We have used the same expressions on method security - and that was awesome.
It would be nice if expressions on http security would work again.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the HTTP security configuration and AuthorizationManager approach described in the migration example. Compare the requested HTTP expression support with the existing method-security expression behavior, then establish tests covering mvcMatchers expressions and the issue's example syntax as the definition of done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100