Jump to content

KSC API Login - KSC-Token - WebToken creation


Recommended Posts

Posted (edited)

Hello everyone,

we are trying to use the KSC API for serveral tasks.

Since it is not possible to move VServers via MMC or Webconsole which we desperatly need to do as MSP Provider, we managed to get it work with the KSC API.

For further usage we want to develop a small python tool with which you can simply connect to any given KSC API and send any existing API commands with parameter passing.

For security reasons, we don't want to use internal user with just a password.

In the API documentation we read about a possible KSC-Token and Web Token authentification, which would be a nice alternative.

But, we could not find anything to create a token.

So how do we create a KSC Token or Web Token which can be used as authentification to the KSC API?

Or is it meant to work with the session Token which you get after the basi auth method?

 

If you need further information, don't hesitate to ask.

 

Thanks in advance!

Edited by MHask
Posted

Hello MHask,


you can find the Information about this in the Online Help Article. All is based on the IAM from KSC.
https://support.kaspersky.com/KSC/14.2/en-US/221056.htm

And in the Documentation of KSC Open API you can find how to use it like here:

https://support.kaspersky.com/help/KSC/14/KSCAPI/index.html

Authenticated session

To create a session client must call method Session.StartSession. Authentication information, as with "login" method, is provided in Authorization header.
Name of the virtual server is sent as UTF-8 string encoded by Base64 in the header "X-KSC-VServer".
If authentication was successful, server replies with 200 status code and provides session id in response:

        POST /api/v1.0/Session.StartSession HTTP/1.1
        Accept-Encoding: gzip, deflate
        Authorization: KSCBasic user="0LvQvtCz0LjQvQ==", pass="0L/QsNGA0L7Qu9GM", internal="0"
        Content-Type: application/json
        Content-Length: 2

        {}

        HTTP/1.1 200 OK
        Transfer-Encoding: chunked
        Content-Length: 41

        {"PxgRetVal":"n4QFPNjYK2oXRMYkis5CMcg=="}

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...