From 3c8b8b98131a15ff18cb4caa590537a7b47065b1 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Wed, 14 Dec 2022 18:47:37 +0100 Subject: [PATCH] ESD-25022: Add provider to auth0_guardian.push (#415) --- docs/resources/guardian.md | 4 + go.mod | 2 +- go.sum | 4 +- internal/provider/resource_auth0_guardian.go | 6 + .../provider/resource_auth0_guardian_test.go | 12 +- internal/provider/structure_auth0_guardian.go | 11 +- test/data/recordings/TestAccGuardianPush.yaml | 418 +++++++++++------- 7 files changed, 296 insertions(+), 161 deletions(-) diff --git a/docs/resources/guardian.md b/docs/resources/guardian.md index 15e0c7dfb..533e4efcd 100644 --- a/docs/resources/guardian.md +++ b/docs/resources/guardian.md @@ -118,6 +118,10 @@ Optional: ### Nested Schema for `push` +Required: + +- `provider` (String) Provider to use, one of `guardian`, `sns`. + Optional: - `amazon_sns` (Block List, Max: 1) Configuration for Amazon SNS. (see [below for nested schema](#nestedblock--push--amazon_sns)) diff --git a/go.mod b/go.mod index 57d8d74af..88b2113d2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/auth0/terraform-provider-auth0 go 1.19 require ( - github.com/auth0/go-auth0 v0.13.0 + github.com/auth0/go-auth0 v0.13.1 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/terraform-plugin-docs v0.13.0 diff --git a/go.sum b/go.sum index 706f1b055..c96168422 100644 --- a/go.sum +++ b/go.sum @@ -63,8 +63,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/auth0/go-auth0 v0.13.0 h1:0HHEHwfZnpb3xmZOkZEHeqwJ85k3yTN2wCNJobNvLh4= -github.com/auth0/go-auth0 v0.13.0/go.mod h1:FOHI93YSRdyWcgecep+6YFNZ0v0FsAaMbnSVzTWdMHI= +github.com/auth0/go-auth0 v0.13.1 h1:BAVy+0UFfUgHqt4hG5bLFjQG9eJ58FLFFSRz5+eo9sA= +github.com/auth0/go-auth0 v0.13.1/go.mod h1:FOHI93YSRdyWcgecep+6YFNZ0v0FsAaMbnSVzTWdMHI= github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48= github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= diff --git a/internal/provider/resource_auth0_guardian.go b/internal/provider/resource_auth0_guardian.go index 2a5bc422f..3848cb0ff 100644 --- a/internal/provider/resource_auth0_guardian.go +++ b/internal/provider/resource_auth0_guardian.go @@ -234,6 +234,12 @@ func newGuardian() *schema.Resource { "Push MFA will be enabled, and disabled otherwise.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "provider": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"guardian", "sns"}, false), + Description: "Provider to use, one of `guardian`, `sns`.", + }, "amazon_sns": { Type: schema.TypeList, Optional: true, diff --git a/internal/provider/resource_auth0_guardian_test.go b/internal/provider/resource_auth0_guardian_test.go index 8bef61a42..0b997e17f 100644 --- a/internal/provider/resource_auth0_guardian_test.go +++ b/internal/provider/resource_auth0_guardian_test.go @@ -488,7 +488,9 @@ func TestAccGuardianDUO(t *testing.T) { const testAccConfigurePushCreate = ` resource "auth0_guardian" "foo" { policy = "all-applications" - push {} + push { + provider = "guardian" + } } ` @@ -496,6 +498,8 @@ const testAccConfigurePushUpdateAmazonSNS = ` resource "auth0_guardian" "foo" { policy = "all-applications" push { + provider = "sns" + amazon_sns { aws_access_key_id = "test1" aws_region = "us-west-1" @@ -511,6 +515,8 @@ const testAccConfigurePushUpdateCustomApp = ` resource "auth0_guardian" "foo" { policy = "all-applications" push { + provider = "sns" + amazon_sns { aws_access_key_id = "test1" aws_region = "us-west-1" @@ -518,6 +524,7 @@ resource "auth0_guardian" "foo" { 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" @@ -551,6 +558,7 @@ func TestAccGuardianPush(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.provider", "guardian"), ), }, { @@ -565,6 +573,7 @@ func TestAccGuardianPush(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.provider", "sns"), 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"), @@ -585,6 +594,7 @@ func TestAccGuardianPush(t *testing.T) { resource.TestCheckResourceAttr("auth0_guardian.foo", "webauthn_platform.#", "0"), resource.TestCheckResourceAttr("auth0_guardian.foo", "recovery_code", "false"), resource.TestCheckResourceAttr("auth0_guardian.foo", "push.#", "1"), + resource.TestCheckResourceAttr("auth0_guardian.foo", "push.0.provider", "sns"), 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"), diff --git a/internal/provider/structure_auth0_guardian.go b/internal/provider/structure_auth0_guardian.go index 583c0d287..21bf9797f 100644 --- a/internal/provider/structure_auth0_guardian.go +++ b/internal/provider/structure_auth0_guardian.go @@ -415,7 +415,14 @@ func updatePush(d *schema.ResourceData, api *management.Management) error { var err error d.GetRawConfig().GetAttr("push").ForEachElement(func(_ cty.Value, push cty.Value) (stop bool) { - if d.HasChange("push.0.amazon_sns") { + mfaProvider := &management.MultiFactorProvider{ + Provider: value.String(push.GetAttr("provider")), + } + if err = api.Guardian.MultiFactor.Push.UpdateProvider(mfaProvider); err != nil { + return true + } + + if d.HasChange("push.0.amazon_sns.0") { var amazonSNS *management.MultiFactorProviderAmazonSNS push.GetAttr("amazon_sns").ForEachElement(func(_ cty.Value, config cty.Value) (stop bool) { amazonSNS = &management.MultiFactorProviderAmazonSNS{ @@ -434,7 +441,7 @@ func updatePush(d *schema.ResourceData, api *management.Management) error { } } - if d.HasChange("push.0.custom_app") { + if d.HasChange("push.0.custom_app.0") { var customApp *management.MultiFactorPushCustomApp push.GetAttr("custom_app").ForEachElement(func(_ cty.Value, config cty.Value) (stop bool) { customApp = &management.MultiFactorPushCustomApp{ diff --git a/test/data/recordings/TestAccGuardianPush.yaml b/test/data/recordings/TestAccGuardianPush.yaml index d412d1300..23fd3e464 100644 --- a/test/data/recordings/TestAccGuardianPush.yaml +++ b/test/data/recordings/TestAccGuardianPush.yaml @@ -19,7 +19,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: PUT response: @@ -36,7 +36,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 118.229352ms + duration: 181.639127ms - id: 1 request: proto: HTTP/1.1 @@ -55,7 +55,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -72,7 +72,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 157.148612ms + duration: 115.8083ms - id: 2 request: proto: HTTP/1.1 @@ -91,7 +91,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -108,7 +108,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 122.721769ms + duration: 163.262558ms - id: 3 request: proto: HTTP/1.1 @@ -127,7 +127,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -144,7 +144,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 176.090309ms + duration: 129.451667ms - id: 4 request: proto: HTTP/1.1 @@ -163,7 +163,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -180,7 +180,7 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 127.956616ms + duration: 110.135423ms - id: 5 request: proto: HTTP/1.1 @@ -199,7 +199,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -216,8 +216,44 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 279.220188ms + duration: 181.344202ms - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 24 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"provider":"guardian"} + form: { } + 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/selected-provider + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"provider":"guardian"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 135.075054ms + - id: 7 request: proto: HTTP/1.1 proto_major: 1 @@ -235,7 +271,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -252,8 +288,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 111.603123ms - - id: 7 + duration: 248.665902ms + - id: 8 request: proto: HTTP/1.1 proto_major: 1 @@ -271,7 +307,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -288,8 +324,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 116.823058ms - - id: 8 + duration: 119.720681ms + - id: 9 request: proto: HTTP/1.1 proto_major: 1 @@ -307,7 +343,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -324,8 +360,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 110.720284ms - - id: 9 + duration: 258.809423ms + - id: 10 request: proto: HTTP/1.1 proto_major: 1 @@ -343,7 +379,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -360,8 +396,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 121.573154ms - - id: 10 + duration: 296.076116ms + - id: 11 request: proto: HTTP/1.1 proto_major: 1 @@ -379,7 +415,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -396,8 +432,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 134.196016ms - - id: 11 + duration: 182.919081ms + - id: 12 request: proto: HTTP/1.1 proto_major: 1 @@ -415,7 +451,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -432,8 +468,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 122.390678ms - - id: 12 + duration: 196.623089ms + - id: 13 request: proto: HTTP/1.1 proto_major: 1 @@ -451,7 +487,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -468,8 +504,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 137.874355ms - - id: 13 + duration: 190.190875ms + - id: 14 request: proto: HTTP/1.1 proto_major: 1 @@ -487,7 +523,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -504,8 +540,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 123.068287ms - - id: 14 + duration: 212.883416ms + - id: 15 request: proto: HTTP/1.1 proto_major: 1 @@ -523,7 +559,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -540,8 +576,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 122.433938ms - - id: 15 + duration: 217.345985ms + - id: 16 request: proto: HTTP/1.1 proto_major: 1 @@ -559,7 +595,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -576,8 +612,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 180.963013ms - - id: 16 + duration: 120.832626ms + - id: 17 request: proto: HTTP/1.1 proto_major: 1 @@ -595,7 +631,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -612,8 +648,44 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 122.181046ms - - id: 17 + duration: 409.666195ms + - id: 18 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 19 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"provider":"sns"} + form: { } + 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/selected-provider + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: 18 + uncompressed: false + body: '{"provider":"sns"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 158.595061ms + - id: 19 request: proto: HTTP/1.1 proto_major: 1 @@ -631,7 +703,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification/providers/sns method: PUT response: @@ -648,8 +720,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 199.152284ms - - id: 18 + duration: 110.029139ms + - id: 20 request: proto: HTTP/1.1 proto_major: 1 @@ -667,7 +739,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -684,8 +756,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 226.037573ms - - id: 19 + duration: 99.180755ms + - id: 21 request: proto: HTTP/1.1 proto_major: 1 @@ -703,7 +775,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -720,8 +792,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 147.679072ms - - id: 20 + duration: 121.665148ms + - id: 22 request: proto: HTTP/1.1 proto_major: 1 @@ -739,7 +811,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -756,8 +828,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 252.240686ms - - id: 21 + duration: 165.507359ms + - id: 23 request: proto: HTTP/1.1 proto_major: 1 @@ -775,7 +847,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -792,8 +864,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 122.530118ms - - id: 22 + duration: 201.034027ms + - id: 24 request: proto: HTTP/1.1 proto_major: 1 @@ -811,7 +883,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -828,8 +900,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 118.589044ms - - id: 23 + duration: 82.49211ms + - id: 25 request: proto: HTTP/1.1 proto_major: 1 @@ -847,7 +919,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -864,8 +936,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 123.837435ms - - id: 24 + duration: 123.912153ms + - id: 26 request: proto: HTTP/1.1 proto_major: 1 @@ -883,7 +955,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -900,8 +972,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 163.544158ms - - id: 25 + duration: 192.692642ms + - id: 27 request: proto: HTTP/1.1 proto_major: 1 @@ -919,7 +991,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -936,8 +1008,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 154.039536ms - - id: 26 + duration: 185.296077ms + - id: 28 request: proto: HTTP/1.1 proto_major: 1 @@ -955,7 +1027,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -972,8 +1044,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 235.518572ms - - id: 27 + duration: 184.203105ms + - id: 29 request: proto: HTTP/1.1 proto_major: 1 @@ -991,7 +1063,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -1008,8 +1080,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 306.594763ms - - id: 28 + duration: 156.316468ms + - id: 30 request: proto: HTTP/1.1 proto_major: 1 @@ -1027,7 +1099,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -1044,8 +1116,44 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 124.057583ms - - id: 29 + duration: 122.962764ms + - id: 31 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 19 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"provider":"sns"} + form: { } + 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/selected-provider + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: 18 + uncompressed: false + body: '{"provider":"sns"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 111.587427ms + - id: 32 request: proto: HTTP/1.1 proto_major: 1 @@ -1063,7 +1171,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/prompts/mfa-push method: PATCH response: @@ -1080,8 +1188,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 92.000505ms - - id: 30 + duration: 146.278635ms + - id: 33 request: proto: HTTP/1.1 proto_major: 1 @@ -1099,7 +1207,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1116,8 +1224,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 100.17945ms - - id: 31 + duration: 92.027095ms + - id: 34 request: proto: HTTP/1.1 proto_major: 1 @@ -1135,7 +1243,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1152,8 +1260,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 133.267812ms - - id: 32 + duration: 128.783276ms + - id: 35 request: proto: HTTP/1.1 proto_major: 1 @@ -1171,7 +1279,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1188,8 +1296,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 126.382343ms - - id: 33 + duration: 94.239517ms + - id: 36 request: proto: HTTP/1.1 proto_major: 1 @@ -1207,7 +1315,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1224,8 +1332,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 116.039039ms - - id: 34 + duration: 276.196519ms + - id: 37 request: proto: HTTP/1.1 proto_major: 1 @@ -1243,7 +1351,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1260,8 +1368,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 108.552388ms - - id: 35 + duration: 178.229335ms + - id: 38 request: proto: HTTP/1.1 proto_major: 1 @@ -1279,7 +1387,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1296,8 +1404,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 131.219035ms - - id: 36 + duration: 178.52583ms + - id: 39 request: proto: HTTP/1.1 proto_major: 1 @@ -1315,7 +1423,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -1332,8 +1440,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 154.907719ms - - id: 37 + duration: 179.028756ms + - id: 40 request: proto: HTTP/1.1 proto_major: 1 @@ -1351,7 +1459,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -1368,8 +1476,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 156.845682ms - - id: 38 + duration: 198.431155ms + - id: 41 request: proto: HTTP/1.1 proto_major: 1 @@ -1387,7 +1495,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -1404,8 +1512,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 133.455297ms - - id: 39 + duration: 115.83187ms + - id: 42 request: proto: HTTP/1.1 proto_major: 1 @@ -1423,7 +1531,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -1440,8 +1548,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 133.779535ms - - id: 40 + duration: 129.892463ms + - id: 43 request: proto: HTTP/1.1 proto_major: 1 @@ -1459,7 +1567,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -1476,8 +1584,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 139.614206ms - - id: 41 + duration: 118.616514ms + - id: 44 request: proto: HTTP/1.1 proto_major: 1 @@ -1495,7 +1603,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1512,8 +1620,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 112.54637ms - - id: 42 + duration: 102.710669ms + - id: 45 request: proto: HTTP/1.1 proto_major: 1 @@ -1531,7 +1639,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1548,8 +1656,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 144.000214ms - - id: 43 + duration: 132.882749ms + - id: 46 request: proto: HTTP/1.1 proto_major: 1 @@ -1567,7 +1675,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: GET response: @@ -1584,8 +1692,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 105.004428ms - - id: 44 + duration: 118.796338ms + - id: 47 request: proto: HTTP/1.1 proto_major: 1 @@ -1603,7 +1711,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors method: GET response: @@ -1620,8 +1728,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 239.622632ms - - id: 45 + duration: 110.020895ms + - id: 48 request: proto: HTTP/1.1 proto_major: 1 @@ -1639,7 +1747,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/policies method: PUT response: @@ -1656,8 +1764,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 115.183576ms - - id: 46 + duration: 80.68203ms + - id: 49 request: proto: HTTP/1.1 proto_major: 1 @@ -1675,7 +1783,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/sms method: PUT response: @@ -1692,8 +1800,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 143.836806ms - - id: 47 + duration: 198.042792ms + - id: 50 request: proto: HTTP/1.1 proto_major: 1 @@ -1711,7 +1819,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/email method: PUT response: @@ -1728,8 +1836,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 142.236337ms - - id: 48 + duration: 100.842227ms + - id: 51 request: proto: HTTP/1.1 proto_major: 1 @@ -1747,7 +1855,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/otp method: PUT response: @@ -1764,8 +1872,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 122.011896ms - - id: 49 + duration: 188.136026ms + - id: 52 request: proto: HTTP/1.1 proto_major: 1 @@ -1783,7 +1891,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/recovery-code method: PUT response: @@ -1800,8 +1908,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 141.68031ms - - id: 50 + duration: 94.701262ms + - id: 53 request: proto: HTTP/1.1 proto_major: 1 @@ -1819,7 +1927,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-roaming method: PUT response: @@ -1836,8 +1944,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 119.276136ms - - id: 51 + duration: 102.516038ms + - id: 54 request: proto: HTTP/1.1 proto_major: 1 @@ -1855,7 +1963,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/webauthn-platform method: PUT response: @@ -1872,8 +1980,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 129.640145ms - - id: 52 + duration: 102.752388ms + - id: 55 request: proto: HTTP/1.1 proto_major: 1 @@ -1891,7 +1999,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/duo method: PUT response: @@ -1908,8 +2016,8 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 133.572022ms - - id: 53 + duration: 98.733211ms + - id: 56 request: proto: HTTP/1.1 proto_major: 1 @@ -1927,7 +2035,7 @@ interactions: Content-Type: - application/json User-Agent: - - Go-Auth0-SDK/0.12.0 + - Go-Auth0-SDK/latest url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/guardian/factors/push-notification method: PUT response: @@ -1944,4 +2052,4 @@ interactions: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 283.951507ms + duration: 107.47114ms