0
votes

Scenario: I am sending GET request to a microservice to get JSON responses. But in my project, we have siteminder which handles SSO authentications. So whats happening here is after sending a fresh request (no session cookies) to microservice it's getting redirected to the siteminder for user authentication. When I am using a web browser I get the option to put my user credentials. But when I am using Rest-assured using Java to do so it is failing to handle site minder and sending me back 401 error.

How can I handle this scenario?

I have already tried these, RestAssured.authentication = basic("un","pw") RestAssured.useRelaxedHTTPSValidation()

1

1 Answers

0
votes

CA SSO (aka SiteMinder) does this little annoying extra step to prevent pre-emptive basic authentication requests. Add a cookie to your request SMCHALLENGE=YES should get you through.