4 Replies Latest reply on May 28, 2014 6:39 AM by glaucogoca

    EJB invocations from a remote server instance (jaas)

    diegolovison

      hello,

      this tutorial https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance work fine.

      But I would like try to do this using JAAS on the "Destination Server" to provide the authentication, but I dont have success..

      I searched at google, searched at this forum... tryed 300 thousand different manners and nothing.

      I'm using jboss 7.1.1

       

      Someone can help me with this?

      thanks

        • 1. Re: EJB invocations from a remote server instance (jaas)
          wdfink

          What you want to achieve?

          You might configure the connection in the remote-connections.

          I'm working on an example (quickstart) for this ...

           

          So please describe a bit more ...

          • 2. Re: EJB invocations from a remote server instance (jaas)
            diegolovison

            on standalone-full.xml in "Destination Server" I have

             

            <datasource jndi-name="java:jboss/datasources/myprojectDS" pool-name="projectDS" enabled="true" use-java-context="true">
                                <connection-url>jdbc:...............</connection-url>
                                <driver>................</driver>
                                <security>
                                    <user-name>user</user-name>
                                    <password>pass</password>
                                </security>
                            </datasource>
            ...................
            
            <subsystem xmlns="urn:jboss:domain:security:1.2">
                        <security-domains>
                            <security-domain name="myprojectSecurity" cache-type="default">
                                <authentication>
                                    <login-module code="abc.MyServerLoginModule" flag="required">
                                        <module-option name="dsJndiName" value="java:jboss/datasources/myprojectDS"/>
                                        <module-option name="principalsQuery" value="select ......."/>
                                        <module-option name="rolesQuery" value="select ........."/>
                                        <module-option name="legacyCreatePasswordHash" value="true"/>
                                        <module-option name="ignorePasswordCase" value="true"/>
                                    </login-module>
                                </authentication>
                            </security-domain>
            ..........
            
            

             

             

             

             

            my "ejb destination project" is called "myejb"

             

            myejb
                      ejbModule
                                 META-INF
                                            jboss-ejb3.xml
            

             

             

             

             

             

            the content of the jboss-ejb3.xml

             

            <?xml version="1.0" encoding="UTF-8"?>
            <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
                xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:security="urn:security" version="3.1" impl-version="2.0">
                <assembly-descriptor xmlns="http://java.sun.com/xml/ns/javaee">
                    <security:security xmlns:security="urn:security">
                        <security:security-domain>myprojectSecurity</security:security-domain>
                        <ejb-name>*</ejb-name>
                    </security:security>
                </assembly-descriptor>
            </jboss:ejb-jar>
            
            

             

             

             

            to send the password on the "client server" I have

             

                        <security-realm name="ejb-security-realm">
                            <server-identities>
                                <secret value="MWNpc3N1cGRhdGUl"/>
                            </server-identities>
                        </security-realm>
            
            

             

             

             

             

            the problem is that in UsernamePasswordLoginModule:274

            VARIABLE:VALUE

            username: myuser

            password: 97c1f029-ce68-4840-afeb-b1308ddb79fd

            expectedPassword: 1

             

            I read that when the password is 97c1f029-ce68-4840-afeb-b1308ddb79fd means that is a RANDOM PASSWORD.

             

            Other thing I use now JBoss AS 7.2.0.Alpha1-SNAPSHOT "Steropes"

            • 3. Re: EJB invocations from a remote server instance (jaas)
              diegolovison
              • 4. Re: EJB invocations from a remote server instance (jaas)
                glaucogoca

                diegolovison, do you have some success? because I'm dealing with the same problem.