From 08fd35b8807dd3e81dd62ff855b5f4abf640b4fb Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Sat, 2 Jul 2022 23:36:08 +0200 Subject: [PATCH 1/3] Add webauthn support to guardian resource --- .../testdata/recordings/TestAccGuardian.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index 40d64d9c4..651653c81 100644 --- a/auth0/testdata/recordings/TestAccGuardian.yaml +++ b/auth0/testdata/recordings/TestAccGuardian.yaml @@ -1312,6 +1312,50 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has + been reached","errorCode":"too_many_requests"}' + headers: + Content-Length: + - "120" + Content-Type: + - application/json; charset=utf-8 + status: 429 Too Many Requests + code: 429 + duration: 1ms - request: body: | null From 43e5d5efbd24768d17e8c59dfc0df8bfa57d37cb Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Sun, 3 Jul 2022 16:47:03 +0200 Subject: [PATCH 2/3] Add duo support to guardian resource --- .../testdata/recordings/TestAccGuardian.yaml | 35 +++---------------- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index 651653c81..27d79ee07 100644 --- a/auth0/testdata/recordings/TestAccGuardian.yaml +++ b/auth0/testdata/recordings/TestAccGuardian.yaml @@ -1321,40 +1321,15 @@ interactions: - 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 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT response: - body: '{"statusCode":429,"error":"Too Many Requests","message":"Global limit has - been reached","errorCode":"too_many_requests"}' + body: '{"enabled":false}' headers: - Content-Length: - - "120" Content-Type: - application/json; charset=utf-8 - status: 429 Too Many Requests - code: 429 + status: 200 OK + code: 200 duration: 1ms - request: body: | From dc34f25320d1c0552f3f651569160cc29587f0fe Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Tue, 5 Jul 2022 16:36:57 +0200 Subject: [PATCH 3/3] Add push support to guardian resource --- auth0/resource_auth0_guardian.go | 82 ++ auth0/resource_auth0_guardian_test.go | 96 ++ auth0/structure_auth0_guardian.go | 73 ++ .../testdata/recordings/TestAccGuardian.yaml | 209 ++++ .../recordings/TestAccGuardianDUO.yaml | 57 + ...GuardianPhoneMessageHookWithNoOptions.yaml | 57 + .../recordings/TestAccGuardianPush.yaml | 1010 +++++++++++++++++ .../TestAccGuardianWebAuthnPlatform.yaml | 57 + .../TestAccGuardianWebAuthnRoaming.yaml | 57 + 9 files changed, 1698 insertions(+) create mode 100644 auth0/testdata/recordings/TestAccGuardianPush.yaml diff --git a/auth0/resource_auth0_guardian.go b/auth0/resource_auth0_guardian.go index d948d7149..e9f269842 100644 --- a/auth0/resource_auth0_guardian.go +++ b/auth0/resource_auth0_guardian.go @@ -186,6 +186,70 @@ func newGuardian() *schema.Resource { }, }, }, + "push": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + MinItems: 0, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "amazon_sns": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "aws_access_key_id": { + Type: schema.TypeString, + Required: true, + }, + "aws_region": { + Type: schema.TypeString, + Required: true, + }, + "aws_secret_access_key": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "sns_apns_platform_application_arn": { + Type: schema.TypeString, + Required: true, + }, + "sns_gcm_platform_application_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "custom_app": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "app_name": { + Type: schema.TypeString, + Optional: true, + }, + "apple_app_link": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.IsURLWithHTTPS, + }, + "google_app_link": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.IsURLWithHTTPS, + }, + }, + }, + }, + }, + }, + }, }, } } @@ -263,6 +327,17 @@ func readGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) di result = multierror.Append(result, d.Set("duo", duo)) } + case "push": + result = multierror.Append(result, d.Set("push", nil)) + + if factor.GetEnabled() { + push, err := flattenPush(api) + if err != nil { + return diag.FromErr(err) + } + + result = multierror.Append(result, d.Set("push", push)) + } } } @@ -299,6 +374,10 @@ func updateGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) return diag.FromErr(err) } + if err := updatePush(d, api); err != nil { + return diag.FromErr(err) + } + return readGuardian(ctx, d, m) } @@ -323,6 +402,9 @@ func deleteGuardian(ctx context.Context, d *schema.ResourceData, m interface{}) if err := api.Guardian.MultiFactor.DUO.Enable(false); err != nil { return diag.FromErr(err) } + if err := api.Guardian.MultiFactor.Push.Enable(false); err != nil { + return diag.FromErr(err) + } d.SetId("") diff --git a/auth0/resource_auth0_guardian_test.go b/auth0/resource_auth0_guardian_test.go index 697f623da..83c96ccde 100644 --- a/auth0/resource_auth0_guardian_test.go +++ b/auth0/resource_auth0_guardian_test.go @@ -410,3 +410,99 @@ resource "auth0_guardian" "foo" { policy = "all-applications" } ` + +func TestAccGuardianPush(t *testing.T) { + httpRecorder := configureHTTPRecorder(t) + + resource.Test(t, resource.TestCase{ + ProviderFactories: testProviders(httpRecorder), + Steps: []resource.TestStep{ + { + Config: testAccConfigurePushCreate, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + ), + }, + { + Config: testAccConfigurePushUpdateAmazonSNS, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_access_key_id", "test1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_region", "us-west-1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.aws_secret_access_key", "secretKey"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.sns_apns_platform_application_arn", "test_arn"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.amazon_sns.0.sns_gcm_platform_application_arn", "test_arn"), + ), + }, + { + Config: testAccConfigurePushUpdateCustomApp, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.app_name", "CustomApp"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.apple_app_link", "https://itunes.apple.com/us/app/my-app/id123121"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.custom_app.0.google_app_link", "https://play.google.com/store/apps/details?id=com.my.app"), + ), + }, + { + Config: testAccConfigurePushDelete, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_guardian.foo", "policy", "all-applications"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "0"), + ), + }, + }, + }) +} + +const testAccConfigurePushCreate = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + push {} +} +` + +const testAccConfigurePushUpdateAmazonSNS = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + push { + amazon_sns { + aws_access_key_id = "test1" + aws_region = "us-west-1" + aws_secret_access_key = "secretKey" + sns_apns_platform_application_arn = "test_arn" + sns_gcm_platform_application_arn = "test_arn" + } + } +} +` + +const testAccConfigurePushUpdateCustomApp = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" + push { + amazon_sns { + aws_access_key_id = "test1" + aws_region = "us-west-1" + aws_secret_access_key = "secretKey" + sns_apns_platform_application_arn = "test_arn" + sns_gcm_platform_application_arn = "test_arn" + } + custom_app { + app_name = "CustomApp" + apple_app_link = "https://itunes.apple.com/us/app/my-app/id123121" + google_app_link = "https://play.google.com/store/apps/details?id=com.my.app" + } + } +} +` + +const testAccConfigurePushDelete = ` +resource "auth0_guardian" "foo" { + policy = "all-applications" +} +` diff --git a/auth0/structure_auth0_guardian.go b/auth0/structure_auth0_guardian.go index ed863f796..54a603382 100644 --- a/auth0/structure_auth0_guardian.go +++ b/auth0/structure_auth0_guardian.go @@ -123,6 +123,39 @@ func flattenDUO(api *management.Management) ([]interface{}, error) { return []interface{}{m}, nil } +func flattenPush(api *management.Management) ([]interface{}, error) { + amazonSNS, err := api.Guardian.MultiFactor.Push.AmazonSNS() + if err != nil { + return nil, err + } + + pushData := make(map[string]interface{}) + pushData["amazon_sns"] = []interface{}{ + map[string]interface{}{ + "aws_access_key_id": amazonSNS.GetAccessKeyID(), + "aws_region": amazonSNS.GetRegion(), + "aws_secret_access_key": amazonSNS.GetSecretAccessKeyID(), + "sns_apns_platform_application_arn": amazonSNS.GetAPNSPlatformApplicationARN(), + "sns_gcm_platform_application_arn": amazonSNS.GetGCMPlatformApplicationARN(), + }, + } + + customApp, err := api.Guardian.MultiFactor.Push.CustomApp() + if err != nil { + return nil, err + } + + pushData["custom_app"] = []interface{}{ + map[string]interface{}{ + "app_name": customApp.GetAppName(), + "apple_app_link": customApp.GetAppleAppLink(), + "google_app_link": customApp.GetGoogleAppLink(), + }, + } + + return []interface{}{pushData}, nil +} + func updatePolicy(d *schema.ResourceData, api *management.Management) error { if d.HasChange("policy") { multiFactorPolicies := management.MultiFactorPolicies{} @@ -349,3 +382,43 @@ func updateDUO(d *schema.ResourceData, api *management.Management) error { return api.Guardian.MultiFactor.DUO.Enable(false) } + +func updatePush(d *schema.ResourceData, api *management.Management) error { + if factorShouldBeUpdated(d, "push") { + if err := api.Guardian.MultiFactor.Push.Enable(true); err != nil { + return err + } + + var amazonSNS *management.MultiFactorProviderAmazonSNS + List(d, "amazon_sns", HasChange()).Elem(func(d ResourceData) { + amazonSNS = &management.MultiFactorProviderAmazonSNS{ + AccessKeyID: String(d, "aws_access_key_id"), + SecretAccessKeyID: String(d, "aws_secret_access_key"), + Region: String(d, "aws_region"), + APNSPlatformApplicationARN: String(d, "sns_apns_platform_application_arn"), + GCMPlatformApplicationARN: String(d, "sns_gcm_platform_application_arn"), + } + }) + if amazonSNS != nil { + if err := api.Guardian.MultiFactor.Push.UpdateAmazonSNS(amazonSNS); err != nil { + return err + } + } + + var customApp *management.MultiFactorPushCustomApp + List(d, "custom_app", HasChange()).Elem(func(d ResourceData) { + customApp = &management.MultiFactorPushCustomApp{ + AppName: String(d, "app_name"), + AppleAppLink: String(d, "apple_app_link"), + GoogleAppLink: String(d, "google_app_link"), + } + }) + if customApp != nil { + if err := api.Guardian.MultiFactor.Push.UpdateCustomApp(customApp); err != nil { + return err + } + } + } + + return api.Guardian.MultiFactor.Push.Enable(false) +} diff --git a/auth0/testdata/recordings/TestAccGuardian.yaml b/auth0/testdata/recordings/TestAccGuardian.yaml index 27d79ee07..7a920c1c4 100644 --- a/auth0/testdata/recordings/TestAccGuardian.yaml +++ b/auth0/testdata/recordings/TestAccGuardian.yaml @@ -172,6 +172,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -590,6 +609,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -856,6 +894,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -1312,6 +1369,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -1692,6 +1768,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -2243,6 +2338,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -2452,6 +2566,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -2661,6 +2794,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -2870,6 +3022,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -3079,6 +3250,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -3269,3 +3459,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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms diff --git a/auth0/testdata/recordings/TestAccGuardianDUO.yaml b/auth0/testdata/recordings/TestAccGuardianDUO.yaml index 276c630d3..5523da70d 100644 --- a/auth0/testdata/recordings/TestAccGuardianDUO.yaml +++ b/auth0/testdata/recordings/TestAccGuardianDUO.yaml @@ -115,6 +115,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -362,6 +381,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -552,3 +590,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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms diff --git a/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml b/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml index 0faa2b07f..96aec4455 100644 --- a/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml +++ b/auth0/testdata/recordings/TestAccGuardianPhoneMessageHookWithNoOptions.yaml @@ -96,6 +96,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -324,6 +343,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -742,3 +780,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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms diff --git a/auth0/testdata/recordings/TestAccGuardianPush.yaml b/auth0/testdata/recordings/TestAccGuardianPush.yaml new file mode 100644 index 000000000..ea899b559 --- /dev/null +++ b/auth0/testdata/recordings/TestAccGuardianPush.yaml @@ -0,0 +1,1010 @@ +--- +version: 1 +interactions: +- request: + body: | + ["all-applications"] + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: PUT + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":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/push-notification + 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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":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/push-notification + 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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":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/push-notification + 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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies + method: GET + response: + body: '["all-applications"]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors + method: GET + response: + body: '[{"name":"sms","enabled":false,"trial_expired":false},{"name":"push-notification","enabled":false,"trial_expired":false},{"name":"otp","enabled":false,"trial_expired":false},{"name":"email","enabled":false,"trial_expired":false},{"name":"duo","enabled":false,"trial_expired":false},{"name":"webauthn-roaming","enabled":false,"trial_expired":false},{"name":"webauthn-platform","enabled":false,"trial_expired":false},{"name":"recovery-code","enabled":false,"trial_expired":false}]' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms diff --git a/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml b/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml index af773dd73..abbadba24 100644 --- a/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml +++ b/auth0/testdata/recordings/TestAccGuardianWebAuthnPlatform.yaml @@ -96,6 +96,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -343,6 +362,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -533,3 +571,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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms diff --git a/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml b/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml index ad72538dc..8f5f4d4d1 100644 --- a/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml +++ b/auth0/testdata/recordings/TestAccGuardianWebAuthnRoaming.yaml @@ -96,6 +96,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -457,6 +476,25 @@ interactions: status: 200 OK code: 200 duration: 1ms +- request: + body: | + {"enabled":false} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms - request: body: | null @@ -647,3 +685,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/push-notification + method: PUT + response: + body: '{"enabled":false}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 1ms