-
Notifications
You must be signed in to change notification settings - Fork 14
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
[issue 105] - Adding the RHSSO Template provisioner #109
[issue 105] - Adding the RHSSO Template provisioner #109
Conversation
Skipping CI for Draft Pull Request. |
/test all |
721e4da
to
8ce8913
Compare
/test all |
8ce8913
to
fbfb0b6
Compare
/test all |
/test prod-intersmash-e2e-prod |
* @return Instance of {@link Path} representing a YAML definition for the desired realm configuration | ||
*/ | ||
default Path getRealmConfigurationFilePath() { | ||
return null; |
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.
@fabiobrz importing a realm isn't needed, right?
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.
It depends, there are internal tests relying on this specific provisioner, hence I am going to check and get beck here, thanks for now!
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.
Confirmed, it is used by existing EAP7 + RHSSO tests.
@@ -62,6 +62,7 @@ public KeycloakAdminClient(final String url, final String realm, final String us | |||
*/ | |||
public void importRealmConfiguration(InputStream is) throws IOException { | |||
PartialImportRepresentation piRep = JsonSerialization.readValue(is, PartialImportRepresentation.class); | |||
// TODO - fix, the realm name should be passed in as a parameter | |||
keycloak.realm("wildfly-realm").partialImport(piRep); |
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.
@fabiobrz isn't the realm name specified in the JSON file to import?
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.
Now that you've mentioned it, I see I have been maybe a bit too quick in here.
There's actually some controversial issue around the Keycloak/RH-SSO admin client (also about the compatible versions), and I am going to check it, thanks for bringing it up.
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.
Back with some updates. So the answer is "no", meaning that the Keycloak Admin API contracts require for the realm name, to identify the realm where resources will be created.
Here's an example from an existing test:
{
"roles": {
"realm" : [{
"name": "user"
}]
},
"users": [{
"username" : "user",
"enabled": true,
"credentials" : [{
"type" : "password",
"value" : "password"
}],
"realmRoles": ["user"],
"clientRoles": {
"account": ["view-profile", "manage-account"]
}
}]
}
Anyway, I fixed the method as well, according to the TODO
. Thanks again for bringing this up.
@fabiobrz LGTM, I just left couple of questions... |
Thanks @tommaso-borgato - I addressed your concerns, feel free to let me know in case you think something else is needed here. |
6ab5971
to
93ede93
Compare
@fabiobrz please resolve the conflicts and then we can merge! |
93ede93
to
e88d246
Compare
/retest |
Description
Fix #105 - ported to support testing of RH-SSO via templates, which is still being used by internal pipelines.
Type of change
test, version modification, documentation, etc.)
Checklist