4 Replies Latest reply on Jan 16, 2013 8:26 AM by anilallewar

    Authentication not working for Teiid 8.3 Alpha 2

    anilallewar

      I am trying to get data from VDB using Teiid 8.3 Alpha 2 and my application has securuty domain setup. The application login works fine but it is failing when the application tries to get data from the VDB using a socket connection. This was working fine in Teiid 8.1 final.

       

      When I looked at the logs, it seems to be failing with a ClassNotFoundException which seems to happen because the "teiid client" module is calling code in "teiid-common core" while the code in "teiid common core" is trying to call a class defined in "teiid client" module. My assumption was that the module classloader would be parent first and the class definitions would be passed to "teiid common core" based on the dependencies defined in the teiid-client module.xml but that doesn't seem to be happening.

       

      Caused by: org.teiid.net.CommunicationException: TEIID20018 Unable to find a component used authenticate on to Teiid
       at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:144) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.net.socket.SocketServerConnection.<init>(SocketServerConnection.java:92) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.net.socket.SocketServerConnectionFactory.getConnection(SocketServerConnectionFactory.java:312) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:54) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       ... 64 more
      Caused by: org.teiid.core.TeiidComponentException: TEIID10006 Decryption failed: java.lang.ClassNotFoundException   org.teiid.client.security.LogonResult from [Module "org.jboss.teiid.common-core:main" from local module loader @7e1a9d1b (roots: F:\Softwares\jboss-as-7.1.1.Final\modules)]
       at org.teiid.client.util.ExceptionUtil.convertException(ExceptionUtil.java:59) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler.invoke(SocketServerInstanceImpl.java:374) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at $Proxy85.logon(Unknown Source) at org.teiid.net.socket.SocketServerConnection.logon(SocketServerConnection.java:173) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:125) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       ... 67 more
      Caused by: org.teiid.core.crypto.CryptoException: TEIID10006 Decryption failed: java.lang.ClassNotFoundException   org.teiid.client.security.LogonResult from [Module "org.jboss.teiid.common-core:main" from local module loader @7e1a9d1b (roots: F:\Softwares\jboss-as-7.1.1.Final\modules)]
       at org.teiid.core.crypto.BasicCryptor.unsealObject(BasicCryptor.java:181) [teiid-common-core-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.convertResult(SocketServerInstanceImpl.java:326) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.client.util.ResultsFuture.get(ResultsFuture.java:116) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:357) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler.invoke(SocketServerInstanceImpl.java:366) [teiid-client-8.3.0.Alpha2.jar:8.3.0.Alpha2]
       ... 70 more
      
       <security-domain name="dsds-security-domain" cache-type="default">
                          <authentication>
                              <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="optional">
                                  <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/>
                                  <module-option name="java.naming.provider.url" value="ldap://134.132.115.110:389"/>
                                  <module-option name="java.naming.security.authentication" value="simple"/>
                                  <module-option name="bindDN" value="CN=Administrator,CN=Users,DC=wif,DC=com"/>
                                  <module-option name="bindCredential" value="Landmark1"/>
                                  <module-option name="baseCtxDN" value="CN=Users,DC=wif,DC=com"/>
                                  <module-option name="baseFilter" value="(sAMAccountName={0})"/>
                                  <module-option name="allowEmptyPasswords" value="true"/>
                                  <module-option name="throwValidateError" value="true"/>
                                  <module-option name="java.naming.referral" value="follow"/>
                                  <module-option name="rolesCtxDN" value="CN=Users,DC=wif,DC=com"/>
                                  <module-option name="roleFilter" value="(sAMAccountName={0})"/>
                                  <module-option name="roleAttributeID" value="memberOf"/>
                                  <module-option name="roleNameAttributeID" value="cn"/>
                                  <module-option name="roleAttributeIsDN" value="true"/>
                                  <module-option name="roleRecursion" value="-1"/>
                                  <module-option name="searchScope" value="SUBTREE_SCOPE"/>
                                  <module-option name="password-stacking" value="useFirstPass"/>
                              </login-module>
                              <login-module code="UsersRoles" flag="required">
                                  <module-option name="usersProperties" value="${jboss.server.config.dir}/dsds-security-users.properties"/>
                                  <module-option name="rolesProperties" value="${jboss.server.config.dir}/dsds-security-roles.properties"/>
                                  <module-option name="password-stacking" value="useFirstPass"/>
                              </login-module>
                          </authentication>
                      </security-domain>
      ...........................
      ...........................
       
        <subsystem xmlns="urn:jboss:domain:teiid:1.0">
                  <async-thread-pool>
                      teiid-async
                  </async-thread-pool>
                  <policy-decider-module>
                      org.jboss.teiid
                  </policy-decider-module>
                  <resultset-cache infinispan-container="teiid"/>
                  <preparedplan-cache infinispan-container="teiid"/>
                  <transport name="embedded"/>
                  <transport name="jdbc" socket-binding="teiid-jdbc">
                      <authentication security-domain="dsds-security-domain"/>
                  </transport>
                  <transport name="odbc" socket-binding="teiid-odbc" protocol="pg">
                      <authentication security-domain="dsds-security-domain"/>
                  </transport>
                  <translator name="access" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="db2" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="derby" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="file" module="org.jboss.teiid.translator.file"/>
                  <translator name="h2" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="hive" module="org.jboss.teiid.translator.hive"/>
                  <translator name="hsql" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="infinispan-cache" module="org.jboss.teiid.translator.object"/>
                  <translator name="informix" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="ingres" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="ingres93" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="insite" module="com.lgc.teiid.translator.insite"/>
                  <translator name="interceptor" module="com.lgc.teiid.translator.delegate"/>
                  <translator name="intersystems-cache" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="jdbc-ansi" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="jdbc-simple" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="jpa2" module="org.jboss.teiid.translator.jpa"/>
                  <translator name="ldap" module="org.jboss.teiid.translator.ldap"/>
                  <translator name="loopback" module="org.jboss.teiid.translator.loopback"/>
                  <translator name="map-cache" module="org.jboss.teiid.translator.object"/>
                  <translator name="metamatrix" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="modeshape" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="mysql" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="mysql5" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="netezza" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="olap" module="org.jboss.teiid.translator.olap"/>
                  <translator name="openworks" module="com.lgc.teiid.translator.ow"/>
                  <translator name="oracle" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="postgresql" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="powerhub" module="com.lgc.teiid.translator.phub"/>
                  <translator name="salesforce" module="org.jboss.teiid.translator.salesforce"/>
                  <translator name="sqlserver" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="sybase" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="teiid" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="teradata" module="org.jboss.teiid.translator.jdbc"/>
                  <translator name="ws" module="org.jboss.teiid.translator.ws"/>
              </subsystem>
        • 1. Re: Authentication not working for Teiid 8.3 Alpha 2
          shawkins

          > When I looked at the logs, it seems to be failing with a ClassNotFoundException which seems to happen because the "teiid client" module is calling code in "teiid-common core" while the code in "teiid common core" is trying to call a class defined in "teiid client" module. My assumption was that the module classloader would be parent first and the class definitions would be passed to "teiid common core" based on the dependencies defined in the teiid-client module.xml but that doesn't seem to be happening.

           

          This exception is a regression with TEIID-2302.  The case of using the in-vm client module to make an socket connection was not appropriately accounted for.  The code would behave as expected if using a non-socket local connection or using the driver in a standalone manner to make a socket connection.  I'll address this case as well.

           

          Steve

          • 2. Re: Authentication not working for Teiid 8.3 Alpha 2
            anilallewar

            Steven,

             

             

            Can you please let me know by when you anticipate this fix to be in place? We can't even evaluate Teiid 8.3 for the multi-ds fixes unless we get this working.

             

             

            Anil

            • 3. Re: Authentication not working for Teiid 8.3 Alpha 2
              shawkins

              The fix is in if you want to build from latest.  I anticipate Beta1 in under a week.  You can also just use the workarounds from above:

               

              - if you are actually needing a local (in-vm) connection, then don't use a socket connection,

              - if you need a socket connection, then install the full client driver as a different module/driver and use that for the socket connection.

               

              Steve

              • 4. Re: Authentication not working for Teiid 8.3 Alpha 2
                anilallewar

                Please see https://community.jboss.org/message/792230#792230 for more information on what our use case and architecture is.

                 

                Since we create dynamic socket connection to VDB to get the data, we only have the option of in-vm socket connection. So I'll wait for Beta-1