Re: Session timeout

Khushboo Vashi <[email protected]> Wed, 30 Oct 2019 10:45:16 +0530
Newsgroups gmane.comp.db.postgresql.pgadmin
Message-ID <CAFOhELfuEd=NjLue0_NwoWEHzKRpAvW-X85JZ_GTpD_Fh5PUxg@mail.gmail.com>
--00000000000009331c059619d259
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 25, 2019 at 12:32 PM Arni Kromi=C4=87 <[email protected]>
wrote:

> On 18/10/2019 09.09, Arni Kromi=C4=87 wrote:
>
> On 17/10/2019 15.24, Arni Kromi=C4=87 wrote:
>
> On 17/10/2019 11.05, Khushboo Vashi wrote:
>
> Hi Arni,
>
> On Thu, Oct 17, 2019 at 1:41 PM Arni Kromi=C4=87 <[email protected]=
>
> wrote:
>
>> A question asked on the list reminded me of something... I've always
>> wondered if it's possible to prolong or prevent pgAdmin4 session
>> timeouts. This way if I leave the computer for a long time (especially
>> if it gets suspended), I have to refresh page, and login again. That
>> also means that any query/data tabs are lost.
>>
>> Can i prevent the session from expiring so I can stay logged in? I don't
>> need this at all for security because both the database and the pgAdmin
>> service are on my development computer which only I use.
>>
>> No, you can't prevent the session expiration completely but, you can
> increase the timeout limits.
> Check the below configurations in config.py file.
>
> MAX_SESSION_IDLE_TIME
> SESSION_EXPIRATION_TIME
> CHECK_SESSION_FILES_INTERVAL
>
> You will get information regarding the parameters in the file itself, and
> can override above settings as per your requirement.
>
> Thanks,
> Khushboo
>
>
> Thank you very much, I believe this is exactly what I need. I've tuned
> those parameters on my development machine to work more comfortably, I ho=
pe
> it will do the trick.
>
> --
> Kind Regards,
> Arni Kromi=C4=87
>
> Unfortunately this didn't solve the problem. I've prolonged the first
> parameter from 1 hour to 24 and the other two from one day to three; but
> when I put the computer to sleep yesterday afternoon and woke it up this
> morning, it required relogin. Again I couldn't stop the work and continue=
.
>
> I don't know if anything else is needed to apply the settings, I just
> restarted Apache and re-login to pgAdmin. I've also observed that the sam=
e
> session does continue normally if I leave the computer for a few hours an=
d
> it also survives when I put the computer to sleep and wake it up after a
> short while. Why does it not listen to my changed configuration?
>
> The file I edited is /usr/share/pgadmin4/web/config.py, which I suppose i=
s
> the right one for my computer. The software was installed on Ubuntu from
> upstream (your) apt repository.
>
> --
> Kind Regards,
> Arni Kromi=C4=87
>
>
> Ok so is there anything else I should try to prevent the session to expir=
e
> by the next day? Or is it possibly a bug to report if pgAdmin doesn't
> really care about those settings?
>
Let me verify it, will get back to you.

>
> But, I'd say there is definitely one bug present, an unwanted behavior.
> When the login session becomes invalit, the interface stays the same, but
> it just spits all kinds of errors when you try to do anything ("Would you
> like to reconnect to the database?" then various invalid this and that
> errors.) The correct behavior would be to automatically redirect to the
> login page if the login session expires. Should this be reported?
>
> --
> Kind Regards,
> Arni Kromi=C4=87
>
>

--00000000000009331c059619d259
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Fri, Oct 25, 2019 at 12:32 PM Arni=
 Kromi=C4=87 &lt;<a href=3D"mailto:[email protected]">arni.kromic@bio=
s-ict.hr</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF">
    <div>On 18/10/2019 09.09, Arni Kromi=C4=87 wrote:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <div>On 17/10/2019 15.24, Arni Kromi=C4=87
        wrote:<br>
      </div>
      <blockquote type=3D"cite">
       =20
        <div>On 17/10/2019 11.05, Khushboo Vashi
          wrote:<br>
        </div>
        <blockquote type=3D"cite">
         =20
          <div dir=3D"ltr">
            <div>Hi Arni,</div>
            <br>
            <div class=3D"gmail_quote">
              <div dir=3D"ltr" class=3D"gmail_attr">On Thu, Oct 17, 2019 at
                1:41 PM Arni Kromi=C4=87 &lt;<a href=3D"mailto:arni.kromic@=
