<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic User-specific browser session timeout? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/User-specific-browser-session-timeout/m-p/58075#M11372</link>
    <description>&lt;P&gt;I have a special user (her name is "dashboard") that needs a session timeout of 0.  Is it possible to set no timeout for a specific user?&lt;/P&gt;</description>
    <pubDate>Sat, 25 Sep 2010 00:58:12 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2010-09-25T00:58:12Z</dc:date>
    <item>
      <title>User-specific browser session timeout?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/User-specific-browser-session-timeout/m-p/58075#M11372</link>
      <description>&lt;P&gt;I have a special user (her name is "dashboard") that needs a session timeout of 0.  Is it possible to set no timeout for a specific user?&lt;/P&gt;</description>
      <pubDate>Sat, 25 Sep 2010 00:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/User-specific-browser-session-timeout/m-p/58075#M11372</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2010-09-25T00:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: User-specific browser session timeout?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/User-specific-browser-session-timeout/m-p/58076#M11373</link>
      <description>&lt;P&gt;Judging from &lt;A href="http://www.splunk.com/base/Documentation/4.1.5/Admin/Configureusertimeouts" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.5/Admin/Configureusertimeouts&lt;/A&gt;,&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;In addition to setting the splunkweb/splunkd session value, you can also specify the timeout for the user browser session by editing the ui_inactivity_timeout value in web.conf. The Splunk browser session will time out once this value is reached. The default is 60 minutes. If ui_inactivity_timeout is set to less than 1, there's no timeout -- the session will stay alive while the browser is open.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;But I'm not sure that can be applied to specific users or not..&lt;/P&gt;</description>
      <pubDate>Sun, 03 Oct 2010 21:01:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/User-specific-browser-session-timeout/m-p/58076#M11373</guid>
      <dc:creator>Brian_Osburn</dc:creator>
      <dc:date>2010-10-03T21:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: User-specific browser session timeout?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/User-specific-browser-session-timeout/m-p/58077#M11374</link>
      <description>&lt;P&gt;As far as I'm aware it's not possible as a configuration option per-user, but that doesn't mean you can't do it.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Need to think this through a little more, but you should be able to do something along these lines:&lt;/P&gt;

&lt;P&gt;
&lt;LI&gt;Create a separate app called &lt;CODE&gt;dashboard&lt;/CODE&gt;.&lt;/LI&gt;&lt;/P&gt;

&lt;P&gt;&lt;LI&gt;Set your new dashboard app as the &lt;A href="http://answers.splunk.com/questions/5/how-do-i-set-the-default-app-in-splunk" rel="nofollow"&gt;default app&lt;/A&gt; for that user, either via Manager-&amp;gt;Access Controls-&amp;gt;Users or via &lt;CODE&gt;user_prefs.conf&lt;/CODE&gt;.&lt;/LI&gt;&lt;/P&gt;

&lt;P&gt;&lt;LI&gt;Make sure that all of your required dashboard views are accessible through that app context.  (Either copy them, or set them to global scope)&lt;/LI&gt;&lt;/P&gt;

&lt;P&gt;&lt;LI&gt;Paste the following into &lt;CODE&gt;application.js&lt;/CODE&gt; for that app:&lt;/LI&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$(document).ready(function() {
    Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
    Splunk.Session.instance.timeoutDelay = 0;

    function overrideStartTimeout() {
        return;
    }
    Splunk.Session.instance.startTimeout = overrideStartTimeout;
    Splunk.Session.instance.stopTimeout();
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;If you &lt;I&gt;really&lt;/I&gt; want to do it within another app like search, you can do the same thing, but wrap it in an &lt;CODE&gt;if&lt;/CODE&gt; statement that checks the username. Getting the username may be non-trivial - usually it shows an auth token but not a name. If you have an AccountBar module, you can get it from there; if not, it may be hiding somewhere in the DOM, but I haven't seen it.&lt;/P&gt;

&lt;P&gt;I still think, however, that compartmentalizing into a dedicated app is less risky.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lastKnownUser = 'unknown'

function getUserName() {
    // Only works for pages that have an AccountBar module
    text = jQuery('.accountBarItems').text()
    r = /Logged in as (\S+)/
    matches = r.exec(text)
    if (matches) {
        lastKnownUser = matches[1];
    }
    return lastKnownUser;
}

$(document).ready(function() {
    if ( getUserName() == "dashboard" ) {
        Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
        Splunk.Session.instance.timeoutDelay = 0;

        function overrideStartTimeout() {
            return;
        }
        Splunk.Session.instance.startTimeout = overrideStartTimeout;
        Splunk.Session.instance.stopTimeout();
    }
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Oct 2010 22:50:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/User-specific-browser-session-timeout/m-p/58077#M11374</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-10-03T22:50:51Z</dc:date>
    </item>
  </channel>
</rss>

