Forum Stats

  • 3,852,824 Users
  • 2,264,140 Discussions
  • 7,905,154 Comments

Discussions

ORDS 22.1 Curl rest redirects to HTTP/1.1 302 Found with Oauth client id and secret enabled

hello,

We are looking to leverage REST using ORDS 22.1 which was recently upgraded in one of non prod env.


After configuring and create role, privledge, template ...when tryin testing with CURL, we are getting following response instead of json data. We had protected with Ouath2.0 and created client id and secret usig ORDS supplied package


Even If we disable the Oauth and keep no auth in apepx 22.1, then via browser we are able to see json data however with curl it still redirect to sso stage url(HTTP/1.1 302 Found) instead of json data with 200 OK status


for Oauth we look to get the token then make another curl call to fetch the json data.


testing via RHEL 8.6 terminal

----------------------

$ curl -i -k --user Client_ID:Client_secret --data "grant_type=client_credentials" https://xxxx-dev1.example.com:4443/ords/rest/oauth/token

HTTP/1.1 302 Found

Date: Tue, 13 Sep 2022 18:12:29 GMT

Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips mod_auth_kerb/5.4

Location: https://stage.ssogen.com/ssogen/ssologin?service=https%3a%2f%2fxxxx-dev1.example.com%3a4443%2fords%2frest%2foauth%2ftoken

Content-Length: 322

Connection: close

Content-Type: text/html; charset=iso-8859-1


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>302 Found</title>

</head><body>

<h1>Found</h1>

<p>The document has moved <a href="https://stage.ssogen.com/ssogen/ssologin?service=https%3a%2f%2fxxxx-dev1.example.com%3a4443%2fords%2frest%2foauth%2ftoken">here</a>.</p>

</body></html>

----------------------



any help is appreciated