Skip to content

Commit 446cb9c

Browse files
committed
Fixing issues with test
1 parent d236f82 commit 446cb9c

4 files changed

Lines changed: 184 additions & 1698 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
resource "okta_app_signon_policy_rule" "test_with_reauthenticate_in_chains_only" {
2+
policy_id = "rstpbfm3a3IBq00o11d7"
3+
name = "test_with_reauthenticate_in_chains_only"
4+
type = "AUTH_METHOD_CHAIN"
5+
priority = 3
6+
network_connection = "ANYWHERE"
7+
access = "ALLOW"
8+
factor_mode = "2FA"
9+
chains = [
10+
jsonencode(
11+
{
12+
"authenticationMethods" : [
13+
{
14+
"key" : "webauthn",
15+
"userVerification" : "REQUIRED",
16+
"method" : "webauthn"
17+
}
18+
],
19+
"reauthenticateIn" : "PT43800H"
20+
}),
21+
jsonencode(
22+
{
23+
"authenticationMethods" : [
24+
{
25+
"key" : "okta_password",
26+
"method" : "password"
27+
}
28+
],
29+
"reauthenticateIn" : "PT43800H",
30+
"next" : [
31+
{
32+
"authenticationMethods" : [
33+
{
34+
"key" : "custom_otp",
35+
"method" : "otp"
36+
},
37+
{
38+
"key" : "google_otp",
39+
"method" : "otp"
40+
},
41+
{
42+
"key" : "phone_number",
43+
"method" : "sms"
44+
},
45+
{
46+
"key" : "phone_number",
47+
"method" : "voice"
48+
},
49+
{
50+
"key" : "webauthn",
51+
"userVerification" : "REQUIRED",
52+
"method" : "webauthn"
53+
}
54+
],
55+
"reauthenticateIn" : "PT43800H"
56+
}
57+
]
58+
}
59+
)
60+
]
61+
}
62+
63+
64+
resource "okta_app_signon_policy_rule" "test_with_re_authentication_frequency_only" {
65+
policy_id = "rstpbfm3a3IBq00o11d7"
66+
name = "test_with_re_authentication_frequency_only"
67+
type = "AUTH_METHOD_CHAIN"
68+
priority = 4
69+
network_connection = "ANYWHERE"
70+
access = "ALLOW"
71+
factor_mode = "2FA"
72+
re_authentication_frequency = "PT2H10M"
73+
chains = [
74+
jsonencode({
75+
"authenticationMethods": [
76+
{
77+
"key": "okta_password",
78+
"method": "password"
79+
}
80+
],
81+
"next": [
82+
{
83+
"authenticationMethods": [
84+
{
85+
"key": "phone_number",
86+
"method": "sms"
87+
}
88+
]
89+
}
90+
]
91+
}),
92+
jsonencode({
93+
"authenticationMethods": [
94+
{
95+
"key": "okta_verify",
96+
"method": "signed_nonce",
97+
"userVerification": "REQUIRED"
98+
}
99+
]
100+
})
101+
]
102+
}

okta/services/idaas/resource_okta_app_signon_policy_rule_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ func TestAccResourceOktaAppSignOnPolicyRule_ReauthenticationFrequency(t *testing
449449
resourceName1 := fmt.Sprintf("%s.test_with_reauthenticate_in_chains_only", resources.OktaIDaaSAppSignOnPolicyRule)
450450
resourceName2 := fmt.Sprintf("%s.test_with_re_authentication_frequency_only", resources.OktaIDaaSAppSignOnPolicyRule)
451451
mgr := newFixtureManager("resources", resources.OktaIDaaSAppSignOnPolicyRule, t.Name())
452-
config := mgr.GetFixtures("basic.tf", t)
452+
config := mgr.GetFixtures("reauthentication.tf", t)
453453

454454
acctest.OktaResourceTest(t, resource.TestCase{
455455
PreCheck: acctest.AccPreCheck(t),

0 commit comments

Comments
 (0)