Describes how to configure session parameters for the Control System and REST clients.
When a client establishes a connection with an apiserver (node on which the Control System is installed), the session information is returned in the response. If you have set up multiple apiservers, you can configure the system to store the session information in a database for resending with further requests. For example, in the event of a node failure, you can send the session information with further requests so that the client uses the same session and does not re-authenticate when routed to a different apiserver.
To configure the host for session replication, perform the following steps on all the nodes running the apiserver:
This section describes how to get a session cookie, which can be used on subsequent requests. This cookie, valid for up to 30 minutes by default, contains the session ID and can be used to verify the identity of further API calls.
To get and save a cookie, which you can then use with subsequent requests, for:
curl -X POST -c <cookiefile-location> https://<webserver-host>:8443/login -d 'username=root&password=mapr'curl --negotiate -u : -b <cookiefile-location> -c <cookiefile-location> https://<web server node>:8443/rest/<API call> -k -vThe contents of the cookie file may look similar to the following:
cat /tmp/cookiejar.txt
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
#HttpOnly_<webserver-hostname> FALSE / TRUE 1509486224 MAPR.APISERVER.JSESSIONID node014ukard563rhu1ns8umn2s6uft3709.node0
#HttpOnly_<webserver-hostname> FALSE / FALSE 0 MAPR.APISERVER.SESSIONID
session-timeout
parameter in the /opt/mapr/apiserver/conf/web.xml file. The value
for this parameter is in minutes.