Kaspersky
Question

KSC 11 OpenAPI login problem

  • 4 June 2019
  • 7 replies
  • 364 views

When POSTing to https://servername:13299/api/v1.0/login with the following headers:

Authorization: KSCBasic user="x", pass="x", internal="1"
Content-Type: application/json
X-KSC-VServer: x
Content-Length: 2

I get the following message back: “Authentication failure”.
The user has full admin access, and can login to the KSC MMC console.
According to the documentation the user, pass and X-KSC-VServer should all be endcoded with Base64.

7 replies

Try not to pass X-KSC-VServer. This header required only for log in to KSC virtual server.
Try not to pass X-KSC-VServer. This header required only for log in to KSC virtual server.

Thank you! It worked. Now we can try to get some information out with the API 🙂
We are having the same problem using cURL on windows for testing and cannot login. We have tried many variants and also receive an authentication failure message. The current command we are using is

curl -X POST https://hostname:13299/api/v1.0/login -H "Authorization: KSCBasic user="username", pass="password", internal="1"" -H "Content-Type: application/json" -H "Content-Length: 2" -d "{}" -k -v

The user account is a full local admin on the server and can login to the MMC console. Username and password have been Base64 encoded.

We have also tried using Postman and receive the same error message.
Hello, donkeykongjr!

In KSC "internal" user means "created in KSC". Local admin user account is an external user (i.e. Windows account, AD-account). Try pass authorization header without internal flag.
-H "Authorization: KSCBasic user="username", pass="password""
Thanks @rshumsky ,

We have already tried it without the internal field but with no internal field specified we receive a message stating that the authentication header is invalid. If we keep the internal field and set it to 0, we receive the same message.
donkeykongjr,

Can you answer two more questions:
  • Does this problem repeats in Postman while you not passing internal field?
  • Do you escape double quotation marks inside curl Authorization header?
I'm getting status 200 response on my query

@rshumsky Thanks for your assistance with this one. It appears that our documentation was incorrect and the web console was installed using a different port! Have changed the port and now can authenticate.

Reply / Ответить