1 2 Previous Next 19 Replies Latest reply: Oct 26, 2012 9:05 AM by glenn.s RSS

    Window authentication - Required by application

    Gunjan Ahuja
      Hi..

      Can anybody tell me how to handle window level authentication which has been implemented in one of my application.

      While recording scripts with OATS , the window authentication step is not recording , I tried to recording with protocols like:-

      1) Web/HTTP
      2) Oracle EBS/Forms
      3) Oracle Fusion/ADF

      But none of them is able to record window authentication process.Please support.

      Thanks
      Gunjan
        • 1. Re: Window authentication - Required by application
          Jamie_Lockhart
          Hi,

          Are you using OATS 12.x? This version should record the authentication step automatically, I think. You can add the authentication step manually using http.addAuthentication(). See Glenn's instructions in the post Re: Load testing OracleBPM appliation with SSO enabled using OLT module of OATS

          Regards,
          Jamie
          • 2. Re: Window authentication - Required by application
            Gunjan Ahuja
            Hi Jamie

            Currently, I am using OpenScript

            Version: 9.3.0.0 Production
            Build ID: 2.6.0.0272
            • 3. Re: Window authentication - Required by application
              Jamie_Lockhart
              Hi Gunjan,

              OK. Use the http.addAuthentication() method as illustrated in the post I linked to.

              Jamie
              • 4. Re: Window authentication - Required by application
                Gunjan Ahuja
                Hi Jamie

                I tried to add authentication method but it is not working as my application will be not able to access if the windows authentication failed.

                and while recording it asks for authentication which is not recording and further transaction cannot be access without the same.This is the step I have added

                *public void run() throws Exception {*
                http.addAuthentication("https://xxx.xom", "<domainname>\\<userid>","<passwrd>");

                If I alone execute bold part then it is passed but further I am not able to record anything.

                Thanks
                Gunjan
                • 5. Re: Window authentication - Required by application
                  Jamie_Lockhart
                  Hi Gunjan,

                  Maybe I misunderstood. So, you cannot even record a script because the authentication fails? When not recording you can use the application fine? Is it a functional script or load test script you are trying to create? What kind of authentication is it - NTLM?

                  Jamie
                  • 6. Re: Window authentication - Required by application
                    Gunjan Ahuja
                    Hi Jamie

                    I clear you the exact scenario my application will only be accessed if specified domain/username/password are authenticated. And while recording or on manual access we need to authenticate by entering the details in the window and then can move further to access any step of the application But as I mentioned I am unable to record window authentication part while recording and further cannot even record my application steps for load testing.

                    Here, I am using the load testing (HTTP Protocol) scripts. Yes, right I can use my application on manual access (without recording) which is perfectly fine. Yes, it is kind of NTLM. To tell more in brief I have prepared its functional script which I am able to record and working fine too.

                    Although I have started downloading OATS version 12.x which I will see if works.

                    Hope this helps in understanding my problem.

                    Thanks
                    Gunjan
                    • 7. Re: Window authentication - Required by application
                      Gunjan Ahuja
                      Hi Jamie

                      Just an update I am able to record whole script(including authentication) with version 12.x of OATS but on playback it gives error at authentication.


                      oracle.oats.scripting.modules.http.api.exceptions.ThinBrowserException: HTTP response code: 401  Unauthorized
                      *     at oracle.oats.scripting.modules.http.api.exceptions.ThinBrowserException.createErrorInvalidHttpResponseCode(ThinBrowserException.java:66)*
                      *     at oracle.oats.scripting.modules.http.api.internal.ResponseCodeValidator.validate(ResponseCodeValidator.java:21)*
                      *     at oracle.oats.scripting.modules.http.api.internal.AbstractHTTPService.validate(AbstractHTTPService.java:953)*
                      *     at oracle.oats.scripting.modules.http.api.internal.AbstractHTTPService.navigate(AbstractHTTPService.java:521)*
                      *     at oracle.oats.scripting.modules.http.api.internal.AbstractHTTPService.doNavigate(AbstractHTTPService.java:424)*
                      *     at oracle.oats.scripting.modules.http.api.internal.InternalHTTPService.get(InternalHTTPService.java:1937)*
                      *     at oracle.oats.scripting.modules.http.api.internal.browser.WebHTTPNavigator.get(WebHTTPNavigator.java:40)*
                      *     at oracle.oats.scripting.modules.http.api.internal.domElement.AbstractWindowElement.get(AbstractWindowElement.java:106)*
                      *     at oracle.oats.scripting.modules.http.api.elements.WebHTTPTestObject.get(WebHTTPTestObject.java:451)*
                      *     at oracle.oats.scripting.modules.http.api.elements.WebHTTPWindow.get(WebHTTPWindow.java:54)*
                      *     at script.run(script.java:30)*
                      *     at oracle.oats.scripting.modules.basic.api.IteratingVUser.run(IteratingVUser.java:342)*
                      *     at oracle.oats.scripting.modules.basic.api.internal.IteratingAgent.run(IteratingAgent.java:770)*
                      *     at java.lang.Thread.run(Thread.java:619)*


                      Thanks
                      Gunjan
                      • 8. Re: Window authentication - Required by application
                        Jamie_Lockhart
                        Hi Gunjan,

                        So, the authentication is not happening hence the 401. Difficult to offer a reason without more information to be honest. Correct user authentication details? Have you compared the headers from the playback and recorded pages?

                        Jamie
                        • 9. Re: Window authentication - Required by application
                          Gunjan Ahuja
                          Hi Jamie

                          Yes the authentication is right. I have compared that too but there are authentication line inlcuding some encrytped values starting from NTLM written in recorded part and the complete authentication line is missing in playback section

                          Thanks
                          Gunjan
                          • 10. Re: Window authentication - Required by application
                            glenn.s
                            Are you sure you have the username correct? The domain name should be in the username parameter string.

                            http.addAuthentication("https://hostname", "<domainname>\<userid>","<passwrd>");

                            Also add a second call to non-HTTPS if any of your script navigations are not https. Be sure to authenticate for all hosts that are part of the script.

                            http.addAuthentication("http://hostname", "<domainname>\<userid>","<passwrd>");
                            • 11. Re: Window authentication - Required by application
                              Jamie_Lockhart
                              Good point, Glenn. I think you should be able to use * as wildcard to cover all domains, e.g.

                              http.addAuthentication("https://*", "<domainname>\<userid>","<passwrd>");

                              Jamie
                              • 12. Re: Window authentication - Required by application
                                Gunjan Ahuja
                                HI

                                I have tried both the level of authentication by adding https and http but it is not working
                                • 13. Re: Window authentication - Required by application
                                  Gunjan Ahuja
                                  Hi

                                  I tried to do it with OATS version 12.1 but again 401- unauthorised.

                                  While referring to tutorials placed on Oracle site i have seen that NTLM authentication handled in version 9.x was error prone and it will be fixed in version 12.2

                                  http://www.oracle.com/webfolder/technetwork/tutorials/tutorial/em/ATS121_NFTraining_Ext_v1.pdf


                                  Please refer to this section in above PDF :- ATS 12.1 - New Features and Updates

                                  Thanks
                                  Gunjan
                                  • 14. Re: Window authentication - Required by application
                                    glenn.s
                                    The change for Authentication in OATS 12.x only refers to the automatically created code. Regardless of how the code is created, you still must ensure the parameters to the addAuthentication() call are correct.

                                    You have not answered the question about the domain prefix in the user name field. Please show your code:

                                    1) Show the addAuthentication line
                                    http.addAuthentication("https://*", "<domainname>\<userid>","<passwrd>");
                                    2) Show the code for first navigation that is failing
                                    3) Show the log from playback of the request and response header of that first navigation
                                    1 2 Previous Next