id: system_settings_automatic_logout_enforce
title: Enforce Auto Logout After $ODV Seconds of Inactivity
discussion: |
  Auto logout _MUST_ be configured to automatically terminate a user session and log out the after $ODV seconds of inactivity.

  NOTE:The maximum that macOS can be configured for autologoff is $ODV seconds.

  [IMPORTANT]
  ====
  The automatic logout may cause disruptions to an organization's workflow and/or loss of data. Information System Security Officers (ISSOs) are advised to first fully weigh the potential risks posed to their organization before opting to disable the automatic logout setting.
  ====
references:
  nist:
    cce:
      macos_27:
        - CCE-XXXXX-X
      macos_26:
        - CCE-95357-0
      macos_15:
        - CCE-94351-4
      macos_14:
        - CCE-92948-9
    800-53r5:
      - AC-12
      - AC-2(5)
    800-171r3:
      - 03.01.01
      - 03.01.11
  disa:
    cci:
      - CCI-002361
    srg:
      - SRG-OS-000279-GPOS-00109
    disa_stig:
      macos_26:
        - APPL-26-000160
      macos_15:
        - APPL-15-000160
      macos_14:
        - APPL-14-000160
    cmmc:
      - AC.L2-3.1.10
      - AC.L2-3.1.11
platforms:
  macOS:
    '27.0': {}
    '26.0':
      benchmarks:
        - name: disa_stig
          severity: medium
    '15.0':
      benchmarks:
        - name: disa_stig
          severity: medium
    enforcement_info:
      check:
        shell: |-
          /usr/bin/osascript -l JavaScript << EOS
          $.NSUserDefaults.alloc.initWithSuiteName('.GlobalPreferences')\
          .objectForKey('com.apple.autologout.AutoLogOutDelay').js
          EOS
        result:
          integer: $ODV
    introduced: '10.7'
odv:
  hint:
    datatype: number
    description: Number of seconds, e.g. 86400
    validation:
      min: 1
  recommended: 86400
  disa_stig: 86400
tags:
  - 800-53r5_moderate
  - 800-53r5_high
  - 800-171
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - cnssi-1253_moderate
mobileconfig_info:
  - PayloadType: .GlobalPreferences
    PayloadContent:
      - com.apple.autologout.AutoLogOutDelay: $ODV
