We have puppet profiles for both Jira and Confluence and they have code for managing the session timeout.  To set the timeout use hiera like this:

jira::session_timeout: '10080'
or
confluence::session_timeout: '10080'

Where the provided integer is the number of minutes before the session times out.

In this case 10080 minutes = 168 hours = 7 days.

Setting this value in hiera causes puppet to adjust the web.xml config as described in the Atlassian docs here:

https://confluence.atlassian.com/jirakb/how-to-change-the-default-session-timeout-604209887.html