Difference between revisions of "I2Rest anonymous sessions"

From i2Rest
Jump to: navigation, search
(Created page with "= Anonymous Sessions = Anonymous sessions are sessions that start according to the settings of <tt>*ANONYMOUS</tt> Session System. These sessi...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:i2Rest Anonymous Sessions}}
 
= Anonymous Sessions =
 
= Anonymous Sessions =
 
Anonymous sessions are sessions that start according to the settings of <tt>*ANONYMOUS</tt> [[i2Rest Gates#session_system|Session System]].
 
Anonymous sessions are sessions that start according to the settings of <tt>*ANONYMOUS</tt> [[i2Rest Gates#session_system|Session System]].
Line 6: Line 7:
 
i2Rest Server automatically starts [[i2Rest Config#anonymous_min|anonymous_min]] anonymous sessions on startup.  
 
i2Rest Server automatically starts [[i2Rest Config#anonymous_min|anonymous_min]] anonymous sessions on startup.  
  
All anonymous sessions start with name and authority of [[i2Rest Config#anonymous_user|anonymous_user]] - it will be substituted instead of{{{ ${user} }}}value in [[session_system object#submit_string|submit command]]. Value of <tt>${uid}</tt> will be generated automatically as a random uuid string.
+
All anonymous sessions start with name and authority of [[i2Rest Config#anonymous_user|anonymous_user]] - it will be substituted instead of <tt>${user}</tt> value in [[session_system object#submit_string|submit command]]. Value of <tt>${uid}</tt> will be generated automatically as a random uuid string.
  
 
Upon receive anonymous request, i2Rest Server will route it to first available anonymous session. If all anonymous sessions are busy, i2Rest will start new anonymous session, but not more than [[i2Rest Config#anonymous_max|anonymous_max]] sessions. In case of anonymous_max sessions submitted, and no one is available, i2Rest will respond to the client with error message 400 Server is busy.
 
Upon receive anonymous request, i2Rest Server will route it to first available anonymous session. If all anonymous sessions are busy, i2Rest will start new anonymous session, but not more than [[i2Rest Config#anonymous_max|anonymous_max]] sessions. In case of anonymous_max sessions submitted, and no one is available, i2Rest will respond to the client with error message 400 Server is busy.

Latest revision as of 16:57, 3 April 2020

Anonymous Sessions

Anonymous sessions are sessions that start according to the settings of *ANONYMOUS Session System.

These sessions are used to serve anonymous requests - requests to run_program APIs that does not have to be authenticated and when the client is trying to call these APIs without OAuth2 authentication token.

i2Rest Server automatically starts anonymous_min anonymous sessions on startup.

All anonymous sessions start with name and authority of anonymous_user - it will be substituted instead of ${user} value in submit command. Value of ${uid} will be generated automatically as a random uuid string.

Upon receive anonymous request, i2Rest Server will route it to first available anonymous session. If all anonymous sessions are busy, i2Rest will start new anonymous session, but not more than anonymous_max sessions. In case of anonymous_max sessions submitted, and no one is available, i2Rest will respond to the client with error message 400 Server is busy.

i2Rest Server uses prestarting mechanism, i.e. it will submit new anonymous session in advance, when it found that some API call will occupy last non-busy anonymous session.

Submitted anonymous session will end automatically after period of inactivity greater than client_timeout parameter of Sessions gate. The restriction on the minimum number of anonymous sessions is taken to account. i2Rest Server will keep as minimum as anonymous_min anonymous sessions alive.