8000 Inconsistent "grant_types" vs "grantTypes" Naming Causes GrantTypeCondition to Always Fail · Issue #39296 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Inconsistent "grant_types" vs "grantTypes" Naming Causes GrantTypeCondition to Always Fail #39296
Closed
@sventorben

Description

@sventorben

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

core

Describe the bug

There is a mismatch between the key used in the GrantTypeConditionFactory and the one expected by GrantTypeCondition, causing the condition to always fail at runtime.

Because of this inconsistency:

  • When the condition is evaluated, it attempts to read grantTypes from the configuration, but the provided configuration only contains grant_types.
  • This results in null being assigned and the condition never being properly triggered.

Version

26.2.1

Regression

  • The issue is a regression

Expected behavior

When configuring a client policy with a GrantTypeCondition, the specified grant types should be correctly read from the configuration.

The condition should match requests with the corresponding grant types and enforce the policy as configured.

Actual behavior

The condition always sees a null value for grant types because of the key mismatch.

As a result, the GrantTypeCondition never triggers, and the client policy is not applied based on grant type.

How to Reproduce?

  • Create a client policy with a condition based on grant types.
  • Attempt a client request that should match the condition.
  • Notice that the policy is not triggered, even though the conditions seem correctly configured.

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0