keycloak / keycloak-quickstarts

Apache License 2.0
1.99k stars 985 forks source link

Migrate to adapter-elytron-install-offline.cli to avoid exception "Legacy WildFly security layer..." #326

Closed ahus1 closed 2 years ago

ahus1 commented 2 years ago

…is no longer supported by the Keycloak WildFly adapter"

Closes #325

ahus1 commented 2 years ago

Due to #keycloak/11789 several of the examples fail with "Legacy WildFly security layer is no longer supported""

This PR disables those from the CI run in main as a minimal change.

As you've been involved in the original issue @stianst / @pedroigor / @abstractj: Should those quickstarts be removed completely from this repository?

BTW; other quickstarts will fail for other reasons.

ahus1 commented 2 years ago

@vmuzikar - true, they might be migrated, but that would be another issue and out of scope for this PR. I don't have a strong opinion here, so I won't open such an issue.

ahus1 commented 2 years ago

Hi @pedroigor

after the change only two tests fail with this the known error message (extend-account-console fails for some other reason).

2022-06-13T15:09:04.2362697Z Running tests for app-profile-jee-vanilla QS
2022-06-13T15:09:22.9516924Z Caused by: java.lang.RuntimeException: Legacy WildFly security layer is no longer supported by the Keycloak WildFly adapter
2022-06-13T15:09:23.7074154Z Running tests for app-profile-saml-jee-jsp QS
2022-06-13T15:09:42.9928084Z Caused by: java.lang.RuntimeException: Legacy WildFly security layer is no longer supported by the Keycloak WildFly adapter

Any idea why this is still the case? Or should this PR be merged, and the other failures should be tackled in another PR?

Best regards, Alexander

pedroigor commented 2 years ago

@ahus1 IMO, we should remove app-profile-jee-vanilla because it teaches how to use the legacy adapter and subsystem that no longer exists.

The SAML one I need to take a look at because I think it should work just fine as we are not removing SAML.

hmlnarik commented 2 years ago

Any idea why this is still the case? Or should this PR be merged, and the other failures should be tackled in another PR?

Could it be because of the https://github.com/keycloak/keycloak-quickstarts/blob/latest/app-profile-jee-vanilla/src/test/resources/standalone-test.xml containing references to legacy security subsystems?

https://github.com/keycloak/keycloak-quickstarts/blob/8129f103f7304497884fa9314f3db4d4d8b7695a/app-profile-jee-vanilla/src/test/resources/standalone-test.xml#L22

https://github.com/keycloak/keycloak-quickstarts/blob/8129f103f7304497884fa9314f3db4d4d8b7695a/app-profile-jee-vanilla/src/test/resources/standalone-test.xml#L351-L355

perhaps also this one

https://github.com/keycloak/keycloak-quickstarts/blob/8129f103f7304497884fa9314f3db4d4d8b7695a/app-profile-jee-vanilla/src/test/resources/standalone-test.xml#L32

The same applies to standalone-test.xml in app-profile-saml-jee-jsp

ahus1 commented 2 years ago

Thanks @hmlnarik - I've restructured the two tests to no longer include a custom standalone.xml. Some stabilization was necessary on the Graphene/pantomJS side of things.

The two tests were green locally. Waiting for the build to complete, switching it to draft until I have the results.

ahus1 commented 2 years ago

This is now ready for review, there is only on failing test "extend-account-console" and this is unrelated to the bug that this PR is about to fix.

@pedroigor / @abstractj / @vmuzikar - I'd be happy if one of you could review it, and then merge it. Thanks!