5 Replies Latest reply on Jan 7, 2015 9:38 AM by Manuel Schatzl

    JBoss7.1.1.Final Security port to Wildfly 8.2.Final

    Manuel Schatzl Newbie

      hello jboss community!


      i ve written my own login module and cant get it running on wildfly...(i need some stuff from java8 so ive to update..) on jboss7 everything works just fine, but on the wildfly side i always get an 401 error...


      what i mean is - that i dont believe that my application server does use my login module, because nothing shows up in the log..


      Log after start and trying to log in with my android client (which works with Volley.. a http library from google)

      10:01:22,871 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 31) JBAS018559: Deployed "server-wildfly-ear.ear" (runtime-name : "server-wildfly-ear.ear")
      10:01:22,948 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on
      10:01:22,948 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on
      10:01:22,949 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 4927ms - Started 471 of 536 services (122 services are lazy, passive or on-demand)

      sure.. basic log after starting the server..


      and nothing then a "401 forbidden" on client side:

      12-11 10:05:47.523: E/Volley(27433): [2623] BasicNetwork.performRequest: Unexpected response code 401 for

      (same with my internet explorer)


      my web.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns="http://java.sun.com/xml/ns/javaee"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"



      <?xml version="1.0" encoding="UTF-8"?>


      standalone security realm: (full.xml)

      <security-realm name="MyRealm">
                          <ssl protocol="TLS">
                              <keystore path="server.jks" relative-to="jboss.server.config.dir" keystore-password="password"/>


      standalone security domain: (full.xml)

      <security-domain name="my_auth" cache-type="default">
                              <login-module code="com.test.server_wildfly.security.CustomLoginModule" flag="required"/>


      standalone ssl/tls stuff: (full.xml)

      <server name="default-server">
                      <http-listener name="default" socket-binding="http"/>
                      <https-listener name="https" socket-binding="https" security-realm="MyRealm"/>


      something must be wrong with the config, as i said jboss7 is no problem


      maven dependency for the wildfly project: (for the login module stuff)



      what i also tryed was:

      1) <default-security-domain value="other"/> - to my security domain "my_auth"

      2) removed valve from jboss-web.xml - because it isnt used?

      3) used another picketbox version

      4) remove everything from web.xml - which turned off, obviously, the login stuff so its deff. a configuration problem

      5) tryed wildfly8 and 8.1 too


      any advice? thank u very much