Questions Tagged With sessionhttps://answers.axonivy.com/tags/session/?type=rssquestions tagged <span class="tag">session</span>enTue, 02 Jul 2019 02:46:52 -0400Logging last login of a userhttps://answers.axonivy.com/questions/3871/logging-last-login-of-a-user<p>In my application, users can log-in in various ways...</p> <ul> <li>SSO: WAF via Tomcat valve </li> <li>SSO: IIS integration</li> <li>directly on the portal's login page (only for test/development systems)</li> </ul> <p>Now I have the challenge to create a mechanism that can log last successful login of a user and write this information to my application DB or to the user in Ivy system DB.</p> <p>Which options do I have to do this?</p>timoruppTue, 02 Jul 2019 02:46:52 -0400https://answers.axonivy.com/questions/3871/logging-last-login-of-a-userloginsessionloggingssoHow to remove a "unknown user"-sessionhttps://answers.axonivy.com/questions/3748/how-to-remove-a-unknown-user-session<p>If I logout a user from it's session (session.logoutSessionUser()), the session is still existing with an "unknown user". </p> <pre><code> ISecurityManager secMgr = SecurityManager.getSecurityManager(); for (ISession ssn : secMgr.getSessions()) { if (ssn.getSessionUserName().equalsIgnoreCase("xyz")) { ssn.logoutSessionUser(); } } </code></pre> <p>The session disappears only after a timeout (that might be the timeout defined in the tomcat configuration)</p> <p>However: Is there a way to close/kill a session immediately after logging out a user?</p>StefanWed, 27 Mar 2019 08:02:06 -0400https://answers.axonivy.com/questions/3748/how-to-remove-a-unknown-user-sessionsessionSession Fixation with Axon.ivyhttps://answers.axonivy.com/questions/3053/session-fixation-with-axon-ivy<p>Hi everyone, as far as I can find, every time user logs in with IVY Portal, the session is kept (not renewed). You can check this via <em>JSESSIONID</em>. Thus, it leads to <a href="https://www.owasp.org/index.php/Session_fixation">session fixation</a> attack.<br> May Axon.ivy provide a mechanism to prevent this kind of attack? I am using Axon.ivy 6.3.0.<br> Thank you.</p>Bao TranWed, 03 Jan 2018 04:25:25 -0500https://answers.axonivy.com/questions/3053/session-fixation-with-axon-ivyjsfsessionivyCan I reduce the session-views that are held in the engine memory?https://answers.axonivy.com/questions/2951/can-i-reduce-the-session-views-that-are-held-in-the-engine-memory<p>The Axon.ivy ivy Engine caches 20 JSF Dialog views per session. As I have a huge dialog with lots of sub-Dialogs this consuming a lot of memory on the Engine. Can I somehow reduce the amount of cached views?</p>SupportIvyTeamFri, 03 Nov 2017 04:49:22 -0400https://answers.axonivy.com/questions/2951/can-i-reduce-the-session-views-that-are-held-in-the-engine-memoryjsfsessionmemoryHow to extend a user session time programmatically?https://answers.axonivy.com/questions/2556/how-to-extend-a-user-session-time-programmatically<p>Dear Ivy support,</p> <p>Using Ivy 6.2 we set the User session time-out value in the web.xml. Is there a way to extend the session validity programmatically without any User action? </p> <p>In a JSF context, would this method have any effect on the Ivy Session ? javax.faces.context.ExternalContext.setSessionMaxInactiveInterval(int interval) <em>Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.</em></p> <p>Thanks in advance Emmanuel</p>EmmanuelFri, 31 Mar 2017 10:47:49 -0400https://answers.axonivy.com/questions/2556/how-to-extend-a-user-session-time-programmaticallysessionusertimeoutfindWorkTasks() never returns tasks in TaskState.RESUMED statehttps://answers.axonivy.com/questions/2410/findworktasks-never-returns-tasks-in-taskstate-resumed-state<p>Hello. </p> <p>Using engine 6.0.5, I am trying to query tasks that the session user is working or can work on. </p> <p>According to the docs, <a href="http://developer.axonivy.com/doc/6.0.5/publicApi/ch/ivyteam/ivy/workflow/IWorkflowSession.html#findWorkTasks-ch.ivyteam.ivy.workflow.IPropertyFilter-java.util.List-int-int-boolean-java.util.EnumSet-"><code>findWorkTasks()</code></a> can return tasks in states <code>TaskState.SUSPENDED</code>, <code>TaskState.CREATED</code>, <code>TaskState.RESUMED</code>, <code>TaskState.PARKED</code>. </p> <p>When I use it like this: </p> <p><code>result = ivy.session.findWorkTasks(filter, order, first, pageSize, true, EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED));</code></p> <p>It never returns <code>TaskState.RESUMED</code> tasks, only <code>TaskState.SUSPENDED</code>.</p> <p>Just to double check if I have resumed tasks, I tried the following call and it returns the <code>TaskState.RESUMED</code> tasks. <code>result = ivy.session.findLockedWorkTasks(filter, order, first, pageSize, true, EnumSet.of(TaskState.RESUMED));</code> </p> <p>What am I doing wrong on my use of <a href="http://developer.axonivy.com/doc/6.0.5/publicApi/ch/ivyteam/ivy/workflow/IWorkflowSession.html#findWorkTasks-ch.ivyteam.ivy.workflow.IPropertyFilter-java.util.List-int-int-boolean-java.util.EnumSet-"><code>findWorkTasks()</code></a>?</p> <p>Thanks in advance,</p>Jailson BritoWed, 01 Feb 2017 15:45:36 -0500https://answers.axonivy.com/questions/2410/findworktasks-never-returns-tasks-in-taskstate-resumed-statesessiontask-queryLanguage of system sessionhttps://answers.axonivy.com/questions/2082/language-of-system-session<p>Hello, how is the rule which language has the system session ? Can we set the langauge of system session for the whole application ?</p> <p>Thanks</p> <p>Karel</p>tauserFri, 07 Oct 2016 13:50:26 -0400https://answers.axonivy.com/questions/2082/language-of-system-sessionsessionIs there any possible way to switch SYSTEM session to another regular user's session in a ProgramStart execution?https://answers.axonivy.com/questions/1780/is-there-any-possible-way-to-switch-system-session-to-another-regular-user-s-session-in-a-programstart-execution<p>In our project, we use <code>ProgramStart</code> to implement <code>cron</code> jobs. The executions will always be carried on by the SYSTEM user using only one <code>ISession(id = 0)</code>.</p> <p>The problem is, we heavily store plenty of <em>Context Information</em> (authentication token, user-session-specific data, etc) into <code>ISession.setAttribute()</code>. It works well on normal situation with logged-in Ivy user. However, because in background jobs, there is only one session, each execution will interfere with each others, trying to <code>set</code> and <code>get</code> the <em>Context Information</em>.</p> <p>In addition, this happens the same with <code>Signals</code> since execution of those also delegated to <code>SYSTEM</code>.</p> <p>I've tried to call <code>ivy.session.login()</code> but it threw exception since Axon.ivy refuse to allow logging out of <code>SYSTEM</code> user.</p> <p>My question is: Is there any possible way to switch from SYSTEM sessions to regular normal user's session?</p> <p>Thanks</p>Genzer HawkerFri, 27 May 2016 07:54:55 -0400https://answers.axonivy.com/questions/1780/is-there-any-possible-way-to-switch-system-session-to-another-regular-user-s-session-in-a-programstart-executionbackground-jobsignalssessionsystemAssign and revoke Role to Session User dynamicallyhttps://answers.axonivy.com/questions/1703/assign-and-revoke-role-to-session-user-dynamically<p>Hello,</p> <p>I need to assign and revoke Ivy Role dynamically on the session user. If I understand the API documentation well, the following method assigns the given role to the session, the role should be automatically unassigned after logout: Ivy.session().assignRole(role);</p> <p>Here the API documentation:</p> <p><em>@PublicAPI(value=EXPERT) Assigns a role to the session. Parameters:role The role to assign</em></p> <p>The problem is that I need also to revoke an Ivy Role dynamically, I could not find a method like Ivy.session().revokeRole(IRole role) or Ivy.session().unassignRole(Irole role). Is there a possibility to do that?</p> <p>Thanks a lot in advance.</p> <p>Emmanuel</p>EmmanuelThu, 31 Mar 2016 10:26:20 -0400https://answers.axonivy.com/questions/1703/assign-and-revoke-role-to-session-user-dynamicallysessionroleuserhow to use PrimeFaces idleMonitor?https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor<p>I'd like to call a process event from the idlemonitor tag. when I do </p> <pre><code>&lt;p:idleMonitor timeout="5000" onidle="#{logic.onIdle}" /&gt; </code></pre> <p>I get the following error : javax.el.PropertyNotFoundException: Property 'onIdle' not found on type com.sun.proxy.$Proxy118</p> <p>I can't seem to get access to logic... inside the idelMonitor but if I open a dialog and press a button, it works; but I want to call the logic.method before the user has to click any button. is it possible.</p> <p>here is the dialog.</p> <pre><code> &lt;p:dialog widgetVar="idleDialog" modal="true" header="Période d'inactivité écoulée" style="width: 300px"&gt; &lt;p:panelGrid columns="1"&gt; &lt;p:outputLabel&gt; &lt;p&gt;Cette page est demeurée inactive pour plus de 20 minutes. &lt;/p&gt; &lt;p&gt;Votre demande a été enregistrée et conservée dans vos tâches.&lt;/p&gt; &lt;/p:outputLabel&gt; &lt;p:commandButton actionListener="#{logic.onIdle}" onclick="PF('idleDialog').hide()" value="#{ivy.cms.co('/label/demande/continue')}" /&gt; &lt;/p:panelGrid&gt; &lt;/p:dialog&gt; </code></pre>enricojlMon, 30 Nov 2015 20:23:43 -0500https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitorsessionMaximum "concurrent session"https://answers.axonivy.com/questions/1421/maximum-concurrent-session<p>Is it possible to configure the number of "concurrent session" ? </p> <p>I use here the term "concurrent session" as explained in this thread <a href="http://answers.axonivy.com/questions/158/what-exactly-is-regarded-as-a-concurrent-session">http://answers.axonivy.com/questions/158/what-exactly-is-regarded-as-a-concurrent-session</a> <em>"All sessions in which the same user is logged"</em></p>dbalasseThu, 30 Jul 2015 18:31:34 -0400https://answers.axonivy.com/questions/1421/maximum-concurrent-sessionsessionDetect a user session is closing because of timeouthttps://answers.axonivy.com/questions/1359/detect-a-user-session-is-closing-because-of-timeout<p>Hi everybody,</p> <p>Is there a way to detect a user session is closing because of a timeout? There is the "unload" event that can be catched in an ULC Rich Dialog for performing some stuff when the user close a Dialog. Is there something similar for a session timeout?</p> <p>If not it would be very usefull to have such a possibility.</p> <p>Thanks in advance Emmanuel</p>EmmanuelSat, 13 Jun 2015 10:22:25 -0400https://answers.axonivy.com/questions/1359/detect-a-user-session-is-closing-because-of-timeoutsystemeventsessioneventSSO on Apache: not logged in to Ivy but in tomcat?https://answers.axonivy.com/questions/1319/sso-on-apache-not-logged-in-to-ivy-but-in-tomcat<p>Hello Ivy-Comunity!</p> <p>When logged in to Apache (and to Tomcat) the User is not taken by Ivy.</p> <p>In a testing environment I have the following constellation:</p> <ul> <li>Linux environment with Ivy 5.1.3 attached to AD</li> <li>Apache Server with Kerberos Login attached to the same AD</li> <li>Ajp-Connector to Ivy-Tomcat</li> <li>A jsp testing Page in the Ivy-Environment (applicationHome on the Application-wf-Page)</li> </ul> <p>So this Page shows me by asking request.getRemoteUser() that this User is logged in: Hans.Tester@TESTENV.LOCAL and a HTTP Session request.getSession().getId(). But getting the Ivy-User by ivySession.getSessionUser() returns null. Except when Logged in manualy the result Hans.Tester for the Ivy-Session.</p> <p>So why is that? Or how can I make shure, that the Session is taken correctly by ivy?</p> <p>First guess is, that the username comes with the Environment (TESTENV.LOCAL). If it is the Issue, how to shut that down?</p> <p>With further investigation I found out more:</p> <ul> <li>In a Windows-Environment under IIS the UserName of the Tomcat-Session is in this format: TESTENV\Alexis.Suter</li> <li>The Ivy-Session is not saved into Tomcat-request. (When only logging in to Ivy)</li> </ul> <p>Thanks in advance!</p>AlexisWed, 13 May 2015 09:04:14 -0400https://answers.axonivy.com/questions/1319/sso-on-apache-not-logged-in-to-ivy-but-in-tomcatssosessionauthenticationTemporary (Ivy) file created by System session will not be deletedhttps://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted<p>In the documentation of Ivy <a href="http://developer.axonivy.com/doc/latest/DesignerGuideHtml/ivy.ivyscript.html#ivy.ivyscript.reference.datatypes">File</a> (emphasis mine)</p> <blockquote> <p>A File object can be used to read/write temporary or persistent data. IvyScript Files are created in a confined area that belongs to the running application. Temporary files are created in a session-specific file area and <strong>are automatically deleted if a session ends</strong>. Temporary Files can be made persistent.</p> </blockquote> <p>If a <em>temporary</em> <code>File</code> is created, it will be located at <code>{app}/files/sessions/{sessionId}/</code>. The files then will be deleted if the session is invalidated.</p> <p>Unfortunately, this isn't true for <em>temporary</em> files created by SYSTEM user. The SYSTEM user's session is always have the <code>id</code> of <code>0</code>, hence all files created in SYSTEM user's session will be located at <code>{app}/files/sessions/0/</code>.</p> <p>It seems that Ivy Server will never invalidate SYSTEM user's session, thus all files located in the directory will by left there undeleted (same as <em>persistent</em> file).</p> <p>I don't know whether this is a known fact as a consequence of the implementation that SYSTEM user will never be invalidated or it should be considered (somehow) as a bug?</p> <p>Thanks for considering my question.</p> <p>Regards</p>Genzer HawkerFri, 16 Jan 2015 09:24:48 -0500https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deletedsessiontemporaryfile