From 5af64bc9e7e1949cf8bb274ced860a382d73f793 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Sat, 2 Jul 2022 23:36:08 +0200 Subject: [PATCH 1/7] Add webauthn support to guardian resource --- .../testdata/recordings/TestAccGuardian.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index 7a920c1c4..dabbb4b8c 100644 --- a/auth0/testdata/recordings/TestAccGuardian.yaml +++ b/auth0/testdata/recordings/TestAccGuardian.yaml @@ -1407,6 +1407,50 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms - request: body: | null From 5ffb7939e9b4710ce0cd60e1df7a8c61ea433d02 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Sun, 3 Jul 2022 16:47:03 +0200 Subject: [PATCH 2/7] Add duo support to guardian resource --- .../testdata/recordings/TestAccGuardian.yaml | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index dabbb4b8c..71e203e6e 100644 --- a/auth0/testdata/recordings/TestAccGuardian.yaml +++ b/auth0/testdata/recordings/TestAccGuardian.yaml @@ -1419,37 +1419,12 @@ interactions: url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: - body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has - been reached","errorCode":"too_many_requests"}' - headers: - Content-Length: - - "120" - Content-Type: - - application/json; charset=utf-8 - status: 429 Too Many Requests - code: 429 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has - been reached","errorCode":"too_many_requests"}' + body: '{"enabled":false}' headers: - Content-Length: - - "120" Content-Type: - application/json; charset=utf-8 - status: 429 Too Many Requests - code: 429 + status: 200 OK + code: 200 duration: 1ms - request: body: | From b46292414eecaeea10a27d5f1fc4f01e9b030a64 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Tue, 5 Jul 2022 19:25:28 +0200 Subject: [PATCH 3/7] Refactor guardian tests --- auth0/resource_auth0_guardian.go | 7 - auth0/resource_auth0_guardian_test.go | 534 ++++++++++++++------------ 2 files changed, 285 insertions(+), 256 deletions(-) diff --git a/auth0/resource_auth0_guardian.go b/auth0/resource_auth0_guardian.go index e9f269842..44b7b73fc 100644 --- a/auth0/resource_auth0_guardian.go +++ b/auth0/resource_auth0_guardian.go @@ -37,7 +37,6 @@ func newGuardian() *schema.Resource { Type: schema.TypeList, Optional: true, MaxItems: 1, - MinItems: 0, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "user_verification": { @@ -71,7 +70,6 @@ func newGuardian() *schema.Resource { Type: schema.TypeList, Optional: true, MaxItems: 1, - MinItems: 0, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "override_relying_party": { @@ -92,7 +90,6 @@ func newGuardian() *schema.Resource { Type: schema.TypeList, Optional: true, MaxItems: 1, - MinItems: 0, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "provider": { @@ -119,7 +116,6 @@ func newGuardian() *schema.Resource { Optional: true, Computed: true, MaxItems: 1, - MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "enrollment_message": { @@ -167,7 +163,6 @@ func newGuardian() *schema.Resource { Type: schema.TypeList, Optional: true, MaxItems: 1, - MinItems: 0, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "integration_key": { @@ -190,14 +185,12 @@ func newGuardian() *schema.Resource { Type: schema.TypeList, Optional: true, MaxItems: 1, - MinItems: 0, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "amazon_sns": { Type: schema.TypeList, Optional: true, MaxItems: 1, - MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "aws_access_key_id": { diff --git a/auth0/resource_auth0_guardian_test.go b/auth0/resource_auth0_guardian_test.go index 83c96ccde..b0adbd9f3 100644 --- a/auth0/resource_auth0_guardian_test.go +++ b/auth0/resource_auth0_guardian_test.go @@ -6,6 +6,34 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) +const testAccGuardianEmailCreate = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + email = true +} +` + +const testAccGuardianEmailDelete = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + email = false +} +` + +const testAccGuardianOTPCreate = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + otp = true +} +` + +const testAccGuardianOTPDelete = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + otp = false +} +` + func TestAccGuardian(t *testing.T) { httpRecorder := configureHTTPRecorder(t) @@ -13,295 +41,205 @@ func TestAccGuardian(t *testing.T) { ProviderFactories: testProviders(httpRecorder), Steps: []resource.TestStep{ { - Config: testAccConfigureTwilio, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "twilio"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.enrollment_message", "enroll foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.verification_message", "verify foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.from", "from bar"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.messaging_service_sid", "foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.auth_token", "bar"), - ), - }, - { - Config: testAccConfigureTwilioUpdate, + Config: testAccGuardianEmailCreate, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "true"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), ), }, { - Config: testAccConfigureTwilio, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "twilio"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.enrollment_message", "enroll foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.verification_message", "verify foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.from", "from bar"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.messaging_service_sid", "foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.auth_token", "bar"), - ), - }, - { - Config: testAccConfigureCustomPhone, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "phone-message-hook"), - ), - }, - { - Config: testAccConfigureAuth0Custom, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "voice"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "auth0"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.enrollment_message", "enroll foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.verification_message", "verify foo"), - ), - }, - { - Config: testAccConfigureAuth0, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "voice"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "auth0"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.enrollment_message", "enroll foo"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.verification_message", "verify foo"), - ), - }, - { - Config: testAccConfigureNoPhone, + Config: testAccGuardianEmailDelete, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), ), }, { - Config: testAccConfigureEmail, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "true"), - ), - }, - { - Config: testAccConfigureEmailUpdate, + Config: testAccGuardianOTPCreate, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), - ), - }, - { - Config: testAccConfigureOTP, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "true"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), ), }, { - Config: testAccConfigureOTPUpdate, + Config: testAccGuardianOTPDelete, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), ), }, }, }) } -const testAccConfigureAuth0Custom = ` -resource "auth0_guardian" "foo" { - policy = "all-applications" - phone { - provider = "auth0" - message_types = ["voice"] - options { - enrollment_message = "enroll foo" - verification_message = "verify foo" - } - } -} -` - -const testAccConfigureCustomPhone = ` -resource "auth0_guardian" "foo" { - policy = "all-applications" - phone { - provider = "phone-message-hook" - message_types = ["sms"] - options{ - } - } -} -` -const testAccConfigureTwilio = ` +const testAccGuardianPhoneWithCustomProviderAndNoOptions = ` resource "auth0_guardian" "foo" { - policy = "all-applications" - phone { - provider = "twilio" - message_types = ["sms"] - options { - enrollment_message = "enroll foo" - verification_message = "verify foo" - from = "from bar" - messaging_service_sid = "foo" - auth_token = "bar" - sid = "foo" + policy = "all-applications" + phone { + provider = "phone-message-hook" + message_types = ["sms"] } - } -} -` - -const testAccConfigureTwilioUpdate = ` -resource "auth0_guardian" "foo" { - policy = "all-applications" } ` -const testAccConfigureAuth0 = ` +const testAccGuardianPhoneWithCustomProviderAndEmptyOptions = ` resource "auth0_guardian" "foo" { - policy = "all-applications" - phone { - provider = "auth0" - message_types = ["voice"] - options { - enrollment_message = "enroll foo" - verification_message = "verify foo" + policy = "all-applications" + phone { + provider = "phone-message-hook" + message_types = ["sms"] + options {} } } -} -` - -const testAccConfigureNoPhone = ` -resource "auth0_guardian" "foo" { - policy = "all-applications" -} -` - -const testAccConfigureEmail = ` -resource "auth0_guardian" "foo" { - policy = "all-applications" - email = true -} ` -const testAccConfigureEmailUpdate = ` +const testAccGuardianPhoneWithAuth0Provider = ` resource "auth0_guardian" "foo" { - policy = "all-applications" - email = false + policy = "all-applications" + phone { + provider = "auth0" + message_types = ["voice"] + options { + enrollment_message = "enroll foo" + verification_message = "verify foo" + } + } } ` -const testAccConfigureOTP = ` +const testAccGuardianPhoneWithTwilioProvider = ` resource "auth0_guardian" "foo" { policy = "all-applications" - otp = true + phone { + provider = "twilio" + message_types = ["sms"] + options { + enrollment_message = "enroll foo" + verification_message = "verify foo" + from = "from bar" + messaging_service_sid = "foo" + auth_token = "bar" + sid = "foo" + } + } } ` -const testAccConfigureOTPUpdate = ` +const testAccGuardianPhoneDelete = ` resource "auth0_guardian" "foo" { policy = "all-applications" - otp = false } ` -func TestAccGuardianPhoneMessageHookWithNoOptions(t *testing.T) { +func TestAccGuardianPhone(t *testing.T) { httpRecorder := configureHTTPRecorder(t) resource.Test(t, resource.TestCase{ ProviderFactories: testProviders(httpRecorder), Steps: []resource.TestStep{ { - Config: testAccGuardianPhoneMessageHookWithNoOptions, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.#", "0"), - ), - }, - { - Config: testAccGuardianPhoneMessageHookWithNoOptionsUpdate, + Config: testAccGuardianPhoneWithCustomProviderAndNoOptions, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.0.provider", "phone-message-hook"), - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.0.message_types.0", "sms"), - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.0.options.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "phone-message-hook"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), ), }, { - Config: testAccGuardianPhoneMessageHookWithNoOptionsUpdate2, + Config: testAccGuardianPhoneWithCustomProviderAndEmptyOptions, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.0.provider", "phone-message-hook"), - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.0.message_types.0", "sms"), - resource.TestCheckResourceAttr("auth0_guardian.default", "phone.0.options.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "phone-message-hook"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), ), }, - }, - }) -} - -const testAccGuardianPhoneMessageHookWithNoOptions = ` -resource "auth0_guardian" "default" { - policy = "all-applications" - otp = false - email = false -} -` - -const testAccGuardianPhoneMessageHookWithNoOptionsUpdate = ` -resource "auth0_guardian" "default" { - policy = "all-applications" - otp = false - email = false - phone { - provider = "phone-message-hook" - message_types = ["sms"] - } -} -` - -const testAccGuardianPhoneMessageHookWithNoOptionsUpdate2 = ` -resource "auth0_guardian" "default" { - policy = "all-applications" - otp = false - email = false - phone { - provider = "phone-message-hook" - message_types = ["sms"] - options {} - } -} -` - -func TestAccGuardianWebAuthnRoaming(t *testing.T) { - httpRecorder := configureHTTPRecorder(t) - - resource.Test(t, resource.TestCase{ - ProviderFactories: testProviders(httpRecorder), - Steps: []resource.TestStep{ { - Config: testAccConfigureWebAuthnRoamingCreate, + Config: testAccGuardianPhoneWithAuth0Provider, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "voice"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "auth0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.enrollment_message", "enroll foo"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.verification_message", "verify foo"), ), }, { - Config: testAccConfigureWebAuthnRoamingUpdate, + Config: testAccGuardianPhoneWithTwilioProvider, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.0.user_verification", "required"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "twilio"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.enrollment_message", "enroll foo"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.verification_message", "verify foo"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.from", "from bar"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.messaging_service_sid", "foo"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.auth_token", "bar"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.0.sid", "foo"), ), }, { - Config: testAccConfigureWebAuthnRoamingDelete, + Config: testAccGuardianPhoneDelete, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), ), }, }, @@ -330,24 +268,50 @@ resource "auth0_guardian" "foo" { } ` -func TestAccGuardianWebAuthnPlatform(t *testing.T) { +func TestAccGuardianWebAuthnRoaming(t *testing.T) { httpRecorder := configureHTTPRecorder(t) resource.Test(t, resource.TestCase{ ProviderFactories: testProviders(httpRecorder), Steps: []resource.TestStep{ { - Config: testAccConfigureWebAuthnPlatformCreate, + Config: testAccConfigureWebAuthnRoamingCreate, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "1"), ), }, { - Config: testAccConfigureWebAuthnPlatformDelete, + Config: testAccConfigureWebAuthnRoamingUpdate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.0.user_verification", "required"), + ), + }, + { + Config: testAccConfigureWebAuthnRoamingDelete, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), ), }, }, @@ -367,27 +331,36 @@ resource "auth0_guardian" "foo" { } ` -func TestAccGuardianDUO(t *testing.T) { +func TestAccGuardianWebAuthnPlatform(t *testing.T) { httpRecorder := configureHTTPRecorder(t) resource.Test(t, resource.TestCase{ ProviderFactories: testProviders(httpRecorder), Steps: []resource.TestStep{ { - Config: testAccConfigureDUOCreate, + Config: testAccConfigureWebAuthnPlatformCreate, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.hostname", "api-hostname"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.secret_key", "someSecret"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.integration_key", "someKey"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "1"), ), }, { - Config: testAccConfigureDUODelete, + Config: testAccConfigureWebAuthnPlatformDelete, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), ), }, }, @@ -411,48 +384,39 @@ resource "auth0_guardian" "foo" { } ` -func TestAccGuardianPush(t *testing.T) { +func TestAccGuardianDUO(t *testing.T) { httpRecorder := configureHTTPRecorder(t) resource.Test(t, resource.TestCase{ ProviderFactories: testProviders(httpRecorder), Steps: []resource.TestStep{ { - Config: testAccConfigurePushCreate, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), - ), - }, - { - Config: testAccConfigurePushUpdateAmazonSNS, - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_access_key_id", "test1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_region", "us-west-1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_secret_access_key", "secretKey"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.sns_apns_platform_application_arn", "test_arn"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.sns_gcm_platform_application_arn", "test_arn"), - ), - }, - { - Config: testAccConfigurePushUpdateCustomApp, + Config: testAccConfigureDUOCreate, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.#", "1"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.app_name", "CustomApp"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.apple_app_link", "https://itunes.apple.com/us/app/my-app/id123121"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.google_app_link", "https://play.google.com/store/apps/details?id=com.my.app"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.hostname", "api-hostname"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.secret_key", "someSecret"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.integration_key", "someKey"), ), }, { - Config: testAccConfigurePushDelete, + Config: testAccConfigureDUODelete, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), ), }, }, @@ -506,3 +470,75 @@ resource "auth0_guardian" "foo" { policy = "all-applications" } ` + +func TestAccGuardianPush(t *testing.T) { + httpRecorder := configureHTTPRecorder(t) + + resource.Test(t, resource.TestCase{ + ProviderFactories: testProviders(httpRecorder), + Steps: []resource.TestStep{ + { + Config: testAccConfigurePushCreate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + ), + }, + { + Config: testAccConfigurePushUpdateAmazonSNS, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_access_key_id", "test1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_region", "us-west-1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_secret_access_key", "secretKey"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.sns_apns_platform_application_arn", "test_arn"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.sns_gcm_platform_application_arn", "test_arn"), + ), + }, + { + Config: testAccConfigurePushUpdateCustomApp, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.app_name", "CustomApp"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.apple_app_link", "https://itunes.apple.com/us/app/my-app/id123121"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.google_app_link", "https://play.google.com/store/apps/details?id=com.my.app"), + ), + }, + { + Config: testAccConfigurePushDelete, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + ), + }, + }, + }) +} From 81b2151ba2ca1f425b0621d453804ab45e6e9008 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Tue, 5 Jul 2022 20:18:05 +0200 Subject: [PATCH 4/7] Add recovery code to guardian resource --- auth0/resource_auth0_guardian.go | 15 +++++++ auth0/resource_auth0_guardian_test.go | 64 +++++++++++++++++++++++++++ auth0/structure_auth0_guardian.go | 8 ++++ 3 files changed, 87 insertions(+) diff --git a/auth0/resource_auth0_guardian.go b/auth0/resource_auth0_guardian.go index 44b7b73fc..22afd2517 100644 --- a/auth0/resource_auth0_guardian.go +++ b/auth0/resource_auth0_guardian.go @@ -159,6 +159,11 @@ func newGuardian() *schema.Resource { Optional: true, Default: false, }, + "recovery_code": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, "duo": { Type: schema.TypeList, Optional: true, @@ -276,6 +281,8 @@ func readGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) di result = multierror.Append(result, d.Set("email", factor.GetEnabled())) case "otp": result = multierror.Append(result, d.Set("otp", factor.GetEnabled())) + case "recovery-code": + result = multierror.Append(result, d.Set("recovery_code", factor.GetEnabled())) case "sms": result = multierror.Append(result, d.Set("phone", nil)) @@ -347,10 +354,15 @@ func updateGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) if err := updateEmailFactor(d, api); err != nil { return diag.FromErr(err) } + if err := updateOTPFactor(d, api); err != nil { return diag.FromErr(err) } + if err := updateRecoveryCodeFactor(d, api); err != nil { + return diag.FromErr(err) + } + if err := updatePhoneFactor(d, api); err != nil { return diag.FromErr(err) } @@ -386,6 +398,9 @@ func deleteGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) if err := api.Guardian.MultiFactor.OTP.Enable(false); err != nil { return diag.FromErr(err) } + if err := api.Guardian.MultiFactor.RecoveryCode.Enable(false); err != nil { + return diag.FromErr(err) + } if err := api.Guardian.MultiFactor.WebAuthnRoaming.Enable(false); err != nil { return diag.FromErr(err) } diff --git a/auth0/resource_auth0_guardian_test.go b/auth0/resource_auth0_guardian_test.go index b0adbd9f3..97a9d2d11 100644 --- a/auth0/resource_auth0_guardian_test.go +++ b/auth0/resource_auth0_guardian_test.go @@ -34,6 +34,20 @@ resource "auth0_guardian" "foo" { } ` +const testAccGuardianRecoveryCodeCreate = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + recovery_code = true +} +` + +const testAccGuardianRecoveryCodeDelete = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + recovery_code = false +} +` + func TestAccGuardian(t *testing.T) { httpRecorder := configureHTTPRecorder(t) @@ -51,6 +65,7 @@ func TestAccGuardian(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, { @@ -64,6 +79,7 @@ func TestAccGuardian(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, { @@ -77,6 +93,7 @@ func TestAccGuardian(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, { @@ -90,6 +107,35 @@ func TestAccGuardian(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), + ), + }, + { + Config: testAccGuardianRecoveryCodeCreate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "true"), + ), + }, + { + Config: testAccGuardianRecoveryCodeDelete, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -171,6 +217,7 @@ func TestAccGuardianPhone(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "phone-message-hook"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), @@ -186,6 +233,7 @@ func TestAccGuardianPhone(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "phone-message-hook"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), @@ -201,6 +249,8 @@ func TestAccGuardianPhone(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "voice"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "auth0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), @@ -218,6 +268,8 @@ func TestAccGuardianPhone(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.message_types.0", "sms"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.provider", "twilio"), resource.TestCheckResourceAttr("auth0_guardian.foo", "phone.0.options.#", "1"), @@ -240,6 +292,7 @@ func TestAccGuardianPhone(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -284,6 +337,7 @@ func TestAccGuardianWebAuthnRoaming(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "1"), ), }, @@ -297,6 +351,7 @@ func TestAccGuardianWebAuthnRoaming(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.0.user_verification", "required"), ), @@ -312,6 +367,7 @@ func TestAccGuardianWebAuthnRoaming(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -347,6 +403,7 @@ func TestAccGuardianWebAuthnPlatform(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "1"), ), }, @@ -361,6 +418,7 @@ func TestAccGuardianWebAuthnPlatform(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -400,6 +458,7 @@ func TestAccGuardianDUO(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.hostname", "api-hostname"), resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.0.secret_key", "someSecret"), @@ -417,6 +476,7 @@ func TestAccGuardianDUO(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -487,6 +547,7 @@ func TestAccGuardianPush(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), ), }, @@ -500,6 +561,7 @@ func TestAccGuardianPush(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_access_key_id", "test1"), @@ -519,6 +581,7 @@ func TestAccGuardianPush(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "duo.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.#", "1"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.app_name", "CustomApp"), @@ -537,6 +600,7 @@ func TestAccGuardianPush(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, diff --git a/auth0/structure_auth0_guardian.go b/auth0/structure_auth0_guardian.go index 54a603382..edf221f46 100644 --- a/auth0/structure_auth0_guardian.go +++ b/auth0/structure_auth0_guardian.go @@ -187,6 +187,14 @@ func updateOTPFactor(d *schema.ResourceData, api *management.Management) error { return nil } +func updateRecoveryCodeFactor(d *schema.ResourceData, api *management.Management) error { + if d.HasChange("recovery_code") { + enabled := d.Get("recovery_code").(bool) + return api.Guardian.MultiFactor.RecoveryCode.Enable(enabled) + } + return nil +} + func updatePhoneFactor(d *schema.ResourceData, api *management.Management) error { if factorShouldBeUpdated(d, "phone") { // Always enable phone factor before configuring it. From 8100199798295f78cd02cf066f47093bd634d9dc Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Tue, 5 Jul 2022 20:34:57 +0200 Subject: [PATCH 5/7] Refactor auth0 guardian resource --- auth0/resource_auth0_guardian.go | 85 +++++++++---------------------- auth0/structure_auth0_guardian.go | 14 +++++ 2 files changed, 39 insertions(+), 60 deletions(-) diff --git a/auth0/resource_auth0_guardian.go b/auth0/resource_auth0_guardian.go index 22afd2517..b38ddd2a6 100644 --- a/auth0/resource_auth0_guardian.go +++ b/auth0/resource_auth0_guardian.go @@ -260,15 +260,12 @@ func createGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) func readGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { api := m.(*management.Management) - multiFactorPolicies, err := api.Guardian.MultiFactor.Policy() + flattenedPolicy, err := flattenMultiFactorPolicy(api) if err != nil { return diag.FromErr(err) } - result := multierror.Append(d.Set("policy", "never")) - if len(*multiFactorPolicies) > 0 { - result = multierror.Append(result, d.Set("policy", (*multiFactorPolicies)[0])) - } + result := multierror.Append(d.Set("policy", flattenedPolicy)) multiFactorList, err := api.Guardian.MultiFactor.List() if err != nil { @@ -347,39 +344,18 @@ func readGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) di func updateGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { api := m.(*management.Management) - if err := updatePolicy(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updateEmailFactor(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updateOTPFactor(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updateRecoveryCodeFactor(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updatePhoneFactor(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updateWebAuthnRoaming(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updateWebAuthnPlatform(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updateDUO(d, api); err != nil { - return diag.FromErr(err) - } - - if err := updatePush(d, api); err != nil { + result := multierror.Append( + updatePolicy(d, api), + updateEmailFactor(d, api), + updateOTPFactor(d, api), + updateRecoveryCodeFactor(d, api), + updatePhoneFactor(d, api), + updateWebAuthnRoaming(d, api), + updateWebAuthnPlatform(d, api), + updateDUO(d, api), + updatePush(d, api), + ) + if err := result.ErrorOrNil(); err != nil { return diag.FromErr(err) } @@ -389,28 +365,17 @@ func updateGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) func deleteGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { api := m.(*management.Management) - if err := api.Guardian.MultiFactor.Phone.Enable(false); err != nil { - return diag.FromErr(err) - } - if err := api.Guardian.MultiFactor.Email.Enable(false); err != nil { - return diag.FromErr(err) - } - if err := api.Guardian.MultiFactor.OTP.Enable(false); err != nil { - return diag.FromErr(err) - } - if err := api.Guardian.MultiFactor.RecoveryCode.Enable(false); err != nil { - return diag.FromErr(err) - } - if err := api.Guardian.MultiFactor.WebAuthnRoaming.Enable(false); err != nil { - return diag.FromErr(err) - } - if err := api.Guardian.MultiFactor.WebAuthnPlatform.Enable(false); err != nil { - return diag.FromErr(err) - } - if err := api.Guardian.MultiFactor.DUO.Enable(false); err != nil { - return diag.FromErr(err) - } - if err := api.Guardian.MultiFactor.Push.Enable(false); err != nil { + result := multierror.Append( + api.Guardian.MultiFactor.Phone.Enable(false), + api.Guardian.MultiFactor.Email.Enable(false), + api.Guardian.MultiFactor.OTP.Enable(false), + api.Guardian.MultiFactor.RecoveryCode.Enable(false), + api.Guardian.MultiFactor.WebAuthnRoaming.Enable(false), + api.Guardian.MultiFactor.WebAuthnPlatform.Enable(false), + api.Guardian.MultiFactor.DUO.Enable(false), + api.Guardian.MultiFactor.Push.Enable(false), + ) + if err := result.ErrorOrNil(); err != nil { return diag.FromErr(err) } diff --git a/auth0/structure_auth0_guardian.go b/auth0/structure_auth0_guardian.go index edf221f46..7031f8af3 100644 --- a/auth0/structure_auth0_guardian.go +++ b/auth0/structure_auth0_guardian.go @@ -5,6 +5,20 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) +func flattenMultiFactorPolicy(api *management.Management) (string, error) { + multiFactorPolicies, err := api.Guardian.MultiFactor.Policy() + if err != nil { + return "", err + } + + flattenedPolicy := "never" + if len(*multiFactorPolicies) > 0 { + flattenedPolicy = (*multiFactorPolicies)[0] + } + + return flattenedPolicy, nil +} + func flattenPhone(api *management.Management) ([]interface{}, error) { phoneMessageTypes, err := api.Guardian.MultiFactor.Phone.MessageTypes() if err != nil { From c9716d3c86f3b455b24bbd3975dff81ceb26d119 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Tue, 5 Jul 2022 21:44:28 +0200 Subject: [PATCH 6/7] Update guardian docs --- docs/resources/guardian.md | 41 +++++++++++++++++++++++++++++++++++++- example/guardian/main.tf | 26 +++++++++++++++++++++--- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/docs/resources/guardian.md b/docs/resources/guardian.md index e7da805c2..bd6e7dc06 100644 --- a/docs/resources/guardian.md +++ b/docs/resources/guardian.md @@ -27,8 +27,23 @@ resource "auth0_guardian" "default" { verification_message = "{{code}} is your verification code for {{tenant.friendly_name}}." } } + push { + amazon_sns { + aws_access_key_id = "test1" + aws_region = "us-west-1" + aws_secret_access_key = "secretKey" + sns_apns_platform_application_arn = "test_arn" + sns_gcm_platform_application_arn = "test_arn" + } + custom_app { + app_name = "CustomApp" + apple_app_link = "https://itunes.apple.com/us/app/my-app/id123121" + google_app_link = "https://play.google.com/store/apps/details?id=com.my.app" + } + } email = true otp = true + recovery_code = true } ``` @@ -42,8 +57,10 @@ The option `confidence-score` means the trigger of MFA will be adaptive. See [Au * `webauthn_roaming` - (Optional) List(Resource). Configuration settings for the WebAuthn with FIDO Security Keys MFA. For details, see [WebAuthn Roaming](#webauthn-roaming). * `webauthn_platform` - (Optional) List(Resource). Configuration settings for the WebAuthn with FIDO Device Biometrics MFA. For details, see [WebAuthn Platform](#webauthn-platform). * `duo` - (Optional) List(Resource). Configuration settings for the Duo MFA. For details, see [Duo](#duo). +* `push` - (Optional) List(Resource). Configuration settings for the Push MFA. For details, see [Push](#push). * `email` - (Optional) Boolean. Indicates whether email MFA is enabled. -* `OTP` - (Optional) Boolean. Indicates whether one time password MFA is enabled. +* `otp` - (Optional) Boolean. Indicates whether one time password MFA is enabled. +* `recovery_code` - (Optional) Boolean. Indicates whether recovery code MFA is enabled. ### Phone @@ -96,6 +113,28 @@ See [phone message hook docs](https://auth0.com/docs/hooks/extensibility-points/ * `secret_key`- (Optional) String. Duo client secret, see the Duo documentation for more details on Duo setup. * `hostname`- (Optional) String. Duo API Hostname, see the Duo documentation for more details on Duo setup. +### Push + +`push` supports the following arguments: + +#### AmazonSNS + +`amazon_sns` supports the following arguments: + +* `aws_access_key_id` - (Required) String. Your AWS Access Key ID. +* `aws_region`- (Required) String. Your AWS application's region. +* `aws_secret_access_key`- (Required) String. Your AWS Secret Access Key. +* `sns_apns_platform_application_arn`- (Required) String. The Amazon Resource Name for your Apple Push Notification Service. +* `sns_gcm_platform_application_arn`- (Required) String. The Amazon Resource Name for your Firebase Cloud Messaging Service. + +#### CustomApp + +`custom_app` supports the following arguments: + +* `app_name` - (Optional) String. Custom Application Name. +* `apple_app_link`- (Optional) String. Apple App Store URL. +* `google_app_link`- (Optional) String. Google Store URL. + ## Attributes Reference diff --git a/example/guardian/main.tf b/example/guardian/main.tf index f820bb378..2cf44922b 100644 --- a/example/guardian/main.tf +++ b/example/guardian/main.tf @@ -1,14 +1,34 @@ provider "auth0" {} resource "auth0_guardian" "guardian" { - email = false policy = "all-applications" + webauthn_roaming { + user_verification = "required" + } + webauthn_roaming {} phone { provider = "auth0" message_types = ["sms", "voice"] options { - verification_message = "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment." - enrollment_message = "{{code}} is your verification code for {{tenant.friendly_name}}." + enrollment_message = "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment." + verification_message = "{{code}} is your verification code for {{tenant.friendly_name}}." + } + } + push { + amazon_sns { + aws_access_key_id = "test1" + aws_region = "us-west-1" + aws_secret_access_key = "secretKey" + sns_apns_platform_application_arn = "test_arn" + sns_gcm_platform_application_arn = "test_arn" + } + custom_app { + app_name = "CustomApp" + apple_app_link = "https://itunes.apple.com/us/app/my-app/id123121" + google_app_link = "https://play.google.com/store/apps/details?id=com.my.app" } } + email = true + otp = true + recovery_code = true } From abf36b2116be72f4e9726d48e432e40c0ea30771 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Tue, 5 Jul 2022 21:45:39 +0200 Subject: [PATCH 7/7] Update guardian recordings --- .../testdata/recordings/TestAccGuardian.yaml | 2269 +---------------- .../recordings/TestAccGuardianDUO.yaml | 19 + .../recordings/TestAccGuardianPhone.yaml | 1808 +++++++++++++ ...GuardianPhoneMessageHookWithNoOptions.yaml | 801 ------ .../recordings/TestAccGuardianPush.yaml | 19 + .../TestAccGuardianWebAuthnPlatform.yaml | 19 + .../TestAccGuardianWebAuthnRoaming.yaml | 19 + 7 files changed, 2021 insertions(+), 2933 deletions(-) create mode 100644 auth0/testdata/recordings/TestAccGuardianPhone.yaml delete mode 100644 auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index 71e203e6e..5c609333b 100644 --- a/auth0/testdata/recordings/TestAccGuardian.yaml +++ b/auth0/testdata/recordings/TestAccGuardian.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: PUT response: @@ -28,1873 +28,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":true}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"from":"from bar","messaging_service_sid":"foo","auth_token":"bar","sid":"foo"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: PUT - response: - body: '{"from":"from bar","messaging_service_sid":"foo","auth_token":"bar","sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enrollment_message":"enroll foo","verification_message":"verify foo"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: PUT - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"provider":"twilio"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: PUT - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"message_types":["sms"]} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: PUT - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: GET - response: - body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: GET - response: - body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: GET - response: - body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":true} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":true}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"from":"from bar","messaging_service_sid":"foo","auth_token":"bar","sid":"foo"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: PUT - response: - body: '{"from":"from bar","messaging_service_sid":"foo","auth_token":"bar","sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enrollment_message":"enroll foo","verification_message":"verify foo"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: PUT - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"provider":"twilio"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: PUT - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"message_types":["sms"]} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: PUT - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: GET - response: - body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: GET - response: - body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"twilio"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio - method: GET - response: - body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":true} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":true}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"provider":"phone-message-hook"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: PUT - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"message_types":["sms"]} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: PUT - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":true} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":true}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enrollment_message":"enroll foo","verification_message":"verify foo"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: PUT - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"provider":"auth0"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: PUT - response: - body: '{"provider":"auth0"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"message_types":["voice"]} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: PUT - response: - body: '{"message_types":["voice"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["voice"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"auth0"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email + method: PUT response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + body: '{"enabled":true}' headers: Content-Type: - application/json; charset=utf-8 @@ -1903,17 +41,17 @@ interactions: duration: 1ms - request: body: | - null + {"enabled":false} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT response: - body: '["all-applications"]' + body: '{"enabled":false}' headers: Content-Type: - application/json; charset=utf-8 @@ -1922,17 +60,17 @@ interactions: duration: 1ms - request: body: | - null + {"enabled":false} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + body: '{"enabled":false}' headers: Content-Type: - application/json; charset=utf-8 @@ -1941,17 +79,17 @@ interactions: duration: 1ms - request: body: | - null + {"enabled":false} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT response: - body: '{"message_types":["voice"]}' + body: '{"enabled":false}' headers: Content-Type: - application/json; charset=utf-8 @@ -1960,17 +98,17 @@ interactions: duration: 1ms - request: body: | - null + {"enabled":false} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT response: - body: '{"provider":"auth0"}' + body: '{"enabled":false}' headers: Content-Type: - application/json; charset=utf-8 @@ -1979,17 +117,17 @@ interactions: duration: 1ms - request: body: | - null + {"enabled":false} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + body: '{"enabled":false}' headers: Content-Type: - application/json; charset=utf-8 @@ -2004,7 +142,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2023,68 +161,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["voice"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"auth0"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":true,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -2099,7 +180,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2118,68 +199,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["voice"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"auth0"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET - response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":true,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -2194,7 +218,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2213,49 +237,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["voice"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"auth0"}' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":true,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -2264,17 +250,17 @@ interactions: duration: 1ms - request: body: | - null + {"enabled":false} form: {} headers: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates - method: GET + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email + method: PUT response: - body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + body: '{"enabled":false}' headers: Content-Type: - application/json; charset=utf-8 @@ -2289,7 +275,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2308,7 +294,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -2327,7 +313,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -2346,7 +332,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -2365,7 +351,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -2384,7 +370,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2403,7 +389,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2422,7 +408,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2441,7 +427,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2460,7 +446,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2479,7 +465,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2498,8 +484,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: body: '{"enabled":true}' @@ -2517,7 +503,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2536,7 +522,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -2555,7 +541,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -2574,7 +560,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -2593,7 +579,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -2612,7 +598,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2631,11 +617,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":true,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":true,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -2650,7 +636,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2669,11 +655,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":true,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":true,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -2688,7 +674,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2707,11 +693,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":true,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":true,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -2726,8 +712,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: body: '{"enabled":false}' @@ -2745,7 +731,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2764,7 +750,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -2783,7 +769,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -2802,7 +788,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -2821,7 +807,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -2840,7 +826,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2859,7 +845,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2878,7 +864,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2897,7 +883,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2916,7 +902,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2935,7 +921,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2954,8 +940,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code method: PUT response: body: '{"enabled":true}' @@ -2973,7 +959,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2992,7 +978,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -3011,7 +997,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -3030,7 +1016,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -3049,7 +1035,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -3068,7 +1054,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -3087,11 +1073,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":true,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":true,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -3106,7 +1092,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -3125,11 +1111,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":true,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":true,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -3144,7 +1130,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -3163,11 +1149,11 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":true,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":true,"trial_expired":false}]' headers: Content-Type: - application/json; charset=utf-8 @@ -3182,8 +1168,8 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code method: PUT response: body: '{"enabled":false}' @@ -3201,7 +1187,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -3220,7 +1206,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -3239,7 +1225,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -3258,7 +1244,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -3277,7 +1263,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -3296,7 +1282,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -3315,7 +1301,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -3334,7 +1320,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -3353,7 +1339,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -3372,7 +1358,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -3391,7 +1377,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email method: PUT response: @@ -3410,7 +1396,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: @@ -3429,7 +1415,26 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -3448,7 +1453,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -3467,7 +1472,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -3486,7 +1491,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/latest + - Go-Auth0-SDK/0.8.0 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: diff --git a/auth0/testdata/recordings/TestAccGuardianDUO.yaml b/auth0/testdata/recordings/TestAccGuardianDUO.yaml index 5523da70d..83ad773c1 100644 --- a/auth0/testdata/recordings/TestAccGuardianDUO.yaml +++ b/auth0/testdata/recordings/TestAccGuardianDUO.yaml @@ -533,6 +533,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | {"enabled":false} diff --git a/auth0/testdata/recordings/TestAccGuardianPhone.yaml b/auth0/testdata/recordings/TestAccGuardianPhone.yaml new file mode 100644 index 000000000..e4bc527ec --- /dev/null +++ b/auth0/testdata/recordings/TestAccGuardianPhone.yaml @@ -0,0 +1,1808 @@ +--- +version: 1 +interactions: +- request: + body: | + ["all-applications"] + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: PUT + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":true} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":true}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"provider":"phone-message-hook"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: PUT + response: + body: '{"provider":"phone-message-hook"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"message_types":["sms"]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: PUT + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"phone-message-hook"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"phone-message-hook"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"phone-message-hook"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"phone-message-hook"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"phone-message-hook"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":true} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":true}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enrollment_message":"enroll foo","verification_message":"verify foo"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: PUT + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"provider":"auth0"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: PUT + response: + body: '{"provider":"auth0"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"message_types":["voice"]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: PUT + response: + body: '{"message_types":["voice"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["voice"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"auth0"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: GET + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["voice"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"auth0"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: GET + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["voice"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"auth0"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: GET + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":true} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":true}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"from":"from bar","messaging_service_sid":"foo","auth_token":"bar","sid":"foo"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio + method: PUT + response: + body: '{"from":"from bar","messaging_service_sid":"foo","auth_token":"bar","sid":"foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enrollment_message":"enroll foo","verification_message":"verify foo"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: PUT + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"provider":"twilio"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: PUT + response: + body: '{"provider":"twilio"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"message_types":["sms"]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: PUT + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"twilio"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: GET + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio + method: GET + response: + body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"twilio"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: GET + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio + method: GET + response: + body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types + method: GET + response: + body: '{"message_types":["sms"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider + method: GET + response: + body: '{"provider":"twilio"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates + method: GET + response: + body: '{"enrollment_message":"enroll foo","verification_message":"verify foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio + method: GET + response: + body: '{"auth_token":"bar","sid":"foo","from":"from bar","messaging_service_sid":"foo"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms diff --git a/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml b/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml deleted file mode 100644 index 96aec4455..000000000 --- a/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml +++ /dev/null @@ -1,801 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: | - ["all-applications"] - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: PUT - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":true} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":true}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"provider":"phone-message-hook"} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: PUT - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"message_types":["sms"]} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: PUT - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies - method: GET - response: - body: '["all-applications"]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors - method: GET - response: - body: '[{"name":"sms","enabled":true,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types - method: GET - response: - body: '{"message_types":["sms"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider - method: GET - response: - body: '{"provider":"phone-message-hook"}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms -- request: - body: | - {"enabled":false} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/latest - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification - method: PUT - response: - body: '{"enabled":false}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 1ms diff --git a/auth0/testdata/recordings/TestAccGuardianPush.yaml b/auth0/testdata/recordings/TestAccGuardianPush.yaml index ea899b559..379f48db8 100644 --- a/auth0/testdata/recordings/TestAccGuardianPush.yaml +++ b/auth0/testdata/recordings/TestAccGuardianPush.yaml @@ -932,6 +932,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | {"enabled":false} diff --git a/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml b/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml index abbadba24..f73ca40d4 100644 --- a/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml +++ b/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml @@ -514,6 +514,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | {"enabled":false} diff --git a/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml b/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml index 8f5f4d4d1..6c407369b 100644 --- a/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml +++ b/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml @@ -628,6 +628,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | {"enabled":false}