com.vmware.cis.session

The session service allows API clients to manage session tokens including creating, deleting and obtaining information about sessions.

  • The create operation creates session token in exchange for another authentication token.
  • The delete operation invalidates a session token.
  • The get retrieves information about a session token.

The call to the create operation is part of the overall authentication process for API clients. For example, the sequence of steps for establishing a session with SAML token is:

  • Connect to lookup service.
  • Discover the secure token service (STS) endpoint URL.
  • Connect to the secure token service to obtain a SAML token.
  • Authenticate to the lookup service using the obtained SAML token.
  • Discover the API endpoint URL from lookup service.
  • Call the create operation. The create call must include the SAML token.

See the programming guide and samples for additional information about establishing API sessions.

Execution Context and Security Context

To use session based authentication a client should supply the session token obtained through the create operation. The client should add the session token in the security context when using SDK classes. Clients using the REST API should supply the session token as a HTTP header.

Session Lifetime

A session begins with call to the create operation to exchange a SAML token for a API session token. A session ends under the following circumstances:

  • Call to the delete operation.
  • The session expires. Session expiration may be caused by one of the following situations:
    • Client inactivity - For a particular session identified by client requests that specify the associated session ID, the lapsed time since the last request exceeds the maximum interval between requests.
    • Unconditional or absolute session expiration time: At the beginning of the session, the session logic uses the SAML token and the system configuration to calculate absolute expiration time.

When a session ends, the authentication logic will reject any subsequent client requests that specify that session. Any operations in progress will continue to completion.

Error Handling

The com.vmware.cis.session returns the following errors:

get

POST /com/vmware/cis/session?~action=get

Returns information about the current session. This operation expects a valid session identifier to be supplied.

A side effect of invoking this operation may be a change to the session's last accessed time to the current time if this is supported by the session implementation. Invoking any other operation in the API will also update the session's last accessed time.

This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities.

Request:
Representations:
POST /com/vmware/cis/session?~action=get

Parameters:
None

Response:
Representations:
{
    "value"{
        "created_time""2013-06-06T22:13:05",
        "last_accessed_time""2013-06-06T22:13:05",
        "user""string"
    }
}
<?xml version="1.0" ?>
<ns0:Get-Result xmlns:ns0="http://vmware.com/cis/session" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>
    <last_accessed_time>2013-06-06T22:13:05</last_accessed_time>
    <created_time>2013-06-06T22:13:05</created_time>
    <user>string</user>
  </value>
</ns0:Get-Result>

Parameters:
Name Type Required Description
result info Yes Information about the session.

Errors:
Type Description HTTP Status Code
unauthenticated if the session id is missing from the request or the corresponding session object cannot be found. 401
service_unavailable if session retrieval fails due to server specific issues e.g. connection to back end component is failing. Due to the security nature of this API further details will not be disclosed in the error. Please refer to component health information, administrative logs and product specific documentation for possible causes. 503

Copyright © 2014. All Rights Reserved.