From 4ecc7d48aaa52e7067f05d50d633c602219f89e3 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Mon, 8 May 2023 16:01:33 +0200 Subject: [PATCH 1/3] Add new auth0_connection_clients resource --- docs/resources/connection_client.md | 10 +- docs/resources/connection_clients.md | 63 + .../auth0_connection_client/resource.tf | 4 +- .../auth0_connection_clients/import.sh | 4 + .../auth0_connection_clients/resource.tf | 22 + internal/auth0/connection/resource_client.go | 4 +- internal/auth0/connection/resource_clients.go | 169 ++ .../auth0/connection/resource_clients_test.go | 145 ++ internal/provider/provider.go | 1 + templates/resources/connection_client.md.tmpl | 31 + .../resources/connection_clients.md.tmpl | 31 + .../recordings/TestAccConnectionClients.yaml | 1404 +++++++++++++++++ ...sPreventErasingEnabledClientsOnCreate.yaml | 433 +++++ 13 files changed, 2313 insertions(+), 8 deletions(-) create mode 100644 docs/resources/connection_clients.md create mode 100644 examples/resources/auth0_connection_clients/import.sh create mode 100644 examples/resources/auth0_connection_clients/resource.tf create mode 100644 internal/auth0/connection/resource_clients.go create mode 100644 internal/auth0/connection/resource_clients_test.go create mode 100644 templates/resources/connection_client.md.tmpl create mode 100644 templates/resources/connection_clients.md.tmpl create mode 100644 test/data/recordings/TestAccConnectionClients.yaml create mode 100644 test/data/recordings/TestAccConnectionClientsPreventErasingEnabledClientsOnCreate.yaml diff --git a/docs/resources/connection_client.md b/docs/resources/connection_client.md index ee1b941ec..fd5abd551 100644 --- a/docs/resources/connection_client.md +++ b/docs/resources/connection_client.md @@ -1,12 +1,14 @@ --- page_title: "Resource: auth0_connection_client" description: |- - With this resource, you can manage enabled clients on a connection. + With this resource, you can enable a single client on a connection. --- # Resource: auth0_connection_client -With this resource, you can manage enabled clients on a connection. +With this resource, you can enable a single client on a connection. + +!> To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. ## Example Usage @@ -14,14 +16,14 @@ With this resource, you can manage enabled clients on a connection. resource "auth0_connection" "my_conn" { name = "My-Auth0-Connection" strategy = "auth0" - # Avoid using the enabled_clients = [...], - # if using the auth0_connection_client resource. } resource "auth0_client" "my_client" { name = "My-Auth0-Client" } +# One connection to one client association. +# To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. resource "auth0_connection_client" "my_conn_client_assoc" { connection_id = auth0_connection.my_conn.id client_id = auth0_client.my_client.id diff --git a/docs/resources/connection_clients.md b/docs/resources/connection_clients.md new file mode 100644 index 000000000..4fee73746 --- /dev/null +++ b/docs/resources/connection_clients.md @@ -0,0 +1,63 @@ +--- +page_title: "Resource: auth0_connection_clients" +description: |- + With this resource, you can manage all of the enabled clients on a connection. +--- + +# Resource: auth0_connection_clients + +With this resource, you can manage all of the enabled clients on a connection. + +!> To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. + +## Example Usage + +```terraform +resource "auth0_connection" "my_conn" { + name = "My-Auth0-Connection" + strategy = "auth0" +} + +resource "auth0_client" "my_first_client" { + name = "My-First-Auth0-Client" +} + +resource "auth0_client" "my_second_client" { + name = "My-Second-Auth0-Client" +} + +# One connection to many clients association. +# To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. +resource "auth0_connection_clients" "my_conn_clients_assoc" { + connection_id = auth0_connection.my_conn.id + enabled_clients = [ + auth0_client.my_first_client.id, + auth0_client.my_second_client.id + ] +} +``` + + +## Schema + +### Required + +- `connection_id` (String) ID of the connection on which to enable the client. +- `enabled_clients` (Set of String) IDs of the clients for which the connection is enabled. + +### Read-Only + +- `id` (String) The ID of this resource. +- `name` (String) The name of the connection on which to enable the client. +- `strategy` (String) The strategy of the connection on which to enable the client. + +## Import + +Import is supported using the following syntax: + +```shell +# This resource can be imported by specifying the Connection ID. +# +# Example: +terraform import auth0_connection_clients.my_conn_clients_assoc con_XXXXX: +``` diff --git a/examples/resources/auth0_connection_client/resource.tf b/examples/resources/auth0_connection_client/resource.tf index f5978bec6..7b9b6a8d4 100644 --- a/examples/resources/auth0_connection_client/resource.tf +++ b/examples/resources/auth0_connection_client/resource.tf @@ -1,14 +1,14 @@ resource "auth0_connection" "my_conn" { name = "My-Auth0-Connection" strategy = "auth0" - # Avoid using the enabled_clients = [...], - # if using the auth0_connection_client resource. } resource "auth0_client" "my_client" { name = "My-Auth0-Client" } +# One connection to one client association. +# To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. resource "auth0_connection_client" "my_conn_client_assoc" { connection_id = auth0_connection.my_conn.id client_id = auth0_client.my_client.id diff --git a/examples/resources/auth0_connection_clients/import.sh b/examples/resources/auth0_connection_clients/import.sh new file mode 100644 index 000000000..36eb8efeb --- /dev/null +++ b/examples/resources/auth0_connection_clients/import.sh @@ -0,0 +1,4 @@ +# This resource can be imported by specifying the Connection ID. +# +# Example: +terraform import auth0_connection_clients.my_conn_clients_assoc con_XXXXX: diff --git a/examples/resources/auth0_connection_clients/resource.tf b/examples/resources/auth0_connection_clients/resource.tf new file mode 100644 index 000000000..f5fed18e5 --- /dev/null +++ b/examples/resources/auth0_connection_clients/resource.tf @@ -0,0 +1,22 @@ +resource "auth0_connection" "my_conn" { + name = "My-Auth0-Connection" + strategy = "auth0" +} + +resource "auth0_client" "my_first_client" { + name = "My-First-Auth0-Client" +} + +resource "auth0_client" "my_second_client" { + name = "My-Second-Auth0-Client" +} + +# One connection to many clients association. +# To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. +resource "auth0_connection_clients" "my_conn_clients_assoc" { + connection_id = auth0_connection.my_conn.id + enabled_clients = [ + auth0_client.my_first_client.id, + auth0_client.my_second_client.id + ] +} diff --git a/internal/auth0/connection/resource_client.go b/internal/auth0/connection/resource_client.go index eab8943b9..2a625d5b3 100644 --- a/internal/auth0/connection/resource_client.go +++ b/internal/auth0/connection/resource_client.go @@ -19,7 +19,7 @@ var ( errInvalidConnectionClientIDFormat = fmt.Errorf("ID must be formated as :") ) -// NewClientResource will return a new auth0_connection_client resource. +// NewClientResource will return a new auth0_connection_client (1:1) resource. func NewClientResource() *schema.Resource { return &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -52,7 +52,7 @@ func NewClientResource() *schema.Resource { Importer: &schema.ResourceImporter{ StateContext: importConnectionClient, }, - Description: "With this resource, you can manage enabled clients on a connection.", + Description: "With this resource, you can enable a single client on a connection.", } } diff --git a/internal/auth0/connection/resource_clients.go b/internal/auth0/connection/resource_clients.go new file mode 100644 index 000000000..d33e0ac67 --- /dev/null +++ b/internal/auth0/connection/resource_clients.go @@ -0,0 +1,169 @@ +package connection + +import ( + "context" + "net/http" + + "github.com/auth0/go-auth0/management" + "github.com/hashicorp/go-multierror" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + + "github.com/auth0/terraform-provider-auth0/internal/mutex" + "github.com/auth0/terraform-provider-auth0/internal/value" +) + +// NewClientsResource will return a new auth0_connection_clients (1:many) resource. +func NewClientsResource() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "ID of the connection on which to enable the client.", + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: "The name of the connection on which to enable the client.", + }, + "strategy": { + Type: schema.TypeString, + Computed: true, + Description: "The strategy of the connection on which to enable the client.", + }, + "enabled_clients": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Required: true, + Description: "IDs of the clients for which the connection is enabled.", + }, + }, + CreateContext: createConnectionClients, + ReadContext: readConnectionClients, + UpdateContext: updateConnectionClients, + DeleteContext: deleteConnectionClients, + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + Description: "With this resource, you can manage all of the enabled clients on a connection.", + } +} + +func createConnectionClients(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*management.Management) + + connectionID := data.Get("connection_id").(string) + + mutex.Global.Lock(connectionID) + defer mutex.Global.Unlock(connectionID) + + connection, err := api.Connection.Read( + connectionID, + management.IncludeFields("enabled_clients", "strategy", "name"), + ) + if err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + + return diag.FromErr(err) + } + + data.SetId(connection.GetID()) + + if len(connection.GetEnabledClients()) != 0 { + data.SetId("") + + return diag.Diagnostics{ + diag.Diagnostic{ + Severity: diag.Error, + Summary: "Connection with non empty enabled clients", + Detail: "The connection already has enabled clients attached to it. " + + "Import the resource instead to get an accurate diff that can be reviewed.", + }, + } + } + + if err := api.Connection.Update( + connectionID, + &management.Connection{EnabledClients: value.Strings(data.GetRawConfig().GetAttr("enabled_clients"))}, + ); err != nil { + return diag.FromErr(err) + } + + return readConnectionClients(ctx, data, meta) +} + +func readConnectionClients(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*management.Management) + + connection, err := api.Connection.Read( + data.Id(), + management.IncludeFields("enabled_clients", "strategy", "name"), + ) + if err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + + return diag.FromErr(err) + } + + result := multierror.Append( + data.Set("name", connection.GetName()), + data.Set("strategy", connection.GetStrategy()), + data.Set("enabled_clients", connection.GetEnabledClients()), + ) + + return diag.FromErr(result.ErrorOrNil()) +} + +func updateConnectionClients(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*management.Management) + + mutex.Global.Lock(data.Id()) + defer mutex.Global.Unlock(data.Id()) + + if err := api.Connection.Update( + data.Id(), + &management.Connection{EnabledClients: value.Strings(data.GetRawConfig().GetAttr("enabled_clients"))}, + ); err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + + return diag.FromErr(err) + } + + return readConnectionClients(ctx, data, meta) +} + +func deleteConnectionClients(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*management.Management) + + mutex.Global.Lock(data.Id()) + defer mutex.Global.Unlock(data.Id()) + + enabledClients := make([]string, 0) + + if err := api.Connection.Update( + data.Id(), + &management.Connection{EnabledClients: &enabledClients}, + ); err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + + return diag.FromErr(err) + } + + data.SetId("") + + return nil +} diff --git a/internal/auth0/connection/resource_clients_test.go b/internal/auth0/connection/resource_clients_test.go new file mode 100644 index 000000000..5a4835f9c --- /dev/null +++ b/internal/auth0/connection/resource_clients_test.go @@ -0,0 +1,145 @@ +package connection_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + "github.com/auth0/terraform-provider-auth0/internal/acctest" +) + +func TestAccConnectionClientsPreventErasingEnabledClientsOnCreate(t *testing.T) { + acctest.Test(t, resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: ` +resource "auth0_connection" "my_conn" { + name = "Acceptance-Test-Connection-PreventErasing" + strategy = "auth0" +} + +resource "auth0_client" "my_client" { + depends_on = [ auth0_connection.my_conn ] + name = "Acceptance-Test-Client-1-PreventErasing" +} + +# Pre-existing enabled client +resource "auth0_connection_client" "one_to_one" { + depends_on = [ auth0_client.my_client ] + connection_id = auth0_connection.my_conn.id + client_id = auth0_client.my_client.id +} + +resource "auth0_connection_clients" "one_to_many" { + depends_on = [ auth0_connection_client.one_to_one ] + connection_id = auth0_connection.my_conn.id + enabled_clients = [] +} +`, + ExpectError: regexp.MustCompile("Connection with non empty enabled clients"), + }, + }, + }) +} + +const givenASingleConnection = ` +resource "auth0_connection" "my_conn" { + name = "Acceptance-Test-Connection-{{.testName}}" + strategy = "auth0" +} +` + +const testAccConnectionClientsWithMinimalConfig = givenASingleConnection + ` +resource "auth0_connection_clients" "my_conn_client_assoc" { + depends_on = [ auth0_connection.my_conn ] + + connection_id = auth0_connection.my_conn.id + enabled_clients = [] +} +` + +const testAccConnectionClientsWithOneEnabledClient = givenASingleConnection + ` +resource "auth0_client" "my_client-1" { + depends_on = [ auth0_connection.my_conn ] + + name = "Acceptance-Test-Client-1-{{.testName}}" +} + +resource "auth0_connection_clients" "my_conn_client_assoc" { + depends_on = [ auth0_client.my_client-1 ] + + connection_id = auth0_connection.my_conn.id + enabled_clients = [auth0_client.my_client-1.id] +} +` + +const testAccConnectionClientsWithTwoEnabledClients = givenASingleConnection + ` +resource "auth0_client" "my_client-1" { + depends_on = [ auth0_connection.my_conn ] + + name = "Acceptance-Test-Client-1-{{.testName}}" +} + +resource "auth0_client" "my_client-2" { + depends_on = [ auth0_client.my_client-1 ] + + name = "Acceptance-Test-Client-1-{{.testName}}" +} + +resource "auth0_connection_clients" "my_conn_client_assoc" { + depends_on = [ auth0_client.my_client-2 ] + + connection_id = auth0_connection.my_conn.id + enabled_clients = [auth0_client.my_client-1.id, auth0_client.my_client-2.id] +} +` + +const testAccConnectionClientsWithNoEnabledClients = givenASingleConnection + ` +resource "auth0_connection_clients" "my_conn_client_assoc" { + depends_on = [ auth0_connection.my_conn ] + + connection_id = auth0_connection.my_conn.id + enabled_clients = [] +} +` + +func TestAccConnectionClients(t *testing.T) { + acctest.Test(t, resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: acctest.ParseTestName(testAccConnectionClientsWithMinimalConfig, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "strategy", "auth0"), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "name", fmt.Sprintf("Acceptance-Test-Connection-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "enabled_clients.#", "0"), + ), + }, + { + Config: acctest.ParseTestName(testAccConnectionClientsWithOneEnabledClient, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "strategy", "auth0"), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "name", fmt.Sprintf("Acceptance-Test-Connection-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "enabled_clients.#", "1"), + ), + }, + { + Config: acctest.ParseTestName(testAccConnectionClientsWithTwoEnabledClients, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "strategy", "auth0"), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "name", fmt.Sprintf("Acceptance-Test-Connection-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "enabled_clients.#", "2"), + ), + }, + { + Config: acctest.ParseTestName(testAccConnectionClientsWithNoEnabledClients, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "strategy", "auth0"), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "name", fmt.Sprintf("Acceptance-Test-Connection-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "enabled_clients.#", "0"), + ), + }, + }, + }) +} diff --git a/internal/provider/provider.go b/internal/provider/provider.go index ca7b00285..a5a7bae3b 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -103,6 +103,7 @@ func New() *schema.Provider { "auth0_global_client": client.NewGlobalResource(), "auth0_connection": connection.NewResource(), "auth0_connection_client": connection.NewClientResource(), + "auth0_connection_clients": connection.NewClientsResource(), "auth0_custom_domain": customdomain.NewResource(), "auth0_custom_domain_verification": customdomain.NewVerificationResource(), "auth0_email": email.NewResource(), diff --git a/templates/resources/connection_client.md.tmpl b/templates/resources/connection_client.md.tmpl new file mode 100644 index 000000000..a195b68b6 --- /dev/null +++ b/templates/resources/connection_client.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "{{.Type}}: {{.Name}}" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Type}}: {{.Name}} + +{{ .Description | trimspace }} + +!> To prevent issues, avoid using this resource together with the `auth0_connection_clients` resource. + +{{ if .HasExample -}} + +## Example Usage + +{{ tffile .ExampleFile }} + +{{- end }} + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" .ImportFile }} + +{{- end }} diff --git a/templates/resources/connection_clients.md.tmpl b/templates/resources/connection_clients.md.tmpl new file mode 100644 index 000000000..09dec6931 --- /dev/null +++ b/templates/resources/connection_clients.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "{{.Type}}: {{.Name}}" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Type}}: {{.Name}} + +{{ .Description | trimspace }} + +!> To prevent issues, avoid using this resource together with the `auth0_connection_client` resource. + +{{ if .HasExample -}} + +## Example Usage + +{{ tffile .ExampleFile }} + +{{- end }} + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" .ImportFile }} + +{{- end }} diff --git a/test/data/recordings/TestAccConnectionClients.yaml b/test/data/recordings/TestAccConnectionClients.yaml new file mode 100644 index 000000000..9d81c003e --- /dev/null +++ b/test/data/recordings/TestAccConnectionClients.yaml @@ -0,0 +1,1404 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 82 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-Connection-TestAccConnectionClients","strategy":"auth0"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 363 + uncompressed: false + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 145.938125ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 111.867416ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 106.766333ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 23 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"enabled_clients":[]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 184.636042ms + - id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 117.258834ms + - id: 5 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 98.097542ms + - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 140.864375ms + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 116.888417ms + - id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 178.908459ms + - id: 9 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 61 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-Client-1-TestAccConnectionClients"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: false + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 569.075083ms + - id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 96.79025ms + - id: 11 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 57 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 117.811709ms + - id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 93.66825ms + - id: 13 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 96.332583ms + - id: 14 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 155.925625ms + - id: 15 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 111.399458ms + - id: 16 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 86.631542ms + - id: 17 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 110.915875ms + - id: 18 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 118.997125ms + - id: 19 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 61 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-Client-1-TestAccConnectionClients"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: false + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 384.2885ms + - id: 20 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 116.91475ms + - id: 21 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 92 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4"]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 110.393917ms + - id: 22 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 103.387334ms + - id: 23 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 98.013875ms + - id: 24 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 93.654958ms + - id: 25 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 108.808084ms + - id: 26 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 123.922791ms + - id: 27 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 108.801167ms + - id: 28 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 129.396833ms + - id: 29 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 198.8035ms + - id: 30 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 113.352708ms + - id: 31 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Content-Type: + - application/json; charset=utf-8 + status: 204 No Content + code: 204 + duration: 191.280625ms + - id: 32 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Content-Type: + - application/json; charset=utf-8 + status: 204 No Content + code: 204 + duration: 276.732125ms + - id: 33 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 23 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"enabled_clients":[]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 128.926917ms + - id: 34 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 100.754959ms + - id: 35 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 107.066334ms + - id: 36 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 127.383958ms + - id: 37 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 23 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"enabled_clients":[]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 112.286417ms + - id: 38 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Content-Type: + - application/json; charset=utf-8 + status: 204 No Content + code: 204 + duration: 180.772375ms diff --git a/test/data/recordings/TestAccConnectionClientsPreventErasingEnabledClientsOnCreate.yaml b/test/data/recordings/TestAccConnectionClientsPreventErasingEnabledClientsOnCreate.yaml new file mode 100644 index 000000000..3e1b86f7b --- /dev/null +++ b/test/data/recordings/TestAccConnectionClientsPreventErasingEnabledClientsOnCreate.yaml @@ -0,0 +1,433 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 72 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-Connection-PreventErasing","strategy":"auth0"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 343 + uncompressed: false + body: '{"id":"con_VY2LhgO5EtjcTm9V","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-PreventErasing"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 190.317ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_VY2LhgO5EtjcTm9V","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-PreventErasing"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 138.727875ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 51 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-Client-1-PreventErasing"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: false + body: '{"name":"Acceptance-Test-Client-1-PreventErasing","client_id":"TqWoBEncmLak9u4tlZZmsr71XFNTWnAX","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 681.056167ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/TqWoBEncmLak9u4tlZZmsr71XFNTWnAX + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance-Test-Client-1-PreventErasing","client_id":"TqWoBEncmLak9u4tlZZmsr71XFNTWnAX","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 180.318ms + - id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_VY2LhgO5EtjcTm9V","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-PreventErasing"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 137.005125ms + - id: 5 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 57 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"enabled_clients":["TqWoBEncmLak9u4tlZZmsr71XFNTWnAX"]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_VY2LhgO5EtjcTm9V","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":["TqWoBEncmLak9u4tlZZmsr71XFNTWnAX"],"realms":["Acceptance-Test-Connection-PreventErasing"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 146.729ms + - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_VY2LhgO5EtjcTm9V","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":["TqWoBEncmLak9u4tlZZmsr71XFNTWnAX"],"realms":["Acceptance-Test-Connection-PreventErasing"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 153.497042ms + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_VY2LhgO5EtjcTm9V","strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":["TqWoBEncmLak9u4tlZZmsr71XFNTWnAX"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 140.307625ms + - id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_VY2LhgO5EtjcTm9V","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":["TqWoBEncmLak9u4tlZZmsr71XFNTWnAX"],"realms":["Acceptance-Test-Connection-PreventErasing"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 123.093083ms + - id: 9 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 25 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"enabled_clients":null} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"con_VY2LhgO5EtjcTm9V","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-PreventErasing","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-PreventErasing"]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 177.433375ms + - id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/TqWoBEncmLak9u4tlZZmsr71XFNTWnAX + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Content-Type: + - application/json; charset=utf-8 + status: 204 No Content + code: 204 + duration: 147.694416ms + - id: 11 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.0 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_VY2LhgO5EtjcTm9V + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 41 + uncompressed: false + body: '{"deleted_at":"2023-05-08T14:19:03.398Z"}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 202 Accepted + code: 202 + duration: 211.139834ms From 1697650ffe8613a4718fbf18dc0043dd3d807505 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Tue, 9 May 2023 11:26:25 +0200 Subject: [PATCH 2/3] Improve how we guard against erasing unwanted enabled clients --- internal/auth0/connection/resource_clients.go | 50 ++- .../auth0/connection/resource_clients_test.go | 20 +- .../recordings/TestAccConnectionClients.yaml | 326 +++++++----------- 3 files changed, 172 insertions(+), 224 deletions(-) diff --git a/internal/auth0/connection/resource_clients.go b/internal/auth0/connection/resource_clients.go index d33e0ac67..573754100 100644 --- a/internal/auth0/connection/resource_clients.go +++ b/internal/auth0/connection/resource_clients.go @@ -2,9 +2,11 @@ package connection import ( "context" + "fmt" "net/http" "github.com/auth0/go-auth0/management" + "github.com/google/go-cmp/cmp" "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -72,24 +74,23 @@ func createConnectionClients(ctx context.Context, data *schema.ResourceData, met return diag.FromErr(err) } - data.SetId(connection.GetID()) + // This is never nil because the enabled clients is a required parameter. + enabledClients := value.Strings(data.GetRawConfig().GetAttr("enabled_clients")) - if len(connection.GetEnabledClients()) != 0 { + if diagnostics := guardAgainstErasingUnwantedEnabledClients( + connection.GetID(), + *enabledClients, + connection.GetEnabledClients(), + ); diagnostics.HasError() { data.SetId("") - - return diag.Diagnostics{ - diag.Diagnostic{ - Severity: diag.Error, - Summary: "Connection with non empty enabled clients", - Detail: "The connection already has enabled clients attached to it. " + - "Import the resource instead to get an accurate diff that can be reviewed.", - }, - } + return diagnostics } + data.SetId(connection.GetID()) + if err := api.Connection.Update( connectionID, - &management.Connection{EnabledClients: value.Strings(data.GetRawConfig().GetAttr("enabled_clients"))}, + &management.Connection{EnabledClients: enabledClients}, ); err != nil { return diag.FromErr(err) } @@ -167,3 +168,28 @@ func deleteConnectionClients(ctx context.Context, data *schema.ResourceData, met return nil } + +func guardAgainstErasingUnwantedEnabledClients( + connectionID string, + configEnabledClients []string, + connectionEnabledClients []string, +) diag.Diagnostics { + if len(connectionEnabledClients) == 0 { + return nil + } + + if cmp.Equal(configEnabledClients, connectionEnabledClients) { + return nil + } + + return diag.Diagnostics{ + diag.Diagnostic{ + Severity: diag.Error, + Summary: "Connection with non empty enabled clients", + Detail: cmp.Diff(configEnabledClients, connectionEnabledClients) + + fmt.Sprintf("\nThe connection already has enabled clients attached to it. "+ + "Import the resource instead in order to proceed with the changes. "+ + "Run: 'terraform import auth0_connection_clients. %s'.", connectionID), + }, + } +} diff --git a/internal/auth0/connection/resource_clients_test.go b/internal/auth0/connection/resource_clients_test.go index 5a4835f9c..38bb428f3 100644 --- a/internal/auth0/connection/resource_clients_test.go +++ b/internal/auth0/connection/resource_clients_test.go @@ -96,15 +96,6 @@ resource "auth0_connection_clients" "my_conn_client_assoc" { } ` -const testAccConnectionClientsWithNoEnabledClients = givenASingleConnection + ` -resource "auth0_connection_clients" "my_conn_client_assoc" { - depends_on = [ auth0_connection.my_conn ] - - connection_id = auth0_connection.my_conn.id - enabled_clients = [] -} -` - func TestAccConnectionClients(t *testing.T) { acctest.Test(t, resource.TestCase{ Steps: []resource.TestStep{ @@ -133,11 +124,14 @@ func TestAccConnectionClients(t *testing.T) { ), }, { - Config: acctest.ParseTestName(testAccConnectionClientsWithNoEnabledClients, t.Name()), + Config: acctest.ParseTestName(givenASingleConnection, t.Name()), + }, + { + RefreshState: true, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "strategy", "auth0"), - resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "name", fmt.Sprintf("Acceptance-Test-Connection-%s", t.Name())), - resource.TestCheckResourceAttr("auth0_connection_clients.my_conn_client_assoc", "enabled_clients.#", "0"), + resource.TestCheckResourceAttr("auth0_connection.my_conn", "strategy", "auth0"), + resource.TestCheckResourceAttr("auth0_connection.my_conn", "name", fmt.Sprintf("Acceptance-Test-Connection-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_connection.my_conn", "enabled_clients.#", "0"), ), }, }, diff --git a/test/data/recordings/TestAccConnectionClients.yaml b/test/data/recordings/TestAccConnectionClients.yaml index 9d81c003e..72f4b487f 100644 --- a/test/data/recordings/TestAccConnectionClients.yaml +++ b/test/data/recordings/TestAccConnectionClients.yaml @@ -30,13 +30,13 @@ interactions: trailer: {} content_length: 363 uncompressed: false - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 145.938125ms + duration: 147.294042ms - id: 1 request: proto: HTTP/1.1 @@ -56,7 +56,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -66,13 +66,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 111.867416ms + duration: 97.35075ms - id: 2 request: proto: HTTP/1.1 @@ -92,7 +92,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -102,13 +102,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 106.766333ms + duration: 108.561583ms - id: 3 request: proto: HTTP/1.1 @@ -128,7 +128,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: PATCH response: proto: HTTP/2.0 @@ -138,13 +138,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 184.636042ms + duration: 220.957083ms - id: 4 request: proto: HTTP/1.1 @@ -164,7 +164,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -174,13 +174,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 117.258834ms + duration: 189.829ms - id: 5 request: proto: HTTP/1.1 @@ -200,7 +200,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -210,13 +210,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 98.097542ms + duration: 98.038917ms - id: 6 request: proto: HTTP/1.1 @@ -236,7 +236,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -246,13 +246,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 140.864375ms + duration: 103.320834ms - id: 7 request: proto: HTTP/1.1 @@ -272,7 +272,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -282,13 +282,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 116.888417ms + duration: 108.263583ms - id: 8 request: proto: HTTP/1.1 @@ -308,7 +308,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -318,13 +318,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 178.908459ms + duration: 121.784792ms - id: 9 request: proto: HTTP/1.1 @@ -354,13 +354,13 @@ interactions: trailer: {} content_length: -1 uncompressed: false - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 569.075083ms + duration: 718.669667ms - id: 10 request: proto: HTTP/1.1 @@ -380,7 +380,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY method: GET response: proto: HTTP/2.0 @@ -390,13 +390,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 96.79025ms + duration: 121.325166ms - id: 11 request: proto: HTTP/1.1 @@ -409,14 +409,14 @@ interactions: remote_addr: "" request_uri: "" body: | - {"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]} + {"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"]} form: {} headers: Content-Type: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: PATCH response: proto: HTTP/2.0 @@ -426,13 +426,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 117.811709ms + duration: 141.28875ms - id: 12 request: proto: HTTP/1.1 @@ -452,7 +452,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -462,13 +462,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 93.66825ms + duration: 100.3335ms - id: 13 request: proto: HTTP/1.1 @@ -488,7 +488,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -498,13 +498,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 96.332583ms + duration: 226.554959ms - id: 14 request: proto: HTTP/1.1 @@ -524,7 +524,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY method: GET response: proto: HTTP/2.0 @@ -534,13 +534,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 155.925625ms + duration: 264.085083ms - id: 15 request: proto: HTTP/1.1 @@ -560,7 +560,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -570,13 +570,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 111.399458ms + duration: 99.632084ms - id: 16 request: proto: HTTP/1.1 @@ -596,7 +596,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -606,13 +606,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 86.631542ms + duration: 96.471666ms - id: 17 request: proto: HTTP/1.1 @@ -632,7 +632,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY method: GET response: proto: HTTP/2.0 @@ -642,13 +642,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 110.915875ms + duration: 139.444875ms - id: 18 request: proto: HTTP/1.1 @@ -668,7 +668,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -678,13 +678,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 118.997125ms + duration: 119.481125ms - id: 19 request: proto: HTTP/1.1 @@ -714,13 +714,13 @@ interactions: trailer: {} content_length: -1 uncompressed: false - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 384.2885ms + duration: 408.205708ms - id: 20 request: proto: HTTP/1.1 @@ -740,7 +740,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi method: GET response: proto: HTTP/2.0 @@ -750,13 +750,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 116.91475ms + duration: 125.578083ms - id: 21 request: proto: HTTP/1.1 @@ -769,14 +769,14 @@ interactions: remote_addr: "" request_uri: "" body: | - {"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4"]} + {"enabled_clients":["NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi","ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"]} form: {} headers: Content-Type: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: PATCH response: proto: HTTP/2.0 @@ -786,13 +786,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi","ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 110.393917ms + duration: 122.9845ms - id: 22 request: proto: HTTP/1.1 @@ -812,7 +812,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -822,13 +822,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 103.387334ms + duration: 170.74575ms - id: 23 request: proto: HTTP/1.1 @@ -848,7 +848,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -858,13 +858,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 98.013875ms + duration: 165.672625ms - id: 24 request: proto: HTTP/1.1 @@ -884,7 +884,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY method: GET response: proto: HTTP/2.0 @@ -894,13 +894,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 93.654958ms + duration: 96.885583ms - id: 25 request: proto: HTTP/1.1 @@ -920,7 +920,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi method: GET response: proto: HTTP/2.0 @@ -930,13 +930,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 108.808084ms + duration: 123.181708ms - id: 26 request: proto: HTTP/1.1 @@ -956,7 +956,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -966,13 +966,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 123.922791ms + duration: 102.551209ms - id: 27 request: proto: HTTP/1.1 @@ -992,7 +992,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true method: GET response: proto: HTTP/2.0 @@ -1002,13 +1002,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"id":"con_bdCGh5mlMR53cKT6","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 108.801167ms + duration: 89.087ms - id: 28 request: proto: HTTP/1.1 @@ -1028,7 +1028,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -1038,13 +1038,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 129.396833ms + duration: 132.387875ms - id: 29 request: proto: HTTP/1.1 @@ -1064,7 +1064,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY method: GET response: proto: HTTP/2.0 @@ -1074,13 +1074,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 198.8035ms + duration: 132.357834ms - id: 30 request: proto: HTTP/1.1 @@ -1100,7 +1100,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi method: GET response: proto: HTTP/2.0 @@ -1110,48 +1110,49 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":["lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4","dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE"]}' + body: '{"name":"Acceptance-Test-Client-1-TestAccConnectionClients","client_id":"NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":false,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":1296000}}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 113.352708ms + duration: 132.418292ms - id: 31 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 0 + content_length: 23 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" - body: "" + body: | + {"enabled_clients":[]} form: {} headers: Content-Type: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/lvT3cr0FTTFosQ4nM8BJKTdVvaPCP2k4 - method: DELETE + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 + method: PATCH response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 0 - uncompressed: false - body: "" + content_length: -1 + uncompressed: true + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 - status: 204 No Content - code: 204 - duration: 191.280625ms + status: 200 OK + code: 200 + duration: 116.051166ms - id: 32 request: proto: HTTP/1.1 @@ -1170,7 +1171,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/dWPHmi1Ff0YXquJlg8HkOkGLCXhEAfJE + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/NcNTDYPMN4YdPQEIOr1lwdwHwMYIgmDi method: DELETE response: proto: HTTP/2.0 @@ -1186,43 +1187,42 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 276.732125ms + duration: 253.830041ms - id: 33 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 23 + content_length: 0 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" - body: | - {"enabled_clients":[]} + body: "" form: {} headers: Content-Type: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl - method: PATCH + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/ah7TKVsfgza2bNVpKMCgtW2KA1rJsFbY + method: DELETE response: proto: HTTP/2.0 proto_major: 2 proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: -1 - uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + content_length: 0 + uncompressed: false + body: "" headers: Content-Type: - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 128.926917ms + status: 204 No Content + code: 204 + duration: 207.823708ms - id: 34 request: proto: HTTP/1.1 @@ -1242,7 +1242,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -1252,13 +1252,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 100.754959ms + duration: 108.051042ms - id: 35 request: proto: HTTP/1.1 @@ -1278,7 +1278,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: GET response: proto: HTTP/2.0 @@ -1288,86 +1288,14 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' + body: '{"id":"con_bdCGh5mlMR53cKT6","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 107.066334ms + duration: 182.687666ms - id: 36 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 5 - transfer_encoding: [] - trailer: {} - host: terraform-provider-auth0-dev.eu.auth0.com - remote_addr: "" - request_uri: "" - body: | - null - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl?fields=enabled_clients%2Cstrategy%2Cname&include_fields=true - method: GET - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - transfer_encoding: [] - trailer: {} - content_length: -1 - uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 127.383958ms - - id: 37 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 23 - transfer_encoding: [] - trailer: {} - host: terraform-provider-auth0-dev.eu.auth0.com - remote_addr: "" - request_uri: "" - body: | - {"enabled_clients":[]} - form: {} - headers: - Content-Type: - - application/json - User-Agent: - - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl - method: PATCH - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - transfer_encoding: [] - trailer: {} - content_length: -1 - uncompressed: true - body: '{"id":"con_Y32TyJpikKF6WZxl","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"brute_force_protection":true},"strategy":"auth0","name":"Acceptance-Test-Connection-TestAccConnectionClients","is_domain_connection":false,"enabled_clients":[],"realms":["Acceptance-Test-Connection-TestAccConnectionClients"]}' - headers: - Content-Type: - - application/json; charset=utf-8 - status: 200 OK - code: 200 - duration: 112.286417ms - - id: 38 request: proto: HTTP/1.1 proto_major: 1 @@ -1385,7 +1313,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_Y32TyJpikKF6WZxl + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_bdCGh5mlMR53cKT6 method: DELETE response: proto: HTTP/2.0 @@ -1393,12 +1321,12 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 0 + content_length: 41 uncompressed: false - body: "" + body: '{"deleted_at":"2023-05-09T09:38:58.164Z"}' headers: Content-Type: - application/json; charset=utf-8 - status: 204 No Content - code: 204 - duration: 180.772375ms + status: 202 Accepted + code: 202 + duration: 130.806375ms From fbf126518a3a6d08174f3254f691347433fdd507 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Mon, 8 May 2023 18:13:35 +0200 Subject: [PATCH 3/3] Fix created import ID on association resources --- internal/auth0/connection/resource_client.go | 3 +-- internal/auth0/organization/resource_connection.go | 3 +-- internal/auth0/organization/resource_member.go | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/auth0/connection/resource_client.go b/internal/auth0/connection/resource_client.go index 2a625d5b3..8652f5c8a 100644 --- a/internal/auth0/connection/resource_client.go +++ b/internal/auth0/connection/resource_client.go @@ -8,7 +8,6 @@ import ( "github.com/auth0/go-auth0/management" "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/auth0/terraform-provider-auth0/internal/mutex" @@ -79,7 +78,7 @@ func createConnectionClient(ctx context.Context, data *schema.ResourceData, meta return diag.FromErr(err) } - data.SetId(id.UniqueId()) + data.SetId(connectionID + ":" + clientID) return readConnectionClient(ctx, data, meta) } diff --git a/internal/auth0/organization/resource_connection.go b/internal/auth0/organization/resource_connection.go index a58afd76e..e679ac082 100644 --- a/internal/auth0/organization/resource_connection.go +++ b/internal/auth0/organization/resource_connection.go @@ -8,7 +8,6 @@ import ( "github.com/auth0/go-auth0/management" "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/auth0/terraform-provider-auth0/internal/mutex" @@ -83,7 +82,7 @@ func createOrganizationConnection(ctx context.Context, data *schema.ResourceData return diag.FromErr(err) } - data.SetId(id.UniqueId()) + data.SetId(organizationID + ":" + connectionID) return readOrganizationConnection(ctx, data, meta) } diff --git a/internal/auth0/organization/resource_member.go b/internal/auth0/organization/resource_member.go index 250baed73..c0975b927 100644 --- a/internal/auth0/organization/resource_member.go +++ b/internal/auth0/organization/resource_member.go @@ -7,7 +7,6 @@ import ( "github.com/auth0/go-auth0/management" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/auth0/terraform-provider-auth0/internal/mutex" @@ -64,7 +63,7 @@ func createOrganizationMember(ctx context.Context, d *schema.ResourceData, m int return diag.FromErr(err) } - d.SetId(id.UniqueId()) + d.SetId(orgID + ":" + userID) if err := assignRoles(d, api); err != nil { return diag.FromErr(fmt.Errorf("failed to assign roles to organization member: %w", err))