[keycloak-user] Unknown authentication mechanism KEYCLOAK

Marko Strukelj mstrukel at redhat.com
Wed Nov 25 15:32:27 EST 2015


Sounds as if the last line from adapter-install.cli (
https://github.com/keycloak/keycloak/blob/master/distribution/adapters/shared-cli/adapter-install.cli)
wasn't executed.

It should result in the following line in your standalone.xml:

<subsystem xmlns="urn:jboss:domain:keycloak:1.1"/>
On Nov 25, 2015 20:37, "Stian Thorgersen" <sthorger at redhat.com> wrote:

> Try following:
>
> http://blog.keycloak.org/2015/10/getting-started-with-keycloak-securing.html
>
> And see if you can get it working.
>
> On 25 November 2015 at 18:58, Rens Verhage <Rens.Verhage at topicus.nl>
> wrote:
>
>> Unfortunately, installing the adapter didn’t solve my problem. After
>> installing the adapter, I ran the adapter-install.cli script and checked
>> that the following has been added to my standalone.xml configuration:
>>
>> Under extensions:
>>
>>         <extension module="org.keycloak.keycloak-adapter-subsystem”/>
>>
>> There is a subsystem added in the profiles section:
>>
>>         <subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">
>>             <web-context>auth</web-context>
>>         </subsystem>
>>
>> Also, the following security-domain has been added within the <subsystem
>> xmlns=“urn:jobs:domain:security:1.2”> element:
>>
>>         <security-domain name="keycloak">
>>             <authentication>
>>                 <login-module
>> code="org.keycloak.adapters.jboss.KeycloakLoginModule" flag="required"/>
>>             </authentication>
>>         </security-domain>
>>
>> Still, I get the same “UT010039: Unknown authentication mechanism
>> KEYCLOAK” error. Could there be more configuration that I have missed?
>>
>> By the way, my first attempt was based on the video tutorials by Bill
>> Burke, they seem to be outdated.
>>
>>
>> /Rens
>>
>>
>> > On Nov 23, 2015, at 10:05, Rens Verhage <Rens.Verhage at topicus.nl>
>> wrote:
>> >
>> > Ah, I didn’t install the adapter. I was under the impression that
>> everything in the download with wildfly container would be pre-configured.
>> Having read the adapter chapter, I understand why this assumption was wrong.
>> >
>> > Thanks!
>> >
>> >
>> >> On Nov 23, 2015, at 09:46, Marek Posolda <mposolda at redhat.com> wrote:
>> >>
>> >> You also need to enable adapter subsystem in standalone.xml :
>> >>
>> >> <extension module="org.keycloak.keycloak-adapter-subsystem"/
>> >>
>> >>
>> >>
>> >> Take a look at docs (especially adapter part) for more details.
>> >>
>> >> Marek
>> >>
>> >>
>> >> On 22/11/15 18:53, Rens Verhage wrote:
>> >>> Hi all,
>> >>>
>> >>> I’m having some trouble securing a test application with Keycloak. I
>> downloaded the keycloak-1.6.1.Final.zip. First thing I did was changing the
>> datasource to PostgreSQL and in Keycloak configured my realm and generated
>> a keycloak.json file.
>> >>>
>> >>> I copied keycloak.json to the WEB-INF folder of my war project and
>> edited my web.xml, I added this:
>> >>>
>> >>> <login-config>
>> >>>   <auth-method>KEYCLOAK</auth-method>
>> >>>   <realm-name>PDC</realm-name>
>> >>> </login-config>
>> >>>
>> >>> <security-role>
>> >>>   <role-name>admin</role-name>
>> >>> </security-role>
>> >>> <security-role>
>> >>>   <role-name>user</role-name>
>> >>> </security-role>
>> >>>
>> >>> Upon boot however, Wildfly logs the following error:
>> >>>
>> >>> "WFLYCTL0080: Failed services" =>
>> {"jboss.undertow.deployment.default-server.default-host./pdc-web" =>
>> "org.jboss.msc.service.StartException in service
>> jboss.undertow.deployment.default-server.default-host./pdc-web:
>> java.lang.RuntimeException: java.lang.RuntimeException: UT010039: Unknown
>> authentication mechanism KEYCLOAK
>> >>>    Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
>> UT010039: Unknown authentication mechanism KEYCLOAK
>> >>>    Caused by: java.lang.RuntimeException: UT010039: Unknown
>> authentication mechanism KEYCLOAK”}}
>> >>>
>> >>> The only hint to fix this error that I could find was to make sure
>> that the Keycloak subsystem is enabled in
>> standalone/configuration/standalone.xml, which is the case as I didn’t
>> change the default config:
>> >>>
>> >>> <server xmlns="urn:jboss:domain:3.0">
>> >>>    <extensions>
>> >>>     ...
>> >>>        <extension module="org.keycloak.keycloak-server-subsystem"/>
>> >>>        ...
>> >>>    </extensions>
>> >>> …
>> >>> </server>
>> >>>
>> >>> As my experience with Wildfly and knowledge of Keycloak is limited,
>> what could be the problem here?
>> >>>
>> >>>
>> >>> Regards,
>> >>> Rens Verhage
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> keycloak-user mailing list
>> >>> keycloak-user at lists.jboss.org
>> >>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>> >>
>> >
>> >
>> > _______________________________________________
>> > keycloak-user mailing list
>> > keycloak-user at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20151125/2bbc1cd1/attachment-0001.html 


More information about the keycloak-user mailing list