Skip to content

Commit b437c78

Browse files
OKTA-966853 | Terraform Provider: okta_authenticator (Okta Verify) does not Support enrollmentSecurityLevel and userVerificationMethods Attributes (#2409)
* OKTA-966853 | Terraform Provider: okta_authenticator (Okta Verify) does not Support enrollmentSecurityLevel and userVerificationMethods Attributes (SIGNED) * Adding Acceptance Tests For Okta Verify Authenticator
1 parent 69af980 commit b437c78

5 files changed

Lines changed: 524 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
resource "okta_authenticator" "okta_verify" {
2+
legacy_ignore_name = false
3+
key = "okta_verify"
4+
name = "Okta Verify"
5+
settings = jsonencode({
6+
"channelBinding":{
7+
"required":"ALWAYS",
8+
"style":"NUMBER_CHALLENGE"},
9+
"compliance":{"fips":"OPTIONAL"},
10+
"userVerification":"PREFERRED",
11+
"enrollmentSecurityLevel":"HIGH",
12+
"userVerificationMethods":["BIOMETRICS"]
13+
})
14+
status = "ACTIVE"
15+
}
16+

okta/services/idaas/resource_okta_authenticator_test.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,35 @@ resource "okta_authenticator" "test" {
197197
},
198198
})
199199
}
200+
201+
func TestAccResourceOktaAuthenticator_OktaVerifyCRUD(t *testing.T) {
202+
resourceName := fmt.Sprintf("%s.okta_verify", resources.OktaIDaaSAuthenticator)
203+
mgr := newFixtureManager("resources", resources.OktaIDaaSAuthenticator, t.Name())
204+
config := mgr.GetFixtures("okta_verify.tf", t)
205+
acctest.OktaResourceTest(t, resource.TestCase{
206+
PreCheck: acctest.AccPreCheck(t),
207+
ErrorCheck: testAccErrorChecks(t),
208+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactoriesForTestAcc(t),
209+
CheckDestroy: nil,
210+
Steps: []resource.TestStep{
211+
{
212+
ImportState: true,
213+
ResourceName: "okta_authenticator.okta_verify",
214+
ImportStateId: "0ktaV3rify1d",
215+
ImportStatePersist: true,
216+
Config: config,
217+
PlanOnly: true,
218+
},
219+
{
220+
Config: config,
221+
Check: resource.ComposeTestCheckFunc(
222+
resource.TestCheckResourceAttr(resourceName, "status", idaas.StatusActive),
223+
resource.TestCheckResourceAttr(resourceName, "type", "app"),
224+
resource.TestCheckResourceAttr(resourceName, "name", "Okta Verify"),
225+
// ensure any change to examples/resources/okta_authenticator/okta_verify.tf is reflected here.
226+
testAttributeJSON(resourceName, "settings", `{"channelBinding":{"required":"ALWAYS","style":"NUMBER_CHALLENGE"},"compliance":{"fips":"OPTIONAL"},"userVerification":"PREFERRED","enrollmentSecurityLevel":"HIGH","userVerificationMethods":["BIOMETRICS"]}`),
227+
),
228+
},
229+
},
230+
})
231+
}

sdk/v2_authenticatorSettings.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ type AuthenticatorSettings struct {
1111
TokenLifetimeInMinutes int64 `json:"-"`
1212
TokenLifetimeInMinutesPtr *int64 `json:"tokenLifetimeInMinutes,omitempty"`
1313
UserVerification string `json:"userVerification,omitempty"`
14+
EnrollmentSecurityLevel string `json:"enrollmentSecurityLevel,omitempty"`
15+
UserVerificationMethods []string `json:"userVerificationMethods,omitempty"`
1416
}
1517

