rules repository

A-1410

🆓
Error

Never set session lifetime or idle time to 0 (unlimited).

All APEX versionsAPEX_APPLICATIONS Check and SQL-based Test

Reason

Leaving the session lifetime or idle time at 0 means sessions never expire. An abandoned browser then keeps an authenticated session open indefinitely, increasing the risk of session hijacking on shared or unattended machines.

Set both limits to sensible non-zero values under Shared Components → Security Attributes → Session Management.

Examples

Non-Compliant Example

app CUSTOMERS (
    // ...
    sessionManagement {
        maxSessionLength: 0
        maxSessionIdleTime: 0
    }
    // ...
)
Issues
LineColumnMessage
427maxSessionLength must not be set to 0 (unlimited).
529maxSessionIdleTime must not be set to 0 (unlimited).

Compliant Solution - ★★★★☆

app CUSTOMERS (
    // ...
    sessionManagement {
        maxSessionLength: 604800
        maxSessionIdleTime: 86400
    }
    // ...
)

Compliant Solution - ★★★★★

app CUSTOMERS (
    // ...
    sessionManagement {
    }
    // ...
)

Omitting values applies INTERNAL / Workspace defaults

Tests

Test SQL query

select workspace || '.' || alias as identifier,
       'App ' || alias || ' in ' || workspace 
       || ' has an unlimited (0) session lifetime or idle time.' as message
  from apex_applications
 where (maximum_session_life_seconds = 0 or maximum_session_idle_seconds = 0)
   and workspace in (#ApexWorkspaces#)

Test results

IdentifierMessageMigration
WORKSPACE.CUSTOMERSApp CUSTOMERS in WORKSPACE has an unlimited (0) session lifetime or idle time.-

Parameters

Use parameters to customize the rule to your needs.

ParameterDescriptionDefault Value
ApexWorkspacesComma-separated List of APEX workspaces owning APEX applications to check.dblinter, dbl_gui

References