Lack of Scope Validation for client_credentials grant type
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- authentication, backend, security
Research direction
Start in UaaTokenServices#createAccessToken and trace the client_credentials path, comparing it with password and authorization_code scope handling. The change is complete when requested scopes are validated against the identity zone before token issuance and invalid or misconfigured scopes cannot appear in the issued token.
Written by the indexing model from the issue text.
Description
Unlike the password or authorization_code grant types, which validate user authorities before issuing a token, the client_credentials grant type in Cloud Foundry UAA does not validate whether the requested scopes exist in the system. Instead, UAA simply includes the scopes in the issued token as long as they match those configured for the client.
Problem Statement:
Currently, UAA does not enforce scope validation against a central authority list. This means:
- If an admin assigns a non-existent or incorrectly configured scope to a client, UAA will still issue a token containing that scope.
- There is no validation to ensure that the scopes assigned to the client are actually valid within the identity zone.
- This could lead to misconfigurations where services rely on scopes that are not properly enforced, creating potential security risks.
Proposed Solution:
Modify UaaTokenServices#createAccessToken to introduce scope validation for client_credentials tokens. Specifically:
Before issuing a token, UAA can check that all requested scopes exist and are valid within the respective identity zone.
Expected Outcome:
Prevents issuance of tokens with non-existent or misconfigured scopes.
Enhances security by ensuring only valid scopes are granted to clients.
.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 847
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 48
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from cloudfoundry/uaa
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudfoundry/uaa#4194 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
cloudfoundry/uaa#4189 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
cloudfoundry/uaa#4156 ·
Maintainers usually reply within 1 day
-
Support named allowed-resource policies for mTLS clientsPossibly taken @strehle claimed this 24 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
cloudfoundry/uaa#4125 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
cloudfoundry/uaa#4086 · 1 comment ·
Maintainers usually reply within 1 day
All issues in cloudfoundry/uaa
Similar issues
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-edc/IdentityHub#1296 ·
Maintainers usually reply within 1 day
-
area: ui priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tetsuji16/microProject#1721 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
The engine's "loaded, but had errors" message leaves out which library and line each error is inOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cqframework/clinical_quality_language#1980 ·
Maintainers usually reply within 3 days
-
windows-sys 0.101.0Open
Difficulty 2/5 1-3 hours Newbie friendliness 61/100