bios-ict.hr" target=3D"_blank">[email protected]</a>&gt;
                wrote:<br>
              </div>
              <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px=
 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A question =
asked on
                the list reminded me of something... I&#39;ve always<br>
                wondered if it&#39;s possible to prolong or prevent pgAdmin=
4
                session<br>
                timeouts. This way if I leave the computer for a long
                time (especially<br>
                if it gets suspended), I have to refresh page, and login
                again. That<br>
                also means that any query/data tabs are lost.<br>
                <br>
                Can i prevent the session from expiring so I can stay
                logged in? I don&#39;t<br>
                need this at all for security because both the database
                and the pgAdmin<br>
                service are on my development computer which only I use.<br=
>
                <br>
              </blockquote>
              <div><font face=3D"arial, sans-serif">No, you can&#39;t preve=
nt
                  the session expiration completely but, you can
                  increase the timeout limits.</font></div>
              <div><font face=3D"arial, sans-serif">Check the below
                  configurations in config.py file.</font></div>
              <div class=3D"gmail_quote"><br>
              </div>
              <div class=3D"gmail_quote">MAX_SESSION_IDLE_TIME<br>
              </div>
              SESSION_EXPIRATION_TIME<br>
              CHECK_SESSION_FILES_INTERVAL<br>
              <div><br>
              </div>
              <div>You will get information regarding the parameters in
                the file itself, and can override above settings as per
                your requirement.<br>
              </div>
              <div><br>
              </div>
              <div>Thanks,</div>
              <div>Khushboo</div>
              <br>
            </div>
          </div>
        </blockquote>
        <br>
        Thank you very much, I believe this is exactly what I need. I&#39;v=
e
        tuned those parameters on my development machine to work more
        comfortably, I hope it will do the trick.<br>
        <br>
        <pre cols=3D"72">--=20
Kind Regards,
Arni Kromi=C4=87</pre>
      </blockquote>
      Unfortunately this didn&#39;t solve the problem. I&#39;ve prolonged t=
he
      first parameter from 1 hour to 24 and the other two from one day
      to three; but when I put the computer to sleep yesterday afternoon
      and woke it up this morning, it required relogin. Again I couldn&#39;=
t
      stop the work and continue.<br>
      <br>
      I don&#39;t know if anything else is needed to apply the settings, I
      just restarted Apache and re-login to pgAdmin. I&#39;ve also observed
      that the same session does continue normally if I leave the
      computer for a few hours and it also survives when I put the
      computer to sleep and wake it up after a short while. Why does it
      not listen to my changed configuration? <br>
      <br>
      The file I edited is /usr/share/pgadmin4/web/config.py, which I
      suppose is the right one for my computer. The software was
      installed on Ubuntu from upstream (your) apt repository.<br>
      <pre cols=3D"72">--=20
Kind Regards,
Arni Kromi=C4=87</pre>
    </blockquote>
    <br>
    Ok so is there anything else I should try to prevent the session to
    expire by the next day? Or is it possibly a bug to report if pgAdmin
    doesn&#39;t really care about those settings?<br></div></blockquote><di=
v>Let me verify it, will get back to you.=C2=A0</div><blockquote class=3D"g=
mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204=
,204,204);padding-left:1ex"><div bgcolor=3D"#FFFFFF">
    <br>
    But, I&#39;d say there is definitely one bug present, an unwanted
    behavior. When the login session becomes invalit, the interface
    stays the same, but it just spits all kinds of errors when you try
    to do anything (&quot;Would you like to reconnect to the database?&quot=
; then
    various invalid this and that errors.) The correct behavior would be
    to automatically redirect to the login page if the login session
    expires. Should this be reported?<br>
    <br>
    <pre cols=3D"72">--=20
Kind Regards,
Arni Kromi=C4=87</pre>
  </div>

</blockquote></div></div>

--00000000000009331c059619d259--