From 3caadaa55907562469116b59b9cb4a2d50a52af5 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Sat, 2 Jul 2022 23:36:08 +0200 Subject: [PATCH] Add webauthn support to guardian resource --- auth0/resource_auth0_guardian.go | 183 ++++- auth0/resource_auth0_guardian_test.go | 91 +++ .../testdata/recordings/TestAccGuardian.yaml | 763 ++++++++++++++---- ...GuardianPhoneMessageHookWithNoOptions.yaml | 155 +++- .../TestAccGuardianWebAuthnPlatform.yaml | 459 +++++++++++ .../TestAccGuardianWebAuthnRoaming.yaml | 573 +++++++++++++ docs/resources/guardian.md | 29 +- 7 files changed, 2071 insertions(+), 182 deletions(-) create mode 100644 auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml create mode 100644 auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml diff --git a/auth0/resource_auth0_guardian.go b/auth0/resource_auth0_guardian.go index 5a10f2e0e..3f3ac4c39 100644 --- a/auth0/resource_auth0_guardian.go +++ b/auth0/resource_auth0_guardian.go @@ -33,6 +33,61 @@ func newGuardian() *schema.Resource { false, ), }, + "webauthn_roaming": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + MinItems: 0, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "user_verification": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice( + []string{ + "discouraged", + "preferred", + "required", + }, + false, + ), + }, + "override_relying_party": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "relying_party_identifier": { + Type: schema.TypeString, + Optional: true, + Computed: true, + RequiredWith: []string{"webauthn_roaming.0.override_relying_party"}, + }, + }, + }, + }, + "webauthn_platform": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + MinItems: 0, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "override_relying_party": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "relying_party_identifier": { + Type: schema.TypeString, + Optional: true, + Computed: true, + RequiredWith: []string{"webauthn_platform.0.override_relying_party"}, + }, + }, + }, + }, "phone": { Type: schema.TypeList, Optional: true, @@ -142,19 +197,40 @@ func readGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) di case "otp": result = multierror.Append(result, d.Set("otp", factor.GetEnabled())) case "sms": - if !factor.GetEnabled() { - result = multierror.Append(result, d.Set("phone", nil)) - return diag.FromErr(result.ErrorOrNil()) + result = multierror.Append(result, d.Set("phone", nil)) + + if factor.GetEnabled() { + phone, err := flattenPhone(api) + if err != nil { + return diag.FromErr(err) + } + + result = multierror.Append(result, d.Set("phone", phone)) } - } - } + case "webauthn-roaming": + result = multierror.Append(result, d.Set("webauthn_roaming", nil)) - phone, err := flattenPhone(api) - if err != nil { - return diag.FromErr(err) - } + if factor.GetEnabled() { + webAuthnRoaming, err := flattenWebAuthnRoaming(api) + if err != nil { + return diag.FromErr(err) + } - result = multierror.Append(result, d.Set("phone", phone)) + result = multierror.Append(result, d.Set("webauthn_roaming", webAuthnRoaming)) + } + case "webauthn-platform": + result = multierror.Append(result, d.Set("webauthn_platform", nil)) + + if factor.GetEnabled() { + webAuthnPlatform, err := flattenWebAuthnPlatform(api) + if err != nil { + return diag.FromErr(err) + } + + result = multierror.Append(result, d.Set("webauthn_platform", webAuthnPlatform)) + } + } + } return diag.FromErr(result.ErrorOrNil()) } @@ -177,6 +253,14 @@ func updateGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) 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) + } + return readGuardian(ctx, d, m) } @@ -192,6 +276,9 @@ func deleteGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) if err := api.Guardian.MultiFactor.OTP.Enable(false); err != nil { return diag.FromErr(err) } + if err := api.Guardian.MultiFactor.WebAuthnRoaming.Enable(false); err != nil { + return diag.FromErr(err) + } d.SetId("") @@ -272,6 +359,35 @@ func flattenTwilioOptions(api *management.Management) ([]interface{}, error) { return []interface{}{m}, nil } +func flattenWebAuthnRoaming(api *management.Management) ([]interface{}, error) { + webAuthnSettings, err := api.Guardian.MultiFactor.WebAuthnRoaming.Read() + if err != nil { + return nil, err + } + + m := map[string]interface{}{ + "user_verification": webAuthnSettings.GetUserVerification(), + "override_relying_party": webAuthnSettings.GetOverrideRelyingParty(), + "relying_party_identifier": webAuthnSettings.GetRelyingPartyIdentifier(), + } + + return []interface{}{m}, nil +} + +func flattenWebAuthnPlatform(api *management.Management) ([]interface{}, error) { + webAuthnSettings, err := api.Guardian.MultiFactor.WebAuthnPlatform.Read() + if err != nil { + return nil, err + } + + m := map[string]interface{}{ + "override_relying_party": webAuthnSettings.GetOverrideRelyingParty(), + "relying_party_identifier": webAuthnSettings.GetRelyingPartyIdentifier(), + } + + return []interface{}{m}, nil +} + func updatePolicy(d *schema.ResourceData, api *management.Management) error { if d.HasChange("policy") { multiFactorPolicies := management.MultiFactorPolicies{} @@ -431,3 +547,50 @@ func fromInterfaceSliceToStringSlice(from []interface{}) []string { return stringArray } + +func updateWebAuthnRoaming(d *schema.ResourceData, api *management.Management) error { + if factorShouldBeUpdated(d, "webauthn_roaming") { + if err := api.Guardian.MultiFactor.WebAuthnRoaming.Enable(true); err != nil { + return err + } + + var webAuthnSettings management.MultiFactorWebAuthnSettings + + List(d, "webauthn_roaming").Elem(func(d ResourceData) { + webAuthnSettings.OverrideRelyingParty = Bool(d, "override_relying_party") + webAuthnSettings.RelyingPartyIdentifier = String(d, "relying_party_identifier") + webAuthnSettings.UserVerification = String(d, "user_verification") + }) + + if webAuthnSettings == (management.MultiFactorWebAuthnSettings{}) { + return nil + } + + return api.Guardian.MultiFactor.WebAuthnRoaming.Update(&webAuthnSettings) + } + + return api.Guardian.MultiFactor.WebAuthnRoaming.Enable(false) +} + +func updateWebAuthnPlatform(d *schema.ResourceData, api *management.Management) error { + if factorShouldBeUpdated(d, "webauthn_platform") { + if err := api.Guardian.MultiFactor.WebAuthnPlatform.Enable(true); err != nil { + return err + } + + var webAuthnSettings management.MultiFactorWebAuthnSettings + + List(d, "webauthn_platform").Elem(func(d ResourceData) { + webAuthnSettings.OverrideRelyingParty = Bool(d, "override_relying_party") + webAuthnSettings.RelyingPartyIdentifier = String(d, "relying_party_identifier") + }) + + if webAuthnSettings == (management.MultiFactorWebAuthnSettings{}) { + return nil + } + + return api.Guardian.MultiFactor.WebAuthnPlatform.Update(&webAuthnSettings) + } + + return api.Guardian.MultiFactor.WebAuthnPlatform.Enable(false) +} diff --git a/auth0/resource_auth0_guardian_test.go b/auth0/resource_auth0_guardian_test.go index 731df04e4..ec4a11e91 100644 --- a/auth0/resource_auth0_guardian_test.go +++ b/auth0/resource_auth0_guardian_test.go @@ -275,3 +275,94 @@ resource "auth0_guardian" "default" { } } ` + +func TestAccGuardianWebAuthnRoaming(t *testing.T) { + httpRecorder := configureHTTPRecorder(t) + + resource.Test(t, resource.TestCase{ + ProviderFactories: testProviders(httpRecorder), + Steps: []resource.TestStep{ + { + Config: testAccConfigureWebAuthnRoamingCreate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "1"), + ), + }, + { + Config: testAccConfigureWebAuthnRoamingUpdate, + 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"), + ), + }, + { + Config: testAccConfigureWebAuthnRoamingDelete, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_roaming.#", "0"), + ), + }, + }, + }) +} + +const testAccConfigureWebAuthnRoamingCreate = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + webauthn_roaming {} +} +` + +const testAccConfigureWebAuthnRoamingUpdate = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + webauthn_roaming { + user_verification = "required" + } +} +` + +const testAccConfigureWebAuthnRoamingDelete = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" +} +` + +func TestAccGuardianWebAuthnPlatform(t *testing.T) { + httpRecorder := configureHTTPRecorder(t) + + resource.Test(t, resource.TestCase{ + ProviderFactories: testProviders(httpRecorder), + Steps: []resource.TestStep{ + { + Config: testAccConfigureWebAuthnPlatformCreate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "1"), + ), + }, + { + Config: testAccConfigureWebAuthnPlatformDelete, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), + ), + }, + }, + }) +} + +const testAccConfigureWebAuthnPlatformCreate = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + webauthn_platform {} +} +` + +const testAccConfigureWebAuthnPlatformDelete = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" +} +` diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index 4953740d3..fcb9a2eb9 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/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: PUT response: @@ -28,7 +28,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -47,7 +47,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: PUT response: @@ -66,7 +66,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: PUT response: @@ -85,7 +85,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: PUT response: @@ -104,7 +104,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: PUT response: @@ -115,6 +115,44 @@ 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/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: | null @@ -123,7 +161,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -142,7 +180,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -161,7 +199,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -180,7 +218,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -199,7 +237,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -218,7 +256,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: GET response: @@ -237,7 +275,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -256,7 +294,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -275,7 +313,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -294,7 +332,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -313,7 +351,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -332,7 +370,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: GET response: @@ -351,7 +389,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -370,7 +408,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -389,7 +427,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -408,7 +446,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -427,7 +465,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -446,7 +484,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: GET response: @@ -465,7 +503,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -476,6 +514,44 @@ 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/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: | null @@ -484,7 +560,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -503,7 +579,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -522,7 +598,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -541,7 +617,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -560,7 +636,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -579,7 +655,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -598,7 +674,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -617,7 +693,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: PUT response: @@ -636,7 +712,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: PUT response: @@ -655,7 +731,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: PUT response: @@ -674,7 +750,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: PUT response: @@ -685,6 +761,44 @@ 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/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: | null @@ -693,7 +807,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -712,7 +826,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -731,7 +845,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -750,7 +864,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -769,7 +883,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -788,7 +902,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: GET response: @@ -807,7 +921,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -826,7 +940,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -845,7 +959,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -864,7 +978,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -883,7 +997,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -902,7 +1016,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: GET response: @@ -921,7 +1035,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -940,7 +1054,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -959,7 +1073,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -978,7 +1092,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -997,7 +1111,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -1016,7 +1130,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/providers/twilio method: GET response: @@ -1035,7 +1149,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -1054,7 +1168,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: PUT response: @@ -1073,7 +1187,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: PUT response: @@ -1084,6 +1198,88 @@ 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/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: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms - request: body: | null @@ -1092,7 +1288,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1111,7 +1307,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1130,7 +1326,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1149,7 +1345,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1168,7 +1364,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1187,7 +1383,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1206,7 +1402,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1225,7 +1421,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1244,7 +1440,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1263,7 +1459,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1282,7 +1478,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1301,7 +1497,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1320,7 +1516,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -1339,7 +1535,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: PUT response: @@ -1358,7 +1554,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: PUT response: @@ -1377,7 +1573,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: PUT response: @@ -1388,6 +1584,44 @@ 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/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: | null @@ -1396,7 +1630,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1415,7 +1649,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1434,7 +1668,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1453,7 +1687,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1472,7 +1706,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -1491,7 +1725,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1510,7 +1744,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1529,7 +1763,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1548,7 +1782,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1567,7 +1801,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -1586,7 +1820,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1605,7 +1839,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1624,7 +1858,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1643,7 +1877,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1662,7 +1896,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -1681,7 +1915,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1700,7 +1934,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1719,7 +1953,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1738,7 +1972,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1757,7 +1991,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -1776,7 +2010,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1795,7 +2029,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1814,7 +2048,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -1833,7 +2067,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -1852,7 +2086,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms/templates method: GET response: @@ -1871,7 +2105,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -1882,6 +2116,44 @@ 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/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: | null @@ -1890,7 +2162,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1909,7 +2181,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1928,7 +2200,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1947,7 +2219,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1966,7 +2238,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1985,7 +2257,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2004,7 +2276,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email method: PUT response: @@ -2023,7 +2295,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2034,6 +2306,44 @@ 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/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: | null @@ -2042,7 +2352,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2061,7 +2371,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2080,7 +2390,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2099,7 +2409,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2118,7 +2428,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2137,7 +2447,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2156,7 +2466,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email method: PUT response: @@ -2175,7 +2485,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2186,6 +2496,44 @@ 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/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: | null @@ -2194,7 +2542,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2213,7 +2561,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2232,7 +2580,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2251,7 +2599,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2270,7 +2618,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2289,7 +2637,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2308,7 +2656,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: @@ -2327,7 +2675,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2338,6 +2686,44 @@ 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/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: | null @@ -2346,7 +2732,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2365,7 +2751,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2384,7 +2770,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2403,7 +2789,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2422,7 +2808,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2441,7 +2827,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2460,7 +2846,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: @@ -2479,7 +2865,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2490,6 +2876,88 @@ 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/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: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms +- request: + body: | + {"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: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms +- request: + body: | + {"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: | null @@ -2498,7 +2966,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2517,7 +2985,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2536,7 +3004,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -2555,7 +3023,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -2574,7 +3042,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -2593,7 +3061,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email method: PUT response: @@ -2612,7 +3080,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: @@ -2623,3 +3091,22 @@ 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/webauthn-roaming + 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 index 369d68645..4a83ddbe4 100644 --- a/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml +++ b/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: PUT response: @@ -28,7 +28,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -39,6 +39,44 @@ 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/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: | null @@ -47,7 +85,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -66,7 +104,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -85,7 +123,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -104,7 +142,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -123,7 +161,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -142,7 +180,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -161,7 +199,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -180,7 +218,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: PUT response: @@ -199,7 +237,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: PUT response: @@ -210,6 +248,44 @@ 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/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: | null @@ -218,7 +294,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -237,7 +313,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -256,7 +332,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -275,7 +351,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -294,7 +370,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -313,7 +389,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -332,7 +408,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -351,7 +427,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -370,7 +446,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -389,7 +465,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -408,7 +484,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -427,7 +503,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -446,7 +522,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -465,7 +541,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -484,7 +560,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/message-types method: GET response: @@ -503,7 +579,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/phone/selected-provider method: GET response: @@ -522,7 +598,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -541,7 +617,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email method: PUT response: @@ -560,7 +636,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.6.4 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: @@ -571,3 +647,22 @@ 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/webauthn-roaming + 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/TestAccGuardianWebAuthnPlatform.yaml b/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml new file mode 100644 index 000000000..a48d3ecf8 --- /dev/null +++ b/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml @@ -0,0 +1,459 @@ +--- +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":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/webauthn-platform + method: PUT + response: + body: '{"enabled":true}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + 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":true,"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/webauthn-platform/settings + method: GET + response: + body: '{"overrideRelyingParty":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":true,"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/webauthn-platform/settings + method: GET + response: + body: '{"overrideRelyingParty":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":true,"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/webauthn-platform/settings + method: GET + response: + body: '{"overrideRelyingParty":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/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: | + null + 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/webauthn-roaming + 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/TestAccGuardianWebAuthnRoaming.yaml b/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml new file mode 100644 index 000000000..72bbdc1e1 --- /dev/null +++ b/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml @@ -0,0 +1,573 @@ +--- +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":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/webauthn-roaming + method: PUT + response: + body: '{"enabled":true}' + 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: | + null + 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":true,"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/webauthn-roaming/settings + method: GET + response: + body: '{"userVerification":"required","overrideRelyingParty":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":true,"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/webauthn-roaming/settings + method: GET + response: + body: '{"userVerification":"required","overrideRelyingParty":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":true,"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/webauthn-roaming/settings + method: GET + response: + body: '{"userVerification":"required","overrideRelyingParty":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":true,"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/webauthn-roaming/settings + method: GET + response: + body: '{"userVerification":"required","overrideRelyingParty":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":true,"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/webauthn-roaming/settings + method: GET + response: + body: '{"userVerification":"required","overrideRelyingParty":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/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: | + null + 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/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms diff --git a/docs/resources/guardian.md b/docs/resources/guardian.md index 0ca5877fa..8222966b3 100644 --- a/docs/resources/guardian.md +++ b/docs/resources/guardian.md @@ -15,6 +15,10 @@ access. With this resource you can configure some options available for MFA. ```hcl resource "auth0_guardian" "default" { policy = "all-applications" + webauthn_roaming { + user_verification = "required" + } + webauthn_roaming {} phone { provider = "auth0" message_types = ["sms"] @@ -35,6 +39,8 @@ Arguments accepted by this resource include: * `policy` - (Required) String. Policy to use. Available options are `never`, `all-applications` and `confidence-score`. The option `confidence-score` means the trigger of MFA will be adaptive. See [Auth0 docs](https://auth0.com/docs/mfa/adaptive-mfa). * `phone` - (Optional) List(Resource). Configuration settings for the phone MFA. For details, see [Phone](#phone). +* `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). * `email` - (Optional) Boolean. Indicates whether email MFA is enabled. * `OTP` - (Optional) Boolean. Indicates whether one time password MFA is enabled. @@ -46,14 +52,14 @@ The option `confidence-score` means the trigger of MFA will be adaptive. See [Au * `message_types` - (Required) List(String). Message types to use, array of `sms` and or `voice`. Adding both to array should enable the user to choose. * `options`- (Required) List(Resource). Options for the various providers. See [Options](#options). -### Options +#### Options `options` supports different arguments depending on the provider specified in [Phone](#phone). -### Auth0 +##### Auth0 * `enrollment_message` (Optional) String. This message will be sent whenever a user enrolls a new device for the first time using MFA. Supports liquid syntax, see [Auth0 docs](https://auth0.com/docs/mfa/customize-sms-or-voice-messages). * `verification_message` (Optional) String. This message will be sent whenever a user logs in after the enrollment. Supports liquid syntax, see [Auth0 docs](https://auth0.com/docs/mfa/customize-sms-or-voice-messages). -### Twilio +##### Twilio * `enrollment_message` (Optional) String. This message will be sent whenever a user enrolls a new device for the first time using MFA. Supports liquid syntax, see [Auth0 docs](https://auth0.com/docs/mfa/customize-sms-or-voice-messages). * `verification_message` (Optional) String. This message will be sent whenever a user logs in after the enrollment. Supports liquid syntax, see [Auth0 docs](https://auth0.com/docs/mfa/customize-sms-or-voice-messages). * `sid`(Optional) String. @@ -61,11 +67,26 @@ The option `confidence-score` means the trigger of MFA will be adaptive. See [Au * `from` (Optional) String. * `messaging_service_sid`(Optional) String. -### Phone message hook +##### Phone message hook Options have to be empty. Custom code has to be written in a phone message hook. See [phone message hook docs](https://auth0.com/docs/hooks/extensibility-points/send-phone-message). +### WebAuthn Roaming + +`webauth_roaming` supports the following arguments: + +* `user_verification` - (Optional) String. User verification, one of `discouraged`, `preferred` or `required`. +* `override_relying_party` - (Optional) Bool. The Relying Party is the domain for which the WebAuthn keys will be issued, set to true if you are customizing the identifier. +* `relying_party_identifier`- (Optional) String. The Relying Party should be a suffix of the custom domain. + +### WebAuthn Platform + +`webauth_roaming` supports the following arguments: + +* `override_relying_party` - (Optional) Bool. The Relying Party is the domain for which the WebAuthn keys will be issued, set to true if you are customizing the identifier. +* `relying_party_identifier`- (Optional) String. The Relying Party should be a suffix of the custom domain. + ## Attributes Reference No additional attributes are exported by this resource.