8000 Prevent frontend endpoint redirect to admin endpoint by vmuzikar · Pull Request #38464 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Prevent frontend endpoint redirect to admin endpoint #38464

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

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

vmuzikar
Copy link
Contributor

Closes #38463

* @author Vaclav Muzikar <vmuzikar@redhat.com>
*/
@KeycloakIntegrationTest(config = AdminRootTest.AdminUrlConfig.class)
public class AdminRootTest {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if similar test exists in the old testsuite but seemed simpler to do it in the new one as we need to provide server config options. Let me know if that works for you.

Comment on lines -30 to -33
@Override
public LifeCycle getDefaultLifecycle() {
return LifeCycle.GLOBAL;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be a bit controversial but I assume we might need occasionally to provide some HTTP Client configs on the test level, hence the global scope would not work. Let me know if that works for you.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't change this, instead add the compatible check based on annotations. That'll recreate the global instance as needed based on annotation config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the pointer. I didn't realize the compatible method is there for this use case. Created #38586.

@vmuzikar vmuzikar marked this pull request as ready for review March 26, 2025 19:38
@vmuzikar vmuzikar requested a review from a team as a code owner March 26, 2025 19:38
@vmuzikar vmuzikar requested a review from a team March 26, 2025 19:38
@vmuzikar vmuzikar force-pushed the hostname-disclosure branch from 861a258 to e02fb9a Compare March 28, 2025 12:27
@vmuzikar vmuzikar marked this pull request as draft March 28, 2025 12:30
@vmuzikar vmuzikar force-pushed the hostname-disclosure branch 2 times, most recently from ea5297a to 796 8000 8b8f Compare March 28, 2025 12:57
Closes keycloak#38463

Signed-off-by: Václav Muzikář <vmuzikar@redhat.com>
@vmuzikar vmuzikar force-pushed the hostname-disclosure branch from 7968b8f to 2a52dff Compare March 28, 2025 13:00
@vmuzikar vmuzikar marked this pull request as ready for review March 28, 2025 15:12
Copy link
Contributor
@ssilvert ssilvert left a comment

Choose a reason for hiding this comment

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

LGTM

@vmuzikar vmuzikar merged commit 2a0ce46 into keycloak:main Mar 28, 2025
75 checks passed
@vmuzikar vmuzikar deleted the hostname-disclosure branch March 28, 2025 17:45
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.

Frontend endpoint redirects to admin endpoint
3 participants
0