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 DX NetOps

Issue/Introduction

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 NetOps Portal 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 NetOps Portal 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

Resolution

To bypass the Query Builder login problem:

 

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