Page 1 of 1

Automatic logout

PostPosted:Thu Oct 25, 2018 7:29 am
by seregaxvm
Is there a way to automatically logout after a certain period of inactivity?

Re: Automatic logout

PostPosted:Fri Oct 26, 2018 9:35 pm
by jllort
By default, tomcat session expires in 30 minutes. OpenKM has a keep alive call from browser to the application used to refresh the session.

Consider two options or the combination of both:
Change tomcat session -> https://docs.openkm.com/kcenter/view/ok ... meout.html
Change keep alive values of the parameters -> https://docs.openkm.com/kcenter/view/ok ... eters.html
schedule.session.keepalive
keep.session.alive.interval
schedule.dashboard.refresh
schedule.ui.notification

Re: Automatic logout

PostPosted:Sat Oct 27, 2018 8:59 am
by seregaxvm
schedule.session.keepalive property description says:
For this reason, it should never be lower than server session timeout
Wouldn't it be the other way around?

Re: Automatic logout

PostPosted:Sat Oct 27, 2018 9:46 am
by seregaxvm
I have the following testing parameters:
Code: Select all
session-timeout=5
schedule.session.keepalive=3
keep.session.alive.interval=3
schedule.dashboard.refresh=3
schedule.ui.notification=1
but the session does not close.

Re: Automatic logout

PostPosted:Sun Oct 28, 2018 6:10 pm
by jllort
The scheduler values must be greater than the session. The idea is the scheduler refresh the session if the period is greater than the session then will expire. Also must consider the worse scenario:

The session is set to 30 minutes
The scheduler is set to 40 minutes
Start the clock at 0 -> the last action has been done at the minute 29 -> that means the new session window expires at 29+39=50, in minute 40 the scheduler refresh the session, now the next expiration will be at minute 40+30=70 ( hope you follow the logic )

Re: Automatic logout

PostPosted:Mon Oct 29, 2018 8:10 am
by seregaxvm
It's just strange that the schedule.session.keepalive default value is 5 and session-timeout is 15 (or 30 according to this link https://docs.openkm.com/kcenter/view/ok ... meout.html). However these settings do not work either.
Also, I receive these warnings:
Code: Select all
[Thread-29] WARN  com.openkm.core.Cron - Crontab task mail address is empty: Return: null
It seems relevant.
P.S. I use https://hub.docker.com/r/openkm/openkm/ image.

Re: Automatic logout

PostPosted:Wed Oct 31, 2018 10:08 pm
by jllort
You should increase all the schedulers to 60 or 120 ( minutes ). Login into OpenKM, do not touch anything and wait for 40-50 minutes.