Skip to content

Lack of Scope Validation for client_credentials grant type #3374

@Shivani180796

Description

@Shivani180796

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.
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions