AnsweredAssumed Answered

Getting 400 (code 1905) errors when creating ms_sql auth records

Question asked by John Stauffacher on Mar 11, 2013
Latest reply on Mar 11, 2013 by Eric Perraudeau

All,

 

I am trying to add a ms_sql auth record using API v2 and keep getting the follwoing response:

( curl sample provided)

 

curl -u "$QUSER:$QPASS" -H "X-Requested-With: Curl" -X "POST" -3 -4 --raw -v -d  "action=create&title=NewRecordWithAPI&username=USERNAME&password=PASSWORD&port=1500&ips=1.1.1.9" "https://qualysapi.qualys.com/api/2.0/fo/auth/ms_sql/"

* About to connect() to qualysapi.qualys.com port 443 (#0)

*   Trying 64.39.96.17... connected

* Connected to qualysapi.qualys.com (64.39.96.17) port 443 (#0)

* SSLv3, TLS handshake, Client hello (1):

* SSLv3, TLS handshake, Server hello (2):

* SSLv3, TLS handshake, CERT (11):

* SSLv3, TLS handshake, Server finished (14):

* SSLv3, TLS handshake, Client key exchange (16):

* SSLv3, TLS change cipher, Client hello (1):

* SSLv3, TLS handshake, Finished (20):

* SSLv3, TLS change cipher, Client hello (1):

* SSLv3, TLS handshake, Finished (20):

* SSL connection using RC4-MD5

* Server certificate:

*            subject: C=US; ST=California; L=Redwood Shores; O=Qualys, Inc.; OU=Production; CN=*.qualys.com

*            start date: 2012-10-04 00:00:00 GMT

*            expire date: 2016-10-18 23:59:59 GMT

*            subjectAltName: qualysapi.qualys.com matched

*            issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at https://www.verisign.com/rpa (c)10; CN=VeriSign Class 3 Secure Server CA - G3

*            SSL certificate verify ok.

* Server auth using Basic with user 'quacm_hs'

> POST /api/2.0/fo/auth/ms_sql/ HTTP/1.1

> Authorization: Basic cXVhY21faHM6R3l6aTg1bW9yaQ==

> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5

> Host: qualysapi.qualys.com

> Accept: */*

> X-Requested-With: Curl

> Content-Length: 94

> Content-Type: application/x-www-form-urlencoded

>

< HTTP/1.1 400 Bad Request

< Date: Mon, 11 Mar 2013 22:37:03 GMT

< Server: qweb

< X-Frame-Options: SAMEORIGIN

< X-RateLimit-Limit: 300

< X-RateLimit-Window-Sec: 86400

< X-Concurrency-Limit-Limit: 2

< X-Concurrency-Limit-Running: 0

< X-RateLimit-ToWait-Sec: 0

< X-RateLimit-Remaining: 281

< Connection: close

< Transfer-Encoding: chunked

< Content-Type: text/xml

<

164

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE SIMPLE_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/simple_return.dtd">

<SIMPLE_RETURN>

  <RESPONSE>

    <DATETIME>2013-03-11T22:37:05Z</DATETIME>

    <CODE>1905</CODE>

    <TEXT>parameter ips has invalid value: 1.1.1.9 (you are not authorized to scan this IP)</TEXT>

  </RESPONSE>

</SIMPLE_RETURN>

 

 

0

 

 

* Closing connection #0

* SSLv3, TLS alert, Client hello (1):

 

 

any ideas?

Outcomes