Skip to content

Generic identity-provider creation can bind brokers to organizations … - #51288

Merged
pedroigor merged 1 commit into
keycloak:mainfrom
vramik:cve-880
Jul 31, 2026
Merged

Generic identity-provider creation can bind brokers to organizations …#51288
pedroigor merged 1 commit into
keycloak:mainfrom
vramik:cve-880

Conversation

@vramik

@vramik vramik commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

…without manage-organizations

Closes #51283

@vramik
vramik requested a review from a team as a code owner July 29, 2026 15:54
Copilot AI review requested due to automatic review settings July 29, 2026 15: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

Prevents generic identity-provider APIs from linking brokers to organizations without organization-management permission, addressing CVE-2026-18201.

Changes:

  • Strips organization identifiers during generic IdP creation and update.
  • Adds authorization regression coverage.

Reviewed changes

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

File Description
OrganizationAdminRolesPermissionsTest.java Tests unauthorized binding attempts.
IdentityProvidersResource.java Secures generic IdP creation.
IdentityProviderResource.java Secures generic IdP updates.
Organizations.java Adds organization-ID stripping utility.

Comment on lines +203 to +204
// organization-related information should not be processed by non-organization API
Organizations.stripOrganizationId(providerRep);
Copilot AI review requested due to automatic review settings July 29, 2026 17:23

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

pedroigor
pedroigor previously approved these changes Jul 29, 2026
@pedroigor

Copy link
Copy Markdown
Contributor

@vramik The test failures seem related, and the cause is that some tests rely on the previous behavior. Instead, we should call the Organization API to bind the IdP to the organization.

I can work on this, as you are not supposed to be here :)

…without manage-organizations

Closes keycloak#51283

Signed-off-by: vramik <vramik@redhat.com>
Copilot AI review requested due to automatic review settings July 30, 2026 20:44
@pedroigor
pedroigor requested review from a team as code owners July 30, 2026 20:44

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@pedroigor
pedroigor merged commit 7f858c0 into keycloak:main Jul 31, 2026
91 of 158 checks passed
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.

[CVE-2026-18201] Generic identity-provider creation can bind brokers to organizations without manage-organizations

3 participants