Skip to content

Conversation

@vmuzikar
Copy link
Contributor

Closes #43224

@vmuzikar vmuzikar force-pushed the admin-v2-port branch 3 times, most recently from b15fc7c to ade8e04 Compare October 14, 2025 07:15
Copy link

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

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

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.webauthn.account.WebAuthnSigningInTest#setUpLinksTest

Keycloak CI - WebAuthn IT (firefox)

java.lang.AssertionError: 
Set up link for "webauthn-passwordless" is not visible
Expected: is <true>
     but: was <false>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
...

Report flaky test

Copy link

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

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

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.webauthn.account.WebAuthnSigningInTest#setUpLinksTest

Keycloak CI - WebAuthn IT (firefox)

java.lang.AssertionError: 
Set up link for "webauthn-passwordless" is not visible
Expected: is <true>
     but: was <false>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
...

Report flaky test

@vmuzikar
Copy link
Contributor Author

Keeping as individual commits for the sake of review. Will squash it before merge.

@vmuzikar vmuzikar marked this pull request as ready for review October 14, 2025 09:01
@vmuzikar vmuzikar requested review from a team as code owners October 14, 2025 09:01
mabartos
mabartos previously approved these changes Oct 14, 2025
Copy link
Contributor

@mabartos mabartos left a comment

Choose a reason for hiding this comment

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

@vmuzikar LGTM.

When tests passed, I'm ok to merge it. Some polishing and improvement will be done in follow-up tasks.

Not sure if these commits should be squashed, as there are some contextually different pieces of code - but leaving the final decision up to you.

@mabartos
Copy link
Contributor

@shawkins @Pepo48 Could you please review it to unblock further work? Thanks!

@stianst stianst requested review from mposolda and pedroigor October 15, 2025 11:16
Pepo48
Pepo48 previously approved these changes Oct 15, 2025
pom.xml Outdated
Comment on lines 608 to 612
<dependency>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
<version>${expressly.version}</version>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

This dependency needs approval from the CNCF since it's EPL 2.0. We can merge without approval from the CNCF, but would need to get an exception at some point, ideally before the release.

Copy link
Contributor

@mabartos mabartos Oct 17, 2025

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The dependency has been removed for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually it was not removed as it's a transitive dependency of Hibernate Validator.

Set the number of users per file. It is used only if 'users' is set to
'different_files'. Default: 50.

OpenAPI configuration (Experimental):
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 these just be features rather than CLI config options?

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 really IMHO. It's similar to metrics or health endpoints, we do too have config options for those.

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 get why - we have features that can be enabled/disabled, why is there a need for a separate CLI option to do the same?

Copy link
Contributor

Choose a reason for hiding this comment

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

This also means these won't be listed on https://www.keycloak.org/server/features; and not consistent with other features/capabilities. What about if we have different versions of this in the future, etc, etc. There are reasons why we have features and want to make this stuff consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved, OpenAPI is a feature but I kept the options (which are not marked as experimental any more).

@QueryParam("fieldValidation") FieldValidation fieldValidation);

@PATCH
@Consumes({MediaType.APPLICATION_JSON_PATCH_JSON, CONTENT_TYPE_MERGE_PATCH})
Copy link
Contributor

Choose a reason for hiding this comment

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

So we support only application/json-patch+json, but not a basic patch? Seems the wrong way around when it comes to priorities

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but not a basic patch

That's the application/merge-patch+json. We'll need to remove application/json-patch+json as that's the "smart" PATCH that is out of scope of the MVP. I'll create a separate commit to remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

cc: @shawkins

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll create a separate commit to remove it.

Actually, decided to do it rather as a follow-up. Let's keep this PR as close as possible to the prototype.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}

@Path("v2")
public AdminApi adminApi() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We explicitly don't want versioning on the Admin API as whole; but rather on each distinct API.

Copy link
Contributor

Choose a reason for hiding this comment

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

Created follow-up issue:

But we need to discuss it within our SIG.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is really not open to discussion; we need to break the massive Admin API into distinct separate and smaller APIs.

mabartos
mabartos previously approved these changes Oct 17, 2025
Copy link
Contributor

@mabartos mabartos left a comment

Choose a reason for hiding this comment

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

LGTM as the initial implementation - the main concerns/issues were addressed and for other minor issues, follow-up tasks were created.

mabartos and others added 19 commits November 3, 2025 09:10
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Martin Bartoš <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>
Copy link

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

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

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.actions.RequiredActionUpdateProfileTest#updateProfileWithoutRemoveCustomAttributes

Keycloak CI - Forms IT (firefox)

java.lang.RuntimeException: Could not create statement
	at org.jboss.arquillian.junit.Arquillian.methodBlock(Arquillian.java:307)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
...

Report flaky test


find . -path '**/src/test/java' -type d \
| grep -v -E '\./(docs|distribution|misc|operator|tests|testsuite|test-framework|quarkus)/' \
| grep -v -E '\./(docs|distribution|misc|operator|((.+/)?tests)|testsuite|test-framework|quarkus)/' \
Copy link
Contributor Author

@vmuzikar vmuzikar Nov 3, 2025

Choose a reason for hiding this comment

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

This is to exclude the Admin v2 IT from running as UT. Decided to do it in more generic way – I assume if a module is called tests it's somewhere executed as IT.

The output before:

adapters/saml/core,adapters/saml/wildfly/wildfly-subsystem,authz/client,common,core,crypto/default,crypto/elytron,crypto/fips1402,federation/kerberos,federation/ldap,integration/client-cli/admin-cli,model/infinispan,model/jpa,model/storage-private,saml-core,server-spi,server-spi-private,services%                             

After:

adapters/saml/core,adapters/saml/wildfly/wildfly-subsystem,authz/client,common,core,crypto/default,crypto/elytron,crypto/fips1402,federation/kerberos,federation/ldap,integration/client-cli/admin-cli,model/infinispan,model/jpa,model/storage-private,rest/admin-v2/tests,saml-core,server-spi,server-spi-private,services%         

@vmuzikar vmuzikar dismissed stianst’s stale review November 3, 2025 11:54

All blocking comments were resolved.

@vmuzikar vmuzikar merged commit 9c86eae into keycloak:main Nov 3, 2025
89 of 92 checks passed
@vmuzikar vmuzikar deleted the admin-v2-port branch November 3, 2025 14:04
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.

First Client API iteration based on protype

7 participants