HTTP ERROR 403 When running curl & pasting the QueryBuilder URL
search cancel

HTTP ERROR 403 When running curl & pasting the QueryBuilder URL

book

Article ID: 44099

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration

Issue/Introduction

Issue:

The customer was getting the following error when running the curl command and pasting the QueryBuilder URL:

HTTP ERROR 403 

Problem accessing /odata/api/devices. Reason: 

Forbidden 

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

Powered by Jetty:// 

The customer logs into the Windows 2012 Server and opens the QueryBuilder and CA Performance Center on Internet Explorer 11. The username and password are the default admin/admin and the customer was able to log in without issues.The customer is able to create a query in QueryBuilder and copies the URL that was produced. The Internet Explorer browser was then closed completely and then reopened to paste the URL from QueryBuilder. The customer enters the admin/admin credentials. Still got the same error, HTTP ERROR 403.

When running the curl command in both Linux shell's of the Data Aggregator and Performance Center the error is the same:

 

<title>Error 403 Forbidden</title> 

</head> 

<body><h2>HTTP ERROR 403</h2> 

<p>Problem accessing /odata/api/devices. Reason: 

<pre> Forbidden</pre></p><hr /><i><small>Powered by Jetty://</small></i> 

 

The curl command that was being used was:

curl -u admin:admin 'URL'

 

 

Environment:  

CA Performance Management - MULTI-PLATFORM Release:2.6

Windows Server 2012 

Internet Explorer 11 

 

 

Resolution:

For the CA API to bypass the Query Builder login problem

 

curl -v -s -k -L --ntlm "https://<CAPC>:8382/sso/sign-in-process.jsp?txtUsername=<UserName>&txtPassword=<Password>&txtSsoProductCode=da&txtSsoRedirectUrl=<QueryBuilder's URL SQL statement>"

 

 

This works too in the Browser

 

https://<CAPC>:8382/sso/sign-in-process.jsp?txtUsername=<UserName>&txtPassword=<Password>&txtSsoProductCode=da&txtSsoRedirectUrl=<QueryBuilder's URL SQL statement>

 

The key is to use the sign-in-process.jsp javascript along with the CAPC URL and to supply the access credentials along with the proper parameters.

 

txtUsername=<UserName>

txtPassword=<Password>

txtSsoProductCode=da

txtSsoRedirectUrl=<QueryBuilder's URL SQL statement>

Environment

Release: IMDAGG99000-2.6-Infrastructure Management-Data Aggregator
Component: