The session key reauthentication mechanism allows for FlowTraq's command line tools to be easily integrated with third-party applications and applications hosted on other systems. The use of session keys allows automated scripts and script-based interfaces such as web GUIs to call additional command line tools without the need to store the username and password in a client-side cookie. Since the session key automatically expires, and is only valid from the originating IP address, it is unnecessary to perform an explicit "log out."
Disabled by Default | |
---|---|
FlowTraq Server is not configured by default to use session keys. In order to enable session keys, the configuration file <userdata> maxsessionkeyage 120 [...] </userdata> Please see Section 12.3.4.2, “Configuration File Format” for more information on configuring session key reauthentication. |
To create and use a session key, a command line tool must first provide a valid user's credentials to log into a session, and provide the -us
parameter to request that a session key be created. Any command will work, but ftum
is convenient because it doesn't need to interact with session data, so we use it in our example:
ftum -un USERNAME -up PASSWORD -us
If the credentials provided are valid, the stderr
output of the command will be a session key; for example:
91389bd1127bce0a2615d390be08f696
The session key may subsequently used with the -us
argument instead of a username/password combination to re-login to the same FlowTraq Server from the same IP address. Continuing our example:
ftstat -us 91389bd1127bce0a2615d390be08f696 [...]
Tip | |
---|---|
Each time the session key is used, the timer is reset. The session key will eventually expire on the server side after the period of time specified in the |