diff --git a/auth0/resource_auth0_guardian.go b/auth0/resource_auth0_guardian.go index e9f269842..b38ddd2a6 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": { @@ -163,11 +159,15 @@ func newGuardian() *schema.Resource { Optional: true, Default: false, }, + "recovery_code": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, "duo": { Type: schema.TypeList, Optional: true, MaxItems: 1, - MinItems: 0, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "integration_key": { @@ -190,14 +190,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": { @@ -262,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 { @@ -283,6 +278,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,34 +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 := 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) } @@ -384,25 +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.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/resource_auth0_guardian_test.go b/auth0/resource_auth0_guardian_test.go index 83c96ccde..97a9d2d11 100644 --- a/auth0/resource_auth0_guardian_test.go +++ b/auth0/resource_auth0_guardian_test.go @@ -6,6 +6,48 @@ 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 +} +` + +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) @@ -13,295 +55,244 @@ 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, { - 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, { - Config: testAccConfigureEmail, + Config: testAccGuardianOTPCreate, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "true"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "email", "false"), + 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, { - Config: testAccConfigureEmailUpdate, + 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, { - Config: testAccConfigureOTP, + Config: testAccGuardianRecoveryCodeCreate, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), - resource.TestCheckResourceAttr("auth0_guardian.foo", "otp", "true"), + 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: testAccConfigureOTPUpdate, + 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"), ), }, }, }) } -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 = ` +const testAccGuardianPhoneWithCustomProviderAndEmptyOptions = ` resource "auth0_guardian" "foo" { - policy = "all-applications" -} -` - -const testAccConfigureAuth0 = ` -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 = ` +const testAccGuardianPhoneWithAuth0Provider = ` resource "auth0_guardian" "foo" { - policy = "all-applications" -} -` - -const testAccConfigureEmail = ` -resource "auth0_guardian" "foo" { - policy = "all-applications" - email = true -} -` - -const testAccConfigureEmailUpdate = ` -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", "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"), ), }, { - 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", "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"), ), }, - }, - }) -} - -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", "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"), + 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", "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"), + 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -330,24 +321,53 @@ 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", "recovery_code", "false"), + 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", "recovery_code", "false"), + 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -367,27 +387,38 @@ 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", "recovery_code", "false"), + 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -411,48 +442,41 @@ 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", "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"), + 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), ), }, }, @@ -506,3 +530,79 @@ 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", "recovery_code", "false"), + 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", "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"), + 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", "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"), + 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"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), + ), + }, + }, + }) +} diff --git a/auth0/structure_auth0_guardian.go b/auth0/structure_auth0_guardian.go index 54a603382..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 { @@ -187,6 +201,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. diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index 7a920c1c4..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,1854 +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: '["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 @@ -1884,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 @@ -1903,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 @@ -1922,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 @@ -1941,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 @@ -1960,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 @@ -1985,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: @@ -2004,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 @@ -2080,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: @@ -2099,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 @@ -2175,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: @@ -2194,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 @@ -2245,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 @@ -2270,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: @@ -2289,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: @@ -2308,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: @@ -2327,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: @@ -2346,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: @@ -2365,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: @@ -2384,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: @@ -2403,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: @@ -2422,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: @@ -2441,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: @@ -2460,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: @@ -2479,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}' @@ -2498,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: @@ -2517,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: @@ -2536,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: @@ -2555,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: @@ -2574,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: @@ -2593,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: @@ -2612,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 @@ -2631,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: @@ -2650,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 @@ -2669,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: @@ -2688,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 @@ -2707,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}' @@ -2726,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: @@ -2745,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: @@ -2764,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: @@ -2783,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: @@ -2802,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: @@ -2821,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: @@ -2840,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: @@ -2859,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: @@ -2878,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: @@ -2897,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: @@ -2916,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: @@ -2935,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}' @@ -2954,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: @@ -2973,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: @@ -2992,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: @@ -3011,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: @@ -3030,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: @@ -3049,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: @@ -3068,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 @@ -3087,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: @@ -3106,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 @@ -3125,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: @@ -3144,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 @@ -3163,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}' @@ -3182,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: @@ -3201,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: @@ -3220,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: @@ -3239,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: @@ -3258,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: @@ -3277,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: @@ -3296,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: @@ -3315,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: @@ -3334,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: @@ -3353,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: @@ -3372,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: @@ -3391,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: @@ -3410,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: @@ -3429,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: @@ -3448,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: @@ -3467,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} 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 }