1618
func (a *AuthenticatorSettings) MarshalJSON() ([]byte, error) {
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
---
2+
version: 2
3+
interactions:
4+
- id: 0
5+
request:
6+
proto: HTTP/1.1
7+
proto_major: 1
8+
proto_minor: 1
9+
content_length: 0
10+
host: classic-00.dne-okta.com
11+
headers:
12+
Accept:
13+
- application/json
14+
Authorization:
15+
- SSWS REDACTED
16+
url: https://classic-00.dne-okta.com/.well-known/okta-organization
17+
method: GET
18+
response:
19+
proto: HTTP/2.0
20+
proto_major: 2
21+
proto_minor: 0
22+
content_length: -1
23+
body: '{"id":"00otcysnp4eKySMxF697","cell":"ok14","_links":{"organization":{"href":"https://classic-00.dne-okta.com"}},"pipeline":"idx","settings":{"analyticsCollectionEnabled":true,"bugReportingEnabled":true,"omEnabled":false,"pssoEnabled":false,"desktopMFAEnabled":false,"itpEnabled":true}}'
24+
headers:
25+
Accept-Ch:
26+
- Sec-CH-UA-Platform-Version
27+
Content-Type:
28+
- application/json
29+
Date:
30+
- Wed, 23 Jul 2025 06:40:25 GMT
31+
Referrer-Policy:
32+
- strict-origin-when-cross-origin
33+
status: 200 OK
34+
code: 200
35+
duration: 1.016224958s
36+
- id: 1
37+
request:
38+
proto: HTTP/1.1
39+
proto_major: 1
40+
proto_minor: 1
41+
content_length: 0
42+
host: classic-00.dne-okta.com
43+
headers:
44+
Accept:
45+
- application/json
46+
Authorization:
47+
- SSWS REDACTED
48+
url: https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d
49+
method: GET
50+
response:
51+
proto: HTTP/2.0
52+
proto_major: 2
53+
proto_minor: 0
54+
content_length: -1
55+
uncompressed: true
56+
body: '{"type":"app","id":"0ktaV3rify1d","key":"okta_verify","status":"ACTIVE","name":"Okta Verify","created":"2025-07-18T09:44:19.000Z","lastUpdated":"2025-07-23T06:39:47.000Z","settings":{"compliance":{"fips":"OPTIONAL"},"channelBinding":{"style":"NUMBER_CHALLENGE","required":"ALWAYS"},"userVerification":"PREFERRED","enrollmentSecurityLevel":"HIGH","userVerificationMethods":["BIOMETRICS"],"appInstanceId":""},"_links":{"self":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d","hints":{"allow":["GET","PUT"]}},"deactivate":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/lifecycle/deactivate","hints":{"allow":["POST"]}},"methods":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/methods","hints":{"allow":["GET"]}},"enroll":{"href":"https://classic-00.dne-okta.com/idp/authenticators","hints":{"allow":["POST"]}}}}'
57+
headers:
58+
Accept-Ch:
59+
- Sec-CH-UA-Platform-Version
60+
Content-Type:
61+
- application/json
62+
Date:
63+
- Wed, 23 Jul 2025 06:40:26 GMT
64+
Referrer-Policy:
65+
- strict-origin-when-cross-origin
66+
status: 200 OK
67+
code: 200
68+
duration: 1.018557167s
69+
- id: 2
70+
request:
71+
proto: HTTP/1.1
72+
proto_major: 1
73+
proto_minor: 1
74+
content_length: 0
75+
host: classic-00.dne-okta.com
76+
headers:
77+
Accept:
78+
- application/json
79+
Authorization:
80+
- SSWS REDACTED
81+
url: https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d
82+
method: GET
83+
response:
84+
proto: HTTP/2.0
85+
proto_major: 2
86+
proto_minor: 0
87+
content_length: -1
88+
uncompressed: true
89+
body: '{"type":"app","id":"0ktaV3rify1d","key":"okta_verify","status":"ACTIVE","name":"Okta Verify","created":"2025-07-18T09:44:19.000Z","lastUpdated":"2025-07-23T06:39:47.000Z","settings":{"compliance":{"fips":"OPTIONAL"},"channelBinding":{"style":"NUMBER_CHALLENGE","required":"ALWAYS"},"userVerification":"PREFERRED","enrollmentSecurityLevel":"HIGH","userVerificationMethods":["BIOMETRICS"],"appInstanceId":""},"_links":{"self":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d","hints":{"allow":["GET","PUT"]}},"deactivate":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/lifecycle/deactivate","hints":{"allow":["POST"]}},"methods":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/methods","hints":{"allow":["GET"]}},"enroll":{"href":"https://classic-00.dne-okta.com/idp/authenticators","hints":{"allow":["POST"]}}}}'
90+
headers:
91+
Accept-Ch:
92+
- Sec-CH-UA-Platform-Version
93+
Content-Type:
94+
- application/json
95+
Date:
96+
- Wed, 23 Jul 2025 06:40:27 GMT
97+
Referrer-Policy:
98+
- strict-origin-when-cross-origin
99+
status: 200 OK
100+
code: 200
101+
duration: 1.026726291s
102+
- id: 3
103+
request:
104+
proto: HTTP/1.1
105+
proto_major: 1
106+
proto_minor: 1
107+
content_length: 301
108+
host: classic-00.dne-okta.com
109+
body: |
110+
{"id":"0ktaV3rify1d","key":"okta_verify","name":"Okta Verify","settings":{"channelBinding":{"required":"ALWAYS","style":"NUMBER_CHALLENGE"},"compliance":{"fips":"OPTIONAL"},"userVerification":"PREFERRED","enrollmentSecurityLevel":"HIGH","userVerificationMethods":["BIOMETRICS"]},"type":"app"}
111+
headers:
112+
Accept:
113+
- application/json
114+
Authorization:
115+
- SSWS REDACTED
116+
Content-Type:
117+
- application/json
118+
url: https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d
119+
method: PUT
120+
response:
121+
proto: HTTP/2.0
122+
proto_major: 2
123+
proto_minor: 0
124+
content_length: -1
125+
uncompressed: true
126+
body: '{"type":"app","id":"0ktaV3rify1d","key":"okta_verify","status":"ACTIVE","name":"Okta Verify","created":"2025-07-18T09:44:19.000Z","lastUpdated":"2025-07-23T06:40:29.000Z","settings":{"compliance":{"fips":"OPTIONAL"},"channelBinding":{"style":"NUMBER_CHALLENGE","required":"ALWAYS"},"userVerification":"PREFERRED","enrollmentSecurityLevel":"HIGH","userVerificationMethods":["BIOMETRICS"],"appInstanceId":""},"_links":{"self":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d","hints":{"allow":["GET","PUT"]}},"deactivate":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/lifecycle/deactivate","hints":{"allow":["POST"]}},"methods":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/methods","hints":{"allow":["GET"]}},"enroll":{"href":"https://classic-00.dne-okta.com/idp/authenticators","hints":{"allow":["POST"]}}}}'
127+
headers:
128+
Accept-Ch:
129+
- Sec-CH-UA-Platform-Version
130+
Content-Type:
131+
- application/json
132+
Date:
133+
- Wed, 23 Jul 2025 06:40:29 GMT
134+
Referrer-Policy:
135+
- strict-origin-when-cross-origin
136+
status: 200 OK
137+
code: 200
138+
duration: 1.044831333s
139+
- id: 4
140+
request:
141+
proto: HTTP/1.1
142+
proto_major: 1
143+
proto_minor: 1
144+
content_length: 0
145+
host: classic-00.dne-okta.com
146+
headers:
147+
Accept:
148+
- application/json
149+
Authorization:
150+
- SSWS REDACTED
151+
url: https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d
152+
method: GET
153+
response:
154+
proto: HTTP/2.0
155+
proto_major: 2
156+
proto_minor: 0
157+
content_length: -1
158+
uncompressed: true
159+
body: '{"type":"app","id":"0ktaV3rify1d","key":"okta_verify","status":"ACTIVE","name":"Okta Verify","created":"2025-07-18T09:44:19.000Z","lastUpdated":"2025-07-23T06:40:29.000Z","settings":{"compliance":{"fips":"OPTIONAL"},"channelBinding":{"style":"NUMBER_CHALLENGE","required":"ALWAYS"},"userVerification":"PREFERRED","enrollmentSecurityLevel":"HIGH","userVerificationMethods":["BIOMETRICS"],"appInstanceId":""},"_links":{"self":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d","hints":{"allow":["GET","PUT"]}},"deactivate":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/lifecycle/deactivate","hints":{"allow":["POST"]}},"methods":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/methods","hints":{"allow":["GET"]}},"enroll":{"href":"https://classic-00.dne-okta.com/idp/authenticators","hints":{"allow":["POST"]}}}}'
160+
headers:
161+
Accept-Ch:
162+
- Sec-CH-UA-Platform-Version
163+
Content-Type:
164+
- application/json
165+
Date:
166+
- Wed, 23 Jul 2025 06:40:30 GMT
167+
Referrer-Policy:
168+
- strict-origin-when-cross-origin
169+
status: 200 OK
170+
code: 200
171+
duration: 1.044627833s
172+
- id: 5
173+
request:
174+
proto: HTTP/1.1
175+
proto_major: 1
176+
proto_minor: 1
177+
content_length: 0
178+
host: classic-00.dne-okta.com
179+
headers:
180+
Accept:
181+
- application/json
182+
Authorization:
183+
- SSWS REDACTED
184+
url: https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d
185+
method: GET
186+
response:
187+
proto: HTTP/2.0
188+
proto_major: 2
189+
proto_minor: 0
190+
content_length: -1
191+
uncompressed: true
192+
body: '{"type":"app","id":"0ktaV3rify1d","key":"okta_verify","status":"ACTIVE","name":"Okta Verify","created":"2025-07-18T09:44:19.000Z","lastUpdated":"2025-07-23T06:40:29.000Z","settings":{"compliance":{"fips":"OPTIONAL"},"channelBinding":{"style":"NUMBER_CHALLENGE","required":"ALWAYS"},"userVerification":"PREFERRED","enrollmentSecurityLevel":"HIGH","userVerificationMethods":["BIOMETRICS"],"appInstanceId":""},"_links":{"self":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d","hints":{"allow":["GET","PUT"]}},"deactivate":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/lifecycle/deactivate","hints":{"allow":["POST"]}},"methods":{"href":"https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/methods","hints":{"allow":["GET"]}},"enroll":{"href":"https://classic-00.dne-okta.com/idp/authenticators","hints":{"allow":["POST"]}}}}'
193+
headers:
194+
Accept-Ch:
195+
- Sec-CH-UA-Platform-Version
196+
Content-Type:
197+
- application/json
198+
Date:
199+
- Wed, 23 Jul 2025 06:40:31 GMT
200+
Referrer-Policy:
201+
- strict-origin-when-cross-origin
202+
status: 200 OK
203+
code: 200
204+
duration: 1.007521125s
205+
- id: 6
206+
request:
207+
proto: HTTP/1.1
208+
proto_major: 1
209+
proto_minor: 1
210+
content_length: 0
211+
host: classic-00.dne-okta.com
212+
headers:
213+
Accept:
214+
- application/json
215+
Authorization:
216+
- SSWS REDACTED
217+
url: https://classic-00.dne-okta.com/api/v1/authenticators/0ktaV3rify1d/lifecycle/deactivate
218+
method: POST
219+
response:
220+
proto: HTTP/2.0
221+
proto_major: 2
222+
proto_minor: 0
223+
content_length: -1
224+
uncompressed: true
225+
body: '{"errorCode":"E0000148","errorSummary":"Cannot modify/disable this authenticator because it is enabled in one or more policies. To continue, disable the authenticator in these policies. Additionally, if disabling Okta Verify when Fastpass is active, the \"Device state\" must not be set to \"registered\" in app assurance policies.","errorLink":"E0000148","errorId":"oae_6kiGksWSc6TOGdfHXot5A","errorCauses":[{"errorSummary":"Authenticator Enrollment Policies: Default Policy"}]}'
226+
headers:
227+
Accept-Ch:
228+
- Sec-CH-UA-Platform-Version
229+
Content-Type:
230+
- application/json
231+
Date:
232+
- Wed, 23 Jul 2025 06:40:32 GMT
233+
Referrer-Policy:
234+
- strict-origin-when-cross-origin
235+
status: 403 Forbidden
236+
code: 403
237+
duration: 1.100811042s

0 commit comments

Comments
 (0)