1 Reply Latest reply on Oct 23, 2014 3:08 AM by hchiorean

    ModeShape webapps authentication

    sv0005

      Hi, many thanks for ModeShape and your hard work on it.

       

      I am trying to authenticate to ModeShape Explorer and WebDAV modules with the links below, but the modules reject my credentials.

       

      http://localhost:8080/modeshape-explorer/

      http://localhost:8080/modeshape-webdav/artifacts/default/

       

      * I'm on Win XP SP3.

      * I installed wildfly-8.1.0.Final.

      * I set JBOSS_HOME to point to the WildFly directory.

      * I unzipped modeshape-4.0.0.Final-jboss-wf8-dist.zip to the WildFly directory.

      * I created users in both management and app realms with /bin/add-user.bat.

      * I start WildFly with /bin/standalone.bat --server-config=standalone-modeshape.xml.

      * The admin console of WildFly accepts the created management user's credentials, and I can see the modeshape modules listed as deployed and enabled.

      * When I hit the links to the modules, my browser asks for credentials, and as I try admin/admin (as in integration tests) or both users, it doesn't accept either.

       

      Any help is highly appreciated.

      Sergei

        • 1. Re: ModeShape webapps authentication
          hchiorean

          Since ModeShape 4, the default modeshape-security domain uses the Application Realm. So if you use the out-of-the-box configuration file, you need to run the add-user script and add users to the Application Realm.

          When you add those users, you need to make sure you given them one the "admin", "readwrite", "read" and "connect" roles. This last role is required to be able to access any of the Modeshape webapps that are deployed in WF.

           

          So the steps that you mentioned above are correct (although you just need to add users to the Application Realm) but you need to make sure you give your user(s) the above roles. IIRC when using the add-user utility the roles are comma-separated.

          If you're using the non-interactive approach, after you've added a user you can just edit the configuration/application-roles.properties file and add the roles there (beware of spaces - don't use spaces after commas because that will create invalid role names)

           

          I've also updated this section in our documentation: Installing ModeShape into Wildfly - ModeShape 4 - Project Documentation Editor