Skip to content

Aggregate policy partial evaluation diverges from runtime semantics u… - #51188

Open
vramik wants to merge 1 commit into
keycloak:mainfrom
vramik:cve-890
Open

Aggregate policy partial evaluation diverges from runtime semantics u…#51188
vramik wants to merge 1 commit into
keycloak:mainfrom
vramik:cve-890

Conversation

@vramik

@vramik vramik commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

…nder FGAP v2

Closes #51143

…nder FGAP v2

Closes keycloak#51143

Signed-off-by: vramik <vramik@redhat.com>
Copilot AI review requested due to automatic review settings July 27, 2026 09:54
@vramik
vramik requested a review from a team as a code owner July 27, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns aggregate-policy partial evaluation with FGAP v2 runtime semantics.

Changes:

  • Applies negative child-policy logic before aggregate decisions.
  • Fails closed for directly unsupported child providers.
  • Adds authorization regression tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
AggregatePolicyProvider.java Updates partial aggregate evaluation semantics.
UserResourceTypeFilteringTest.java Adds direct, list, count, and nested-policy tests.

// will invert our return value when policy.getLogic() == NEGATIVE, so we
// pre-compensate: return true for NEGATIVE (inverted to false by caller),
// false for POSITIVE (used as-is). Net result is always deny.
return Logic.NEGATIVE.equals(policy.getLogic());

@keycloak-github-bot keycloak-github-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot

Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.federation.ldap.LDAPGroupMapperTest#test01_ldapOnlyGroupMappings

Keycloak CI - Base IT (5)

org.opentest4j.AssertionFailedError: expected: <4> but was: <3>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
...

Report flaky test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aggregate policy partial evaluation diverges from runtime semantics under FGAP v2

2 participants