[keycloak-dev] Hosted domain for Google logins

Thomas Darimont thomas.darimont at googlemail.com
Sat May 19 04:45:48 EDT 2018

Hello Steffen,

maven forks a new jvm for tests, so you have to explicitly pass the jvm
arguments / system properties
in the configuration of the surefire test plugin, see:

Would probably be a good idea to add the <argLine>-Duser.country=EN
to the surefire plugin config in the Keycloak build for more stable tests.

<argLine>-Duser.country=EN -Duser.language=en</argLine>


Am Fr., 18. Mai 2018 um 22:58 Uhr schrieb Steffen Kreutz <
s.kreutz at yieldlab.de>:

> Hey Keycloak Devs,
> we would like to restrict access to accounts that are managed by our
> company and therefore need to send the ‚hd‘ to Google’s auth endpoint. I
> saw that there is already a JIRA issue for that topic under
> https://issues.jboss.org/browse/KEYCLOAK-5289 <
> https://issues.jboss.org/browse/KEYCLOAK-5289>. If you agree, I would
> like to take over it because I already implemented the change in our fork.
> You can find the changes under
> https://github.com/yieldlab/keycloak/tree/hosted-domain-parameter-for-google-identity-provider
> <
> https://github.com/yieldlab/keycloak/tree/hosted-domain-parameter-for-google-identity-provider
> >.
> Unfortunately the existing tests fail on my machine and therefore I don’t
> want to create a PR yet. I think this is because my system’s locale is
> German. The summary of the failing test is
> Failed tests:
>   SAMLParserTest.testInvalidEndElement
> Expected: (an instance of
> org.keycloak.saml.common.exceptions.ParsingException and exception with
> message a string containing "The element type \"NameIDFormat\" must be
> terminated by the matching end-tag \"</NameIDFormat>\".")
>      but: exception with message a string containing "The element type
> \"NameIDFormat\" must be terminated by the matching end-tag
> \"</NameIDFormat>\"." message was "javax.xml.stream.XMLStreamException:
> ParseError at [row,col]:[31,11]
> Message: Elementtyp "NameIDFormat" muss mit dem entsprechenden Endtag
> "</NameIDFormat>" beendet werden."
> This comes because the exception’s message is translated to German but the
> test matches only the english version. Do you know about this? And what can
> I do (without changing my system’s locale) to pass the test? I already
> tried to pass '-Duser.country=DE -Duser.language=de‘ to Maven and the Maven
> Surefire Plugin but it didn’t help.
> Best regards,
> Steffen Kreutz
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev

More information about the keycloak-dev mailing list