SOAP UI - Basic Authentication - where do I find it in Server Code?
I have a SOAP Server written in PHP - and am Testing using SOAP UI. Everything works fine and returns results as expected. I am now trying to add in Basic Authentication - have set up in SOAP UI with Username and Password - BUT can't find how to check it in the Server code? I was expecting the credentials to be in the [SERVER] object passed to the server - but they are not. Can anyone help and advise how I check these items? Thanks PhilSolved12KViews0likes11CommentsHow to generate the same Bearer token as Swagger?
I have given an API which uses Basic_auth for Authentication. it requires 'username', 'password', (type:basic_auth), 'ClientId' and 'secret'. I use the Swagger UI to authenticate and it works perfectly fine: the Curl will look like this: curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1ZR0FtX2hHeWRvYWhrSGtlcjRlaTRiTXRSUSIsImtpZCI6Ik1ZR0FtX2hHeWRvYWhrSGtlcjRlaTRiTXRSUSJ9.eyJpc3MiOiJDdXN0b21lckNsdWJXZWJTZXJ2aWNlIiwiYXVkIjoiQ3VzdG9tZXJDbHViV2ViU2VydmljZS9yZXNvdXJjZXMiLCJleHAiOjE1NjM4NzY2MTEsIm5iZiI6MTU2MzI3MTgxMSwiY2xpZW50X2lkIjoiY3VzdG9tZXJjbHViIiwic2NvcGUiOlsib3BlbmlkIiwicHJvZmlsZSIsInVzZXJfaW5mbyJdLCJzdWIiOiJjdXN0b21lcmNsdWIiLCJhdXRoX3RpbWUiOjE1NjMyNzE4MTEsImlkcCI6Imlkc3J2IiwicHJpbWFyeV9zaWQiOiJjdXN0b21lcmNsdWIiLCJ1cG4iOiJjdXN0b21lcmNsdWIiLCJuYW1lIjoiY3VzdG9tZXJjbHViIiwiZ2l2ZW5fbmFtZSI6ImN1c3RvbWVyY2x1YiIsImp0aSI6IjRhMGUyZjNkYjUzYjY2ZGQxMDIwMmJkNmVmNzM4OWJjIiwiYW1yIjpbImN1c3RvbSJdfQ.YY1CzHzWPK_E1S7y8TDrwRT0orCS9zfN-4n5pTC1zYMomkOkJOdpvmSZyrabirBeLpGi870T9H-z9ufkYX5B1bPZlQlQRAAaDPeq_pV7Gls9EPLhAK8uXK4i5jaF1aNN5hiBP6fAJZxhZnHsmUevXs6y5s9FJeVZ1vPpDfJ69d3rrTvte_2A6hEE6fpkYeZGUKRS8eTaWHSrdZh9-18FaQN4VGbCCtsHR7x-A2HMLIG8q9MWp6iu_KDJ95wOHO_tp--AER4CoGta0HrleI7CNUBz43TN-kEklmzVCODuFA7varUIAiee4Zd2PKG7MlGEdkOBA5qwoX1HhsobGOI5ZA' ' The problem is, every time the token expires, I have to come back and use the Swagger UI to authenticate, and copy the Bearer token to my app. I would like to know, how Swagger is creating it? And how could I implement it on my machine so that everytime it expires, my app creates it itself instead of getting an error and changing it? I tried many ways, but I couldn't get the Bearer token the way Swagger gets it. It only works when Swagger creates it.5.7KViews0likes2CommentsREST Basic Authentication error at endpoint level
Version 5.2.1 on Windows When I add my HTTP Basic Authentication to individual REST requests, it works fine with my service. When I add the same username and password to my endpoint definition instead, I get an apache.httpclient.ClientProtocolException. Here are the log excerpts (with host names obscured). Note the original project endpoint was localhost:9080 (without authentication required), and the new one with it required is what I'm showing as real-endpoint-server. From SoapUI log: Tue Dec 01 18:35:44 CST 2015:DEBUG:Loading Definition... Tue Dec 01 18:35:44 CST 2015:INFO:Loading schema types from [http://localhost:9080.wadl] Tue Dec 01 18:35:44 CST 2015:INFO:Getting schema http://localhost:9080.wadl Tue Dec 01 18:35:44 CST 2015:DEBUG:Loaded Definition: ok Tue Dec 01 18:36:12 CST 2015:DEBUG:Attempt 1 to execute request Tue Dec 01 18:36:12 CST 2015:DEBUG:Sending request: GET /rbm/vehicle/my-item-number?vin=my-vin HTTP/1.1 Tue Dec 01 18:36:12 CST 2015:DEBUG:Receiving response: HTTP/1.1 401 Not authorized. Authentication required for protected file. Tue Dec 01 18:36:12 CST 2015:DEBUG:Connection can be kept alive indefinitely Tue Dec 01 18:36:12 CST 2015:DEBUG:Target requested authentication Tue Dec 01 18:36:12 CST 2015:DEBUG:Authorization challenge processed Tue Dec 01 18:36:12 CST 2015:DEBUG:Authentication scope: BASIC 'Renew_by_Mail'@real-endpoint-server:443 Tue Dec 01 18:36:12 CST 2015:INFO:real-endpoint-server:443 requires authentication with the realm 'Renew_by_Mail' Tue Dec 01 18:36:12 CST 2015:DEBUG:Found credentials Tue Dec 01 18:36:12 CST 2015:DEBUG:Attempt 2 to execute request Tue Dec 01 18:36:12 CST 2015:DEBUG:Sending request: GET /rbm/vehicle/my-item-number?vin=my-vin HTTP/1.1 Tue Dec 01 18:36:18 CST 2015:DEBUG:Connection closed Tue Dec 01 18:36:18 CST 2015:DEBUG:Connection shut down Tue Dec 01 18:36:18 CST 2015:ERROR:Exception in request: org.apache.http.client.ClientProtocolException Tue Dec 01 18:36:18 CST 2015:ERROR:An error occurred [org.apache.http.client.ClientProtocolException], see error log for details Tue Dec 01 18:36:18 CST 2015:INFO:Error getting response for [http://localhost:9080.vehicle:06975686]; org.apache.http.client.ClientProtocolException From error log: Tue Dec 01 18:36:18 CST 2015:ERROR:org.apache.http.client.ClientProtocolException org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:290) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:220) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:109) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247) at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doReceiveResponse(HttpClientSupport.java:147) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) ... 11 more However, in http log, it does appear that a reasonable-looking reply was returned, along with a 200 response code. Which also matches my server's http log.5.3KViews0likes11CommentsNo Community Help with SAML 2 Config Posts. Can some provide an example of SAML(XML) 2 in SoapUI?
I'm having difficulty configuring SAML authentication using SoapUI Pro and I've read many similar posts in Open Source community; however, they go unanswered. For example, "Could some give a sample example of SAML(XML) in SoapUI WS configuration" and "Enveloped Signature for SAML (XML) WSS Entry". SmartBear's page doesn't provide an example SAML(XML) Assertion. Collaborator has a page that goes into some depth to help the customer, but not SoapUI OS or Pro. We use ForgeRock's OpenAM to setup SAML and I think I’ve gleaned as much as I can from it. For instance, XML Canonicalization algorithm, XML digest algorithm, XML signature algorithm, ID Token Signing Algorithms supported, ID Token Encryption Algorithms supported, Circle of Trust, etc.; however, there’s no 1-for-1 match between what OpenAM provides that SoapUI Pro asks for. I've asked our DevOps/Integration teams for a SAML(XML) Assertion, but they haven't been able to accommodate, yet. Could someone give a sample example of SAML(XML) in SoapUI WS configuration? Regards,Solved3.9KViews0likes6CommentsBasic Auth and Endpoint Explorer
I'm slightly embarassed to post this, but I'm currently stumped on the issue. Question: What are the potential issues that would allow Endpoint Explorer to succeed when a test step for the same URI fails? Basically, while using Endpoint Explorer I get a proper and successful response from an API that requires basic authentication while it fails in a test step. I was using Endpoint Explorer to troubleshoot the authentication issue at the time I succeeded in receiving a proper response message. The last thing I had configured, and I know this may seem odd, was Outgoing and Incoming WS-Security Configurations. I have even configured the Keystore, the Username and Password in the Request Properties, and the Auth Basic (Built-in) Authorization tab. At the API level, I don't see the the basic Authentication creditials request, so I'm basically trying everything I can think of to authenticate. The keystore configuration was done as an earlier effort to automated the x.509 authentication, but was put on hold in favor of getting tests created over basic auth first. (see below example URI and the responses I've gathered) Example: GET https://<FQDN>/otm-console/controllers/SelectZone/json Fail Response using Test Step (redirect options "on"): HTTP/1.1 200 OK Date: Wed, 09 Oct 2019 21:54:45 GMT Server: JBoss-EAP/7 Strict-Transport-Security: max-age=600 X-Powered-By: Undertow/1 X-Frame-Options: SAMEORIGIN Accept-Ranges: bytes Last-Modified: Sat, 05 Oct 2019 01:48:26 GMT Content-Type: text/html Content-Length: 2898 Access-Control-Allow-Origin: * Keep-Alive: timeout=15, max=100 Connection: Keep-Alive <html style="min-width: 600px; overflow: initial"> <head> <style id="antiClickjack">body{display:none !important;}</style> </head> <body style="min-width: 600px; overflow: initial"> <link rel="stylesheet" href="vendor/css/bootstrap.min.css" crossorigin="anonymous"> <link rel="stylesheet" href="css/welcome.css"> <script src="vendor/js/jquery.min.js" crossorigin="anonymous"></script> <script src="vendor/js/bootstrap.min.js" crossorigin="anonymous"></script> <script src="login_config.js" crossorigin="anonymous"></script> <script src="login.js" crossorigin="anonymous"></script> <script type="text/javascript"> if (self === top) { var antiClickjack = document.getElementById("antiClickjack"); antiClickjack.parentNode.removeChild(antiClickjack); } else { top.location = self.location; } </script> <header> <nav class="navbar navbar-default navbar-fixed-top jfd-nav-header"> <div class="header"> <div class="classBar"></div> </div> </nav> </header> <div class="container agreement-container"> <div class="agreement"> <p><h4><strong>TEXT</strong></h4></p> <p>TEXT</p> <ul> <li>Text <li>Text <li>Text <li>Text <li>Text </ul> <div class="text-center"> <button class="btn btn-primary" onClick="window.open('welcome.html', '_self'); return false;">I Accept</button> </div> </div> </div> <div class="navbar navbar-default navbar-fixed-bottom"> <div class="classBar"></div> </div> </body> </html> Other Info Gathered: If I insert a previously used JSESSIONID into the header the response is: HTTP/1.1 401 Unauthorized Server=JBoss-EAP/7 Strict-Transport-Security=max-age=600 WWW-Authenticate=Basic realm="HAB" X-Powered-By=Undertow/1 Content-Type=text/html;charset=UTF-8 Content-Length=114 Set-Cookie=JSESSIONID=abcdefghijklmnopqurtuvReadMe.avf-d-hab; path=/hab Access-Control-Allow-Origin= Success Response using Endpoint Explorer: HTTP/1.1 200 OK Date=Wed, 09 Oct 2019 21:53:05 GMT Server=JBoss-EAP/7 Strict-Transport-Security=max-age=600 X-Powered-By=Undertow/1 Content-Type=application/json Content-Length=343 Access-Control-Allow-Origin=* Keep-Alive=timeout=15, max=97 Connection=Keep-Alive {"page":1,"total":1,"records":2,"rows":[{"id":"ABC","cell":["ABC ","ABC","ABC_Default ","SQL ","POSTGRES ","ActiveMQSSL "," "," "]},{"id":"CDB","cell":["CDB ","CDB","CDB_Default ","SQL ","POSTGRES ","ActiveMQSSL "," "," "]}]} What are the potential issues that would allow Endpoint Explorer to succeed when a test step for the same URI fails? If I use the "Create Test" option using Endpoint Explorer I receive the following SoapUI Error pop-up: Could not get JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [50000-197]Solved3KViews0likes2CommentsHow to retrieve a value from the request header?
Hi All, I have a service sending below request headers to my virt. I want to store the value of theoauth_callback present under Authorization header, highlighted in red and store this in a property and then use it in a subsequent response. { 'Connection': 'keep-alive', 'Accept': '*/*', 'Content-Length': '0', 'Accept-Encoding': 'gzip, deflate', 'Authorization': 'OAuth oauth_nonce="123123123123123", oauth_timestamp="12312312123", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="XXXXXXXXXXX", oauth_callback="http%3A%2F%2Flocalhost%3YYYYYYYYY", oauth_signature="AAAAAAAAAAAA"' } How can i store this value? Using below, i am able to store the value of authorization header, however, i can'tfind a way to get theoauth_callback value. def acceptEncodingHeaderList = mockRequest.getRequestHeaders().get("Authorization") Thank You.2.9KViews0likes1CommentCreating virtual service using swagger definition (swagger.Json) URL failing
i am trying to create a virtual service using an existing swagger definition (swagger.json) file but unfortunately it's failing with the error "could not import a definition from the specified file" though user name and password provided. when i have checked the ReadyAPI log seeing an error " Thu Jun 04 23:39:18 EDT 2020: INFO: 443 requires authentication with the realm '/ charset=UTF-8' Thu Jun 04 23:39:44 EDT 2020: INFO: 443 requires authentication with the realm '' Note: intentionally not sharing the API definition swagger.json URL. Thank you, MannamSolved2.1KViews0likes2Comments11.3 Community version turns on external authentication
We have tried to upgrade to 11.3, but can't login. It returns an error message: com.smartbear.ccollab.service.api.v7001.ServiceException: This version of the product doesn't support external authentication External authentication has obviously never been setup, and we have tried reinstalling with no success. We have had to rollback to 11.2 due to this issue.1.9KViews1like4CommentsNTLM Security no longer worki in v 1.2 nd 1.3
HI, we are a paid subscriber of ready API and more specifically soap ng pro. Since v 1.2 we have not been able to a single request to a web service and get a successful authentication using NTLM. the same project imported into v1.1 and the free version works and autenticates perfectly. Has something changes in v1.2 and 1.3 as we can no longer authenticate. Very frustrating an v1.1 seems to just crash after large test scripts, seems like it had a memory leak? and we cant upgrade as it no longer supports NTLM for us. Has something changed?1.6KViews0likes2Commentsintigrate access token management into auto generated swagger client
I am trying to generate my custom client using swagger definition and my own generator with some extra feature to token management and refresh token. Can I do that? We are using different gateway to connect to the rest services. There is a token management part for that gateway. So we need to integrate that token management security part into our automatically generated client. Please tell me how to do that. We are stuck at this. Please help me.1.2KViews0likes0Comments