11 Replies Latest reply on Aug 6, 2009 10:45 AM by Nikhil Gupta

    JBoss SSO not able to build the src folder..

    Nikhil Gupta Newbie

      I downloaded the src bundle for SSO from
      http://www.jboss.org/jbosssso/downloads/.

      and following the steps mentioned in wiki article at:
      http://www.jboss.org/community/wiki/StartFedSSO

      I am getting error while executing following steps:

      If the src bundle is downloaded, perform the following build steps by going to
      build (will build the project)
      build installSSO (will install the JBoss Federated SSO binaries into the JBoss Application Server


      Error message:
      C:\jboss-sso-1.0CR1\components\build>build
      Executing C:\jboss-sso-1.0CR1\components\build\..\tools\bin\ant.bat -logger org
      .apache.tools.ant.NoBannerLogger
      Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jdk1/5/0_1
      6\lib\tools/jar;C:\jboss-sso-1/0CR1\components\build\//\tools\lib\xml-apis/jar;C
      :\jboss-sso-1/0CR1\components\build\//\tools\lib\xercesImpl/jar;C:\jboss-sso-1/0
      CR1\components\build\//\tools\lib\xalan/jar;C:\jboss-sso-1/0CR1\components\build
      \//\tools\lib\saxon/jar;C:\jboss-sso-1/0CR1\components\build\//\tools\lib\option
      al/jar;C:\jboss-sso-1/0CR1\components\build\//\tools\lib\junit/jar;C:\jboss-sso-
      1/0CR1\components\build\//\tools\lib\explode/jar;C:\jboss-sso-1/0CR1\components\
      build\//\tools\lib\crimson/jar;C:\jboss-sso-1/0CR1\components\build\//\tools\lib
      \buildmagic-tasks/jar;C:\jboss-sso-1/0CR1\components\build\//\tools\lib\bsf/jar;
      C:\jboss-sso-1/0CR1\components\build\//\tools\lib\ant/jar;
      Press any key to continue . . .

      Same with the second step too.

      When I opened this Jboss SSO src folder in eclipse. I found some build errors:
      CookiePolicy.RFC_2109 cannot be resolved TokenValidationTestCase.java components/jboss_sso_test/src/main/test/jboss/security/token line 48 Java Problem
      Syntax error on token "}", AnnotationTypeDeclarationHeader expected after this token Enum.java components/build/ide/intellij/idea50/config/fileTemplates/internal line 4 Java Problem
      Syntax error on token "Invalid Character", @ expected AnnotationType.java components/build/ide/intellij/idea50/config/fileTemplates/internal line 1 Java Problem
      Syntax error on token "Invalid Character", @ expected Class.java components/build/ide/intellij/idea50/config/fileTemplates/internal line 1 Java Problem
      Syntax error on token "Invalid Character", @ expected Enum.java components/build/ide/intellij/idea50/config/fileTemplates/internal line 1 Java Problem
      Syntax error on token "Invalid Character", @ expected Interface.java components/build/ide/intellij/idea50/config/fileTemplates/internal line 3 Java Problem
      Syntax error on token "package", enum expected AnnotationType.java components/build/ide/intellij/idea50/config/fileTemplates/internal line 2 Java Problem
      The type $ is already defined AnnotationType.java components/build/ide/intellij/idea50/config/fileTemplates/internal line 4 Java Problem

      etc..


      please guide me how to install SSO properly.
      I am not seeing any place in this wiki where one has to make changes in JBoss server on which web/ear application would be running.


      I am using following setup with this JBoss SSO:
      Java : jdk1.5.0_16
      JBoss : jboss-4.2.3.GA
      Ant : Apache Ant version 1.7.0

      Please provide ur suggestion

      NIkhil


        • 2. Re: JBoss SSO not able to build the src folder..
          Nikhil Gupta Newbie

          Dear Anil,

          Thanks for the update.
          I went through the docs. It seems its another JBoss product for SSO.

          My need:
          I don't have to configure the IDP server. I need to provide SSO for my ear application. This SSO framework should be able to consume the SAML metadata and send back SAML response to IDP.

          Can this requirments be get with JBoss Identity or JBoss SSO?

          What is the problem with JBoss SSO? Why it is not building properly?
          Is there any way to access old version of JBoss SSO?


          Please help me I am stuck at very beginning of setup.

          Regards
          Nikhil

          • 3. Re: JBoss SSO not able to build the src folder..
            Anil Saldanha Master

            JBID has SAML2 metadata profile support. Unfortunately I have not documented it yet. It will be another 4-5 days before I can get to the doco.

            U can wait?

            • 5. Re: JBoss SSO not able to build the src folder..
              Nikhil Gupta Newbie

              Hi Anil,

              Thanks for your time and help!

              I will look the document for SAML.
              Does JBID framework to consume the SAML metadata?(I know answer is yes)
              Can it send back SAML response to IDP?

              Thanks
              Nikhil

              • 6. Re: JBoss SSO not able to build the src folder..
                Anil Saldanha Master

                Typically the metadata for an endpoint does not change a whole lot. That is why we have a Filebasedmetadataprovider by default (need to develop the other providers for db, ldap etc).

                But we can send back saml metadata response.

                • 7. Re: JBoss SSO not able to build the src folder..
                  Nikhil Gupta Newbie

                  Hi Anil,
                  Any how I am able to configure my enterprse application with JBOSS sso.
                  I created idp server and my application server.
                  The sso is working as standalone application and through the idp server too.

                  I debugged the code and found that in second scenario it creates SAML response and use it to verify th user's credential.

                  My requirment is:
                  I have to cosume the SAML assertion sent by outside idp provider. So configuration of this idp server is not in my hand.
                  idp vendor will send me the link(some form post data which have SAML assertion, may be I am wrong in words) of relying party which should unparse it and verify the user's credential. if user is authenticated I have to redirect him to my source.

                  Can you guide me how to do it with few example code?
                  My problem is that how to insert the outside SAML into my SSO configuration to autheticate and authorize the user?


                  Thanks
                  Nikhil

                  • 9. Re: JBoss SSO not able to build the src folder..
                    Nikhil Gupta Newbie

                    Hi Anil,

                    Thanks for the update for this feature. I will wait for this feature. It will really help me.

                    I was debugging the working setup of IDP and SP.
                    I could not follow the code flow. Do you have any document for class diagram or activity diagram to show it?

                    My understanding is:
                    On idp side...
                    1. User logged in in the system using login password(at idp server)
                    2. It creates AuthResponse in file SSOTokenManager>JBossSingleSignOn/generateAuthResponse
                    3. It uses Trust/generateSecret method to creates secret(hash code for login id) in step 2.
                    4.Then it try to validate this secret. It seems it is storing the same secret(created in step 2) at two places one in request parameter and second in map variable 'secretTokens' in file Trust.java. It is comparing the same thing. How is it validating? Please clarify it.

                    Now when we click on SP link:
                    1. It again creates the response and secret as above.
                    2. Try to validate by comparing the same secret stored at two location(request params and map variable).
                    On SP side it should compare the secret created on IDP side to validate the secret.

                    I am not understanding the last step in both at IDP and SP side.
                    In between, methods from sso.cfg.xml are called. what is importance of these methods in whole codeflow?

                    Kindly clarify it.

                    I have written a new servlet in sso-federation-server.ear and using some hard coded SAML1.0 stuff to validate it. I am seeing some positive results.
                    but not understanding the whole code flow.

                    Regards
                    Nikhil

                    • 10. Re: JBoss SSO not able to build the src folder..
                      Nikhil Gupta Newbie

                      Hi Anil,

                      I am trying to use some more jar file during customizing the JBoss SSO code. I am using 'commons-fileupload-1.2.1.jar,commons-io-1.4.jar'. I include them into eclipse class path. Eclipse compiler is compiling it without any error. But when I am trying to deploy the new updated code with ant build.xml, I am getting following error. I know during ant build it may not be getting the class path. Where to specify it? I tried specifying it in file 'jboss-sso-1.0CR1\components\tools\etc\buildfragments\libraries.ent', but getting the same build error. Please help me.

                      I added following lines in jboss-sso-1.0CR1\components\tools\etc\buildfragments\libraries.ent :

                      <property name="multi-part.root" value="${project.thirdparty}/multi-part"/>
                       <property name="multi-part.lib" value="${multi-part.root}/lib"/>
                       <path id="multi-part.classpath">
                       <filelist dir="${multi-part.lib}" files="commons-fileupload-1.2.1.jar,commons-io-1.4.jar"/>
                       </path>



                      Deploy error using ant build.xml:
                      configure-libraries:
                      configure-modules:
                      configure-defaults:
                      configure-tools:
                      init:
                      _default:compile-classes:
                       [javac] Compiling 1 source file to C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\output\classes
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:49: package org.apache.commons.fileupload does not exist
                      [execmodules] import org.apache.commons.fileupload.FileItem;
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:50: package org.apache.commons.fileupload does not exist
                      [execmodules] import org.apache.commons.fileupload.FileUploadException;
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:51: package org.apache.commons.fileupload.servlet does not exist
                      [execmodules] import org.apache.commons.fileupload.servlet.ServletFileUpload;
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:151: cannot find symbol
                      [execmodules] symbol : variable ServletFileUpload
                      [execmodules] location: class org.jboss.security.federation.servlet.SSOFederationDRxServer
                      [execmodules] boolean isMultiPart = ServletFileUpload.isMultipartContent(request);
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:154: cannot find symbol
                      [execmodules] symbol : class ServletFileUpload
                      [execmodules] location: class org.jboss.security.federation.servlet.SSOFederationDRxServer
                      [execmodules] ServletFileUpload fileUpload = new ServletFileUpload();
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:154: cannot find symbol
                      [execmodules] symbol : class ServletFileUpload
                      [execmodules] location: class org.jboss.security.federation.servlet.SSOFederationDRxServer
                      [execmodules] ServletFileUpload fileUpload = new ServletFileUpload();
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:161: cannot find symbol
                      [execmodules] symbol : class FileUploadException
                      [execmodules] location: class org.jboss.security.federation.servlet.SSOFederationDRxServer
                      [execmodules] } catch (FileUploadException e) {
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:169: cannot find symbol
                      [execmodules] symbol : class FileItem
                      [execmodules] location: class org.jboss.security.federation.servlet.SSOFederationDRxServer
                      [execmodules] FileItem item = (FileItem) itr.next();
                      [execmodules] ^
                      [execmodules] C:\App\workspaces\drxworkspace\jboss-sso-1.0CR1\components\jboss_federation_server\src\main\org\jboss\security\federation\servlet\SSOFederationDRxServer.java:169: cannot find symbol
                      [execmodules] symbol : class FileItem
                      [execmodules] location: class org.jboss.security.federation.servlet.SSOFederationDRxServer
                      [execmodules] FileItem item = (FileItem) itr.next();
                      [execmodules] ^
                      [execmodules] 9 errors
                      


                      • 11. Re: JBoss SSO not able to build the src folder..
                        Nikhil Gupta Newbie

                        Hi Anil,

                        I got the solution of ant build issue.
                        I added new classpath in build.xml of module sso-federation-server.

                        jboss-sso-1.0CR1\components\jboss_federation_server\build.xml:
                         <!-- Configure thirdparty libraries -->
                         <call target="configure-libraries"/>
                         <path id="library.classpath">
                         <path refid="sun.servlet.classpath"/>
                         <path refid="jakarta.log4j.classpath"/>
                         <path refid="org.opensaml.classpath"/>
                         <path refid="jboss-system.classpath"/>
                         <path refid="multi-part.classpath"/>
                         </path>



                        Now ant deploy is working.

                        Thanks
                        Nikhil