Set The Password Re-authentication Frequency For An Okta Sign-On Rule Using Terraform
Last Updated:
Overview
Administrators configuring the password re-authentication frequency for an Okta application sign-on rule in Terraform must set a value for the reauthenticateIn option in the okta_app_signon_policy_rule resource. Set the reauthenticateIn value to the desired frequency to enforce the password re-authentication requirement.
Applies To
- Okta Identity Engine (OIE)
- Okta Terraform Provider
- Application Sign-On Policy Rules
Solution
How is the password re-authentication frequency configured in Terraform?
Configure the password re-authentication frequency when managing an application sign-on policy rule in Terraform by setting the reauthenticateIn option to the desired value.
NOTE: The reauthenticateIn setting in the constraints is distinct from the re_authentication_frequency set directly within the rule. The Terraform Provider documentation indicates that administrators cannot use these two settings together.
resource "okta_app_signon_policy_rule" "test" {
policy_id = data.okta_app_signon_policy.test.id
name = "testAcc_replace_with_uuid"
constraints = [
jsonencode(
{
knowledge = {
reauthenticateIn = "PT0S"
types = [
"password",
]
}
possession = {
deviceBound = "REQUIRED"
hardwareProtection = "REQUIRED"
}
}
)
]
}
