[keycloak-user] Unknown authentication mechanism KEYCLOAK

Kevin Marsden kevinmarsden88 at gmail.com
Thu Feb 23 12:20:20 EST 2017


Hello Marek.

I managed(after some footwork to get all the dependencies in place),to get
the jax-rs quickstart to execute and deploy.

It appears that the problem was related to Keycloak libraries that where
not made available on the classpath when deploying the application,which
makes sense since I was attempting to use a netbeans jax-rs project,and not
the maven build process which takes into account all of the dependencies
required.

I am now able to authenticate requests using an access - token as expected.

Thanks for all the help !





On Wed, Feb 22, 2017 at 11:29 PM, Marek Posolda <mposolda at redhat.com> wrote:

I can't see anything obvious from the first look. Maybe there needs to
be "realm-name"
under "login-config" in web.xml? Do you have keycloak.json inside your WAR?


I suggest to look at our examples and compare those with your WAR file.

Marek


On 22/02/17 19:31, Kevin Marsden wrote:

Good Day.

I am unable to deploy a JAX-RS war to Wildfly 10.1,even after following the
instructions in the documentation to the letter.

I executed the patch script as follows :

jboss-cli.bat --connect --file="adapter-install.cli"
{"outcome" => "success"}
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}
{
    "outcome" => "success",
    "result" => [("keycloak" => "1.1.0")],
    "response-headers" => {"process-state" => "reload-required"}
}
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

My standalone.xml has been updated as follows :

               <extension module="org.keycloak.keycloak-adapter-subsystem"/>

                <security-domain name="keycloak">
                    <authentication>
                        <login-module
code="org.keycloak.adapters.jboss.KeycloakLoginModule" flag="required"/>
                    </authentication>
                </security-domain>

                <subsystem xmlns="urn:jboss:domain:keycloak:1.1"/>

My web.xml is as follows :

      <security-constraint>
        <web-resource-collection>
            <web-resource-name>webresources</web-resource-name>
            <url-pattern>/webresources/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>user</role-name>
        </auth-constraint>
    </security-constraint>

    <login-config>
        <auth-method>KEYCLOAK</auth-
method>
    </login-config>

    <security-role>
        <role-name>user</role-name>
    </security-role>

I would gladly appreciate any help at this stage.

Kind Regards.

Kevin.
_______________________________________________
keycloak-user mailing
listkeycloak-user at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/keycloak-user


More information about the keycloak-user mailing list