Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not manage brokers through the Organization API #29269

Merged
merged 1 commit into from
May 7, 2024

Conversation

pedroigor
Copy link
Contributor

Closes #29268

Depends on for #29064.


if (existing == null) {
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why return here? If you are importing an IDP, don't you want to check if the representation matches an org (potentially) and one of its domain regardless of it existing already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. I did not consider importing as we are not yet supporting import/export. Changed and added a test to cover this scenario.

return Response.status(Status.BAD_REQUEST).build();
}
if (!isOrganizationBroker(broker)) {
throw ErrorResponse.error("Identity provider not found with the given alias", Status.NOT_FOUND);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the message indicate that no provider with the specified alias is currently bound to the org? If you prefer we can create a follow up issue to revisit all messages returned from endpoints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@pedroigor pedroigor force-pushed the issue-29268 branch 2 times, most recently from d510c71 to ac3d7a3 Compare May 6, 2024 19:24
Closes keycloak#29268

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Copy link
Contributor

@mhajas mhajas left a comment

Choose a reason for hiding this comment

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

Approving based on the review from @sguilhen

@pedroigor pedroigor merged commit c0325c9 into keycloak:main May 7, 2024
69 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.

Do not manage brokers through the Organization API
3 participants