SoapUI + Groovy + RESTService + Access authorization for 3 different URLs - rest

SoapUI + Groovy + RESTService
In my project, I have 3 different environments: Test1, Test2 and Test3. And now I have 3 different URLs, test data, and authorization. I am able to achieve different test data with respect to URL using groovy.
Now facing problem in Authorization How to change the authorization depending upon the URL?
Authorization is mentioned in Authorization box i.e. username and password.

Unfortunately in SoapUI open source it is not available but in SoapUI Pro there is a feature called 'Environments' - which is exactly for this purpose. You can set URLs, DB connections, Authorization for different environments and then you can run the test suite for a particular environment.

Related

mendix Swagger REST Webservice in UAT/PROD

Hi I am working on the mendix rest webservices and through swagger , i can test the local host data all right.
But when i promote objects to acceptance, i need to update the webservice seurity to 'Requires authentication'. This would need username and password.
when the webservices are in the UAT, it fails to autheticate the request as below shown. Can you please help if you have a solution in this situation?
thanks
This could be due to the Path based access restrictions in your cloud environment. Allow all access to the appropriate paths as below to verify your endpoints.
Restart your application after applying the changes.

Quarkus: Integration tests - how to mock OIDC?

I am trying to run some integration tests with Quarkus and protecting our JAX-RS application using Bearer Token Authorization.
Based on what we can see on the Quarkus Guide in theory it is possible to mock the behaviour of the authorization mechanism just to not need to have an Authorization Server (like Keycloak) running in local.
The problem I found is that I can't find the OidcWiremockTestResource.class in any of the dependencies described. Where it is?
Also, how we can avoid having an Authorization Server running for running some tests against our endpoints?
I found that it is possible to mock the JsonWebToken and the SecurityIdentity just using:
#InjectMock
SecurityIdentity identity;
#InjectMock
JsonWebToken token;
and it worked pretty well, but still when I try to run the integration tests the Authorization Server is required to be up and running. Otherwise Quarkus fails trying to connect to it.
I tried to disable the OIDC extension (quarkus.oidc.enabled=false) but then, of course, the code does not compile (the endpoints do not recognize the dependencies).
So, which one is the best approach for just skip the OIDC connection when running some Integration Test?
Best,
OidcWiremocTestResource is available in 1.13.1.Final.
Additionally, a TestSecurity annotation will be possible to use in such cases starting from Quarkus 2.0 and possibly from 1.13.2.Final (if this PR will get backported):
https://github.com/quarkusio/quarkus/pull/16362
Finally Quarkus 2.0 will have a Keycloak test support module - if you work with Keycloak then it will help with testing against live Keycloak instance.

use output of standalone java file as jmeter parameter

I have to create a load test for a post method and have to pass a token in the header manager. This token is generated by stand alone java file and is valid for 5 minutes only. For a manual run, I can generate the token separately and pass it on to jmeter, but want to configure the jmeter in jenkins.
I want to see if I can use that java file and jmeter together and pass that token as parameter. I need solutions for below:
How to implement java file and jmeter together?
As token is getting expired in 5 minutes so need a solution to check for token expiry and use new token.

accessing keberos enabled Rest service using Karate

I am trying to set up Karate test framework for our new project. We will be enabling Kerberos authentication to our Rest microservices. Can you please tell me if Karate supports Kerberos aunthentication
Most projects are able to call a normal HTTP end-point and get a token from it which will be used as an auth header. So look for the OAuth and header authentication demos / in the documentation.
Otherwise, take a look at this approach: https://stackoverflow.com/a/51150286/143475 - so it is possible for you with a little extra work to call into some .NET code for e.g. which you can design to give you the headers / tokens you need.

JBoss Fuse Integration from HTTP with POST parameters

Firstly, apologies as I'm a bit of an ESB newbie.
I'm trying use Fuse Integration in Red Hat JBoss Developer Studio to create a simple integration between an HTTP URL with some POST parameters (login, password, etc) to an output file.
I'm thinking I'd need to carry out the following steps...
Do a HTTP login to a specified URL (passing login, password as parameters)
Capture authentication details - cookie file? - to reuse for the next step
Do a HTTP fetch from the same URL
Write the fetched data to a text file
A colleague's making some progress with this using Mulesoft but I'd like to see if this is a simpler exercise in JBoss.