Who came up with this - automatic logout from Jamf

JamFm
Contributor

Hi Jamf Admins

The annoying automatic logout from jamf after a short time. Every time login again and navigate back to where you were.

Simply annoying.

What do you think about this community?

Cheers

Peter

7 REPLIES 7

jamf-42
Valued Contributor II

if your on prem you can change this, if your cloud standard, your stuck with it, if you cloud premium you can change.. 

It is very very annoying, especially when you work across multiple instances.. 

JamFm
Contributor

Yes, this is very, very annoying. I work across multiple instances and for example on the CSV placeholder. I hope admins change that and it is possible to set self the time in the settings or however.

Best Regards

Peter

pete_c
Contributor III

Add an auto-reload extension to your browser, such as Auto Reload for Safari/STP, set for a reasonable time (say 15 min), leave ion the front page of the JSS (aka dashboard), minimize tab. Remember that anyone with access to your JSS has root-ish access to every managed device, so at least leave your screen locked when AFK.

JamFm
Contributor

Thanks Pete :-)

I try this app at my work time and look and see if it adds any value. Maybe the admins could adjust the times again. It was much better back then.

Thanks 

Peter

pgsdesign
New Contributor

It's making me insane!!!!!!!! I just got off the phone with support and they tell me it's hard coded in - what MORON hard codes that in?! Give us a switch to handle our own security or at least give us F'n 4 hours - I put in a FEATURE REQUEST and I'm guessing that is just a wishing well, but I would dump JamfSchool today for this single reason if I didn't trap myself behind perpetual licenses - yes I'm a moron too ha...

jamf-42
Valued Contributor II

This works with Jamf Cloud, may work for JAMF School,

Works with Chrome, but I prefer Arc.. setup a new zap.. add this code. Done. 

 

 

 

// ==UserScript==
//         JSS Caffeinate
// @version     0.3
// @description Simulates mousedown events every few minutes, to activate keepalive call of JSS
// @match       https://<yourJssUrlWithoutPort>/*
// @updateURL   https://github.com/fveja/JSSCaffeinate/raw/main/JSS%20Caffeinate.js
// @noframes
// Florin Veja 2022
// ==/UserScript==

console.log('Started JSS Caffeinate. Running on ' + location.href)

// delay, in milliseconds, before we send mousedown event (120000 milliseconds = 2 min)
const delay = 120000
var last = Date.now()
const name = "JSS Caffeinate"

// set to true for debug console output
const jssCaffeinateDebug = false

// function to send us back to the 
const login = () => {
  debug("logging in")
  location = location.origin
}

const debug = (m) => {  
  typeof jssCaffeinateDebug == 'boolean' &&
      jssCaffeinateDebug &&
      console.log(name + " debug: " + m)
}

const authExpiration = () => { 
  return JSON.parse(localStorage.authToken).expires - Date.now()
}

const getDelay = (max) => {
  const min = 10000
  return Math.random() * (max - min) + min
}

// if we are on the logout page, log back in
// randomize to not create a race 
if (location.pathname == '/logout.html') {
  setTimeout(login(), getDelay(10000))
}

const café = setInterval(() => {
             var start = Date.now()
             const mousedown = new Event('mousedown')
             debug('JSS Caffeinate keepalive ' + start)
             document.dispatchEvent(mousedown)
             debug("authToken expires in " + authExpiration())
             debug(last + " - " + start + "=" + (start - last))
             last = start
             if (authExpiration() < 1) { login() }
           }, delay);

 

 

pete_c
Contributor III

I've just been running this as a detached job (sh ./reload-site.sh &):

#!/bin/bash

# automatically reload the JSS w/o any browser extensions
# note that you will get a TCC prompt on first run

# TO-DO: read jss_url from .plist, pass into the osascript

if ps -ax | grep sh | awk '/reload-site/ { print $1 } ' >/dev/null; then

	pkill -f "reload_site.sh"

fi

while true

do

	osascript -e 'tell application "Google Chrome" to repeat with W in windows
		reload (every tab in W whose URL is "https://your.site.tld/") # trailing slash is required
		end repeat'
	sleep 500
	
done

exit 0