spring-cloud / spring-cloud/spring-cloud-gateway
Provide Predicate Factory that examines Authentication / Principal
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
We have some use cases where we would like to route based on attributes of the Authentication / Principal from the spring security context. For example, principal name, or token attributes such as oauth client id, account id, etc
We were thinking about developing a predicate factory to do this in our code, but I wanted to see if spring-cloud-gateway could provide first-class support for this. Thoughts? I'd consider making a contribution, but want to confirm before going down that path.
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
Review the existing route predicate factories and how Spring Security authentication or principal data is exposed in the gateway. Define the first-class predicate behavior for attributes such as principal name, OAuth client ID, and account ID, then validate that the proposed scope and API are supported by focused tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100