-
Notifications
You must be signed in to change notification settings - Fork 34
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
Keycloak fixes and Quarkus FW bump to 1.4.0.Beta5 #1581
Keycloak fixes and Quarkus FW bump to 1.4.0.Beta5 #1581
Conversation
run tests |
9bf6b00
to
c9287da
Compare
run tests |
Remaining OCP / baremetal failures are failing also without this PR, therefore they are not result of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at it. It's look good just two comments to clarify.
@@ -10,8 +14,8 @@ | |||
public class KeycloakAuthzSecurityReactiveIT extends BaseAuthzSecurityReactiveIT { | |||
|
|||
//TODO Remove workaround after Keycloak is fixed https://github.com/keycloak/keycloak/issues/9916 | |||
@KeycloakContainer(command = { "start-dev --import-realm --hostname-strict=false" }) | |||
static KeycloakService keycloak = new KeycloakService("/keycloak-realm.json", REALM_DEFAULT, "/realms") | |||
@KeycloakContainer(command = { "start-dev", "--import-realm" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there reason why --hostname-strict=false
is removed when in other cases it stay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I wrote about this (vaguely) in the PR description, I changed it accidentally and it made no difference, so I suppose it doesn't really matter. If it doesn't cause test failure I don't think it needs to be there. Good catch, it was mistake. If it is somehow important for you, I'll change it in next PR when fixing mTLS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's work I'm fine with it. Hope that this not cause the problem in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's work I'm fine with it. Hope that this not cause the problem in future.
IMO tests need to be idempotent, otherwise our job will become very dangerous
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will see other integration runs like Windows and Podman... I don't expect there should be difference.
@Container(image = "${rhsso.image}", expectedLog = "Http management interface listening", port = KEYCLOAK_PORT) | ||
static KeycloakService keycloak = new KeycloakService(REALM_DEFAULT) | ||
.withProperty("SSO_IMPORT_FILE", "resource::/keycloak-realm.json"); | ||
@KeycloakContainer(command = { "start-dev", "--import-realm" }, image = "${rhbk.image}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why some of the command KeycloakContainers
contains contain more commands that these two. When they were the same with using Container
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed .withProperty("SSO_IMPORT_FILE", "resource::/keycloak-realm.json");
so I want to import it from command. I can't answer it in general, if you deem particular change wrong, please comment on the very change and I'll check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just that somewhere @Conatiner
change to this
@KeycloakContainer(command = { "start-dev", "--import-realm", "--hostname-strict=false",
"--features=token-exchange" }, image = "${rhbk.image}")
and somewhere to this
@KeycloakContainer(command = { "start-dev", "--import-realm" }, image = "${rhbk.image}")
But this was answered in other comment so now there is probably no need for some of these commands.
But as it was written in PR description let's solve these problem as the start-dev
is solved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just note - I won't pretend I couldn't make mistake, but this is how I worked:
- if I remove import env var, I need to add
--import-realm
- If I change RHSSO for RHBK it is change from Wildfly to Quarkus based KC, so I followed what is done in that very project for non-OCP tests. so typically if there were
--features=token-exchange
for baremetal tests I just added it as well. I didn't try to think whether it needs to be in baremetal tests at the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments were explained and the PR it's look fine.
Summary
Main goal of this PR is to fix OCP failures related to the fact that Keycloak auth server URL has changed in our FW: quarkus-qe/quarkus-test-framework#960
OpenShiftRhSsoOidcMtlsIT
will require much more thinkering, at the very least I hit that config map name is created with illegal chars when resource is in nested directory. But I think it will be even more difficult, I'll address it later this week.start-dev
because it all seems like a one big workaround for proper solution to meOidcRestClientIT
failure (both baremetal and OCP) goes down to the Fix primitive class handling in Serialisers quarkusio/quarkus#37788, I hope it's going to be merged today as that reviewer is active in other Quarkus PRsPlease select the relevant options.
run tests
phrase in comment)Checklist: