For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/terraform-aws-sso-permission-with-inadequate-user-session-duration.md.
A documentation index is available at /llms.txt.
Single Sign-On (SSO) permission sets should restrict user session durations to a maximum of one hour to reduce the window of opportunity for unauthorized access and session hijacking. Allowing longer session durations by setting the session_duration attribute to values such as "PT2H" or "PT1H1M" in the aws_ssoadmin_permission_set resource increases the risk of attackers leveraging stale or stolen sessions. Configuring session durations to session_duration = "PT1H", or omitting the duration in the configuration enforces this security best practice and helps limit potential exposure.