cloudfoundry / cloudfoundry/uaa
[Feature] pattern matching for Client JWT sub
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 844
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 27
Description
Using client JWTs to authenticate clients—such as those from GitHub—offers significant value but comes with certain limitations.
The subject (sub) claim in the token varies depending on the context in which the action is executed. For example:
- When targeting an environment:
repo:octo-org/octo-repo:environment:Production - When targeting a branch:
repo:octo-org/octo-repo:ref:refs/heads/demo-branch
GitLab follows a similar pattern for generating the sub claim.
Reference: GitHub Docs – Example Subject Claims
Currently, the sub value configured in the client JWT must exactly match the sub in the incoming token. As a result, users may need to create multiple client JWT configurations to cover all possible subjects—up to the configured limit of 10 entries.
To improve flexibility and reduce this overhead, it would be highly beneficial if UAA supported pattern matching in the sub claim. For example:
repo:octo-org/octo-repo:ref:refs/heads/*repo:octo-org/octo-repo:environment:*
Contributor guide
No contributing guide indexed for this repository
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 tracing the client JWT authentication path where the incoming token's sub claim is compared with configured client JWT subjects. Review how subject values and the ten-entry limit are represented, then define and test the supported pattern semantics so branch and environment examples match without weakening authentication checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100