3 Replies Latest reply on Nov 18, 2017 2:44 AM by Kenheung-Oracle

    REST API for Validate HTTP Basic Authorization Credentials not working

    Debanjan De

      Hi ,

       

      Currently we are automating code migration process in Oracle ACCS and trying to validate an user via the available REST API "Validate HTTP Basic Authorization Credentials".

       

      Seems the documentation for the above API is here.

       

      Found 2 issues in the document -

       

      1. The curl option -K is not valid in the case (seems it should be -i)

      curl
      -K
      -X POST
      -H "Content-Type:application/scim+json"
      -H "Authorization: Bearer <Access Token Value>"
      https://tenant-base-url/admin/v1/HTTPAuthenticator

       

      2. The response, we are getting is not matching with the expected response in the document. We are currently getting the below response. Seems its now redirecting to SSO system, which is a manual way of authentication, but not possible for our case.

       

      Request: curl -i -X POST -H "Content-Type:application/scim+json" -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxx" https://apaas.us.oraclecloud.com/admin/v1/HTTPAuthenticator

      (xxxxxx - the hex value of <user name>:<password>)

       

      Response:

      HTTP/1.1 302 Found

      Date: Mon, 16 Oct 2017 13:21:07 GMT

      Set-Cookie: OAMRequestContext_storageconsole.us2.oraclecloud.com:80_6f6c6c=ollgJkCFXBqLv1eRh0x5fA==;max-age=300; httponly; path=/

      Location: https://login.us2.oraclecloud.com:443/oam/server/obrareq.cgi?encquery%3D%2FT27CozmI8gPOCPhNBcfJDkCnRZYU%2BaMKgX3npJ75Kqd8FRuSHXJ%2FXawN

      Tq3hBgkSwD7Z1yXj6yP95un7vFaQVVCZBMvTl%2Fkwicdv7jwzgyBZ304AC8Na%2BILzIxVxyKKs3CjRoFz2alRlP6LaSrnHJnkJKbpE2qvGkAocSTontAly%2FVSOyI6Bg%2FyIqWwTDAV0a

      aXjWtpA3pTXUXDG3rq%2FkU8bas9suVPLLsjpk7JyBqqD9A38q4BOTAjcUPAcep7I9VaDQ03VvmL%2Fi64A9SBI%2BvD%2Fo6GxAV8C0t2MIZGME9jYBlOZwjNt%2BppRdhXFb2%2BifwaxU8

      1%2B2zviFEm%2FxmctfvJH20X3%2F8UE6DqX9Pws8U%3D%20agentid%3DStorage_WG%20ver%3D1%20crmethod%3D2

      Content-Length: 729

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

      Set-Cookie: BIGipServer~Public~pool_storageconsole.us2.oraclecloud.com=rd2o00000000000000000000ffff0a223055o8888; path=/

       

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

      <html><head>

      <title>302 Found</title>

      </head><body>

      <h1>Found</h1>

      <p>The requested resource has been temporarily moved <a href="https://login.us2.oraclecloud.com:443/oam/server/obrareq.cgi?encquery%3D%2FT27CozmI

      8gPOCPhNBcfJDkCnRZYU%2BaMKgX3npJ75Kqd8FRuSHXJ%2FXawNTq3hBgkSwD7Z1yXj6yP95un7vFaQVVCZBMvTl%2Fkwicdv7jwzgyBZ304AC8Na%2BILzIxVxyKKs3CjRoFz2alRlP6LaS

      rnHJnkJKbpE2qvGkAocSTontAly%2FVSOyI6Bg%2FyIqWwTDAV0aaXjWtpA3pTXUXDG3rq%2FkU8bas9suVPLLsjpk7JyBqqD9A38q4BOTAjcUPAcep7I9VaDQ03VvmL%2Fi64A9SBI%2BvD%

      2Fo6GxAV8C0t2MIZGME9jYBlOZwjNt%2BppRdhXFb2%2BifwaxU81%2B2zviFEm%2FxmctfvJH20X3%2F8UE6DqX9Pws8U%3D%20agentid%3DStorage_WG%20ver%3D1%20crmethod%3D2

      ">here</a>.</p>

      </body></html>

       

       

      Regards,

       

      Deb