From a4efad39c92de7fada9031d0cbf9df73c16eafea Mon Sep 17 00:00:00 2001 From: Devin Brenton Date: Tue, 19 Nov 2024 00:16:26 -0500 Subject: [PATCH] Add "auth0_clients" data source for listing multiple clients with filtering --- docs/data-sources/clients.md | 47 +++ internal/acctest/http_recorder.go | 39 +- internal/auth0/client/resource.go | 18 +- internal/auth0/clients/data_source.go | 161 ++++++++ internal/auth0/clients/data_source_test.go | 134 ++++++ internal/auth0/clients/flatten.go | 35 ++ internal/provider/provider.go | 2 + .../TestAccDataClientsAppTypeFilter.yaml | 390 ++++++++++++++++++ ...estAccDataClientsInvalidAppTypeFilter.yaml | 3 + .../TestAccDataClientsIsFirstPartyFilter.yaml | 390 ++++++++++++++++++ .../TestAccDataClientsNameFilter.yaml | 390 ++++++++++++++++++ 11 files changed, 1596 insertions(+), 13 deletions(-) create mode 100644 docs/data-sources/clients.md create mode 100644 internal/auth0/clients/data_source.go create mode 100644 internal/auth0/clients/data_source_test.go create mode 100644 internal/auth0/clients/flatten.go create mode 100644 test/data/recordings/TestAccDataClientsAppTypeFilter.yaml create mode 100644 test/data/recordings/TestAccDataClientsInvalidAppTypeFilter.yaml create mode 100644 test/data/recordings/TestAccDataClientsIsFirstPartyFilter.yaml create mode 100644 test/data/recordings/TestAccDataClientsNameFilter.yaml diff --git a/docs/data-sources/clients.md b/docs/data-sources/clients.md new file mode 100644 index 000000000..04d04cf04 --- /dev/null +++ b/docs/data-sources/clients.md @@ -0,0 +1,47 @@ +--- +page_title: "Data Source: auth0_clients" +description: |- + Data source to retrieve a list of Auth0 application clients with optional filtering. +--- + +# Data Source: auth0_clients + +Data source to retrieve a list of Auth0 application clients with optional filtering. + + + + +## Schema + +### Optional + +- `app_types` (Set of String) Filter clients by application types. +- `is_first_party` (Boolean) Filter clients by first party status. +- `name_filter` (String) Filter clients by name (partial matches supported). + +### Read-Only + +- `clients` (List of Object) List of clients matching the filter criteria. (see [below for nested schema](#nestedatt--clients)) +- `id` (String) The ID of this resource. + + +### Nested Schema for `clients` + +Read-Only: + +- `allowed_clients` (List of String) +- `allowed_logout_urls` (List of String) +- `allowed_origins` (List of String) +- `app_type` (String) +- `callbacks` (List of String) +- `client_id` (String) +- `client_metadata` (Map of String) +- `client_secret` (String) +- `description` (String) +- `grant_types` (List of String) +- `is_first_party` (Boolean) +- `is_token_endpoint_ip_header_trusted` (Boolean) +- `name` (String) +- `web_origins` (List of String) + + diff --git a/internal/acctest/http_recorder.go b/internal/acctest/http_recorder.go index ab82273bc..a91c9f4ff 100644 --- a/internal/acctest/http_recorder.go +++ b/internal/acctest/http_recorder.go @@ -108,27 +108,56 @@ func redactDomain(i *cassette.Interaction, domain string) { } func redactSensitiveDataInClient(t *testing.T, i *cassette.Interaction, domain string) { - create := i.Request.URL == "https://"+domain+"/api/v2/clients" && + baseURL := "https://" + domain + "/api/v2/clients" + urlPath := strings.Split(i.Request.URL, "?")[0] // Strip query params + + create := i.Request.URL == baseURL && i.Request.Method == http.MethodPost - read := strings.Contains(i.Request.URL, "https://"+domain+"/api/v2/clients/") && + readList := urlPath == baseURL && + i.Request.Method == http.MethodGet + + readOne := strings.Contains(i.Request.URL, baseURL+"/") && !strings.Contains(i.Request.URL, "credentials") && i.Request.Method == http.MethodGet - update := strings.Contains(i.Request.URL, "https://"+domain+"/api/v2/clients/") && + update := strings.Contains(i.Request.URL, baseURL+"/") && !strings.Contains(i.Request.URL, "credentials") && i.Request.Method == http.MethodPatch - if create || read || update { + if create || readList || readOne || update { if i.Response.Code == http.StatusNotFound { return } + redacted := "[REDACTED]" + + // Handle list response + if readList { + var response management.ClientList + err := json.Unmarshal([]byte(i.Response.Body), &response) + require.NoError(t, err) + + for _, client := range response.Clients { + client.SigningKeys = []map[string]string{ + {"cert": redacted}, + } + if client.GetClientSecret() != "" { + client.ClientSecret = &redacted + } + } + + responseBody, err := json.Marshal(response) + require.NoError(t, err) + i.Response.Body = string(responseBody) + return + } + + // Handle single client response var client management.Client err := json.Unmarshal([]byte(i.Response.Body), &client) require.NoError(t, err) - redacted := "[REDACTED]" client.SigningKeys = []map[string]string{ {"cert": redacted}, } diff --git a/internal/auth0/client/resource.go b/internal/auth0/client/resource.go index b2729b24d..b3aecbd08 100644 --- a/internal/auth0/client/resource.go +++ b/internal/auth0/client/resource.go @@ -15,6 +15,13 @@ import ( internalValidation "github.com/auth0/terraform-provider-auth0/internal/validation" ) +var ValidAppTypes = []string{ + "native", "spa", "regular_web", "non_interactive", "rms", + "box", "cloudbees", "concur", "dropbox", "mscrm", "echosign", + "egnyte", "newrelic", "office365", "salesforce", "sentry", + "sharepoint", "slack", "springcm", "sso_integration", "zendesk", "zoom", +} + // NewResource will return a new auth0_client resource. func NewResource() *schema.Resource { return &schema.Resource{ @@ -53,14 +60,9 @@ func NewResource() *schema.Resource { Description: "List of audiences/realms for SAML protocol. Used by the wsfed addon.", }, "app_type": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - "native", "spa", "regular_web", "non_interactive", "rms", - "box", "cloudbees", "concur", "dropbox", "mscrm", "echosign", - "egnyte", "newrelic", "office365", "salesforce", "sentry", - "sharepoint", "slack", "springcm", "sso_integration", "zendesk", "zoom", - }, false), + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice(ValidAppTypes, false), Description: "Type of application the client represents. Possible values are: `native`, `spa`, " + "`regular_web`, `non_interactive`, `sso_integration`. Specific SSO integrations types accepted " + "as well are: `rms`, `box`, `cloudbees`, `concur`, `dropbox`, `mscrm`, `echosign`, `egnyte`, " + diff --git a/internal/auth0/clients/data_source.go b/internal/auth0/clients/data_source.go new file mode 100644 index 000000000..247e1a732 --- /dev/null +++ b/internal/auth0/clients/data_source.go @@ -0,0 +1,161 @@ +package clients + +import ( + "context" + "crypto/sha256" + "fmt" + "strings" + + "github.com/auth0/go-auth0/management" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + + "github.com/auth0/terraform-provider-auth0/internal/auth0/client" + "github.com/auth0/terraform-provider-auth0/internal/config" +) + +// NewDataSource will return a new auth0_clients data source. +func NewDataSource() *schema.Resource { + return &schema.Resource{ + ReadContext: readClientsForDataSource, + Description: "Data source to retrieve a list of Auth0 application clients with optional filtering.", + Schema: map[string]*schema.Schema{ + "name_filter": { + Type: schema.TypeString, + Optional: true, + Description: "Filter clients by name (partial matches supported).", + }, + "app_types": { + Type: schema.TypeSet, + Optional: true, + Description: "Filter clients by application types.", + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice(client.ValidAppTypes, false), + }, + }, + "is_first_party": { + Type: schema.TypeBool, + Optional: true, + Description: "Filter clients by first party status.", + }, + "clients": { + Type: schema.TypeList, + Computed: true, + Description: "List of clients matching the filter criteria.", + Elem: &schema.Resource{ + Schema: CoreClientDataSourceSchema(), + }, + }, + }, + } +} + +func CoreClientDataSourceSchema() map[string]*schema.Schema { + clientSchema := client.NewDataSource().Schema + + // Remove unused fields from the client schema + fieldsToRemove := []string{ + "client_aliases", + "logo_uri", + "oidc_conformant", + "oidc_backchannel_logout_urls", + "organization_usage", + "organization_require_behavior", + "cross_origin_auth", + "cross_origin_loc", + "custom_login_page_on", + "custom_login_page", + "form_template", + "require_pushed_authorization_requests", + "mobile", + "initiate_login_uri", + "native_social_login", + "refresh_token", + "signing_keys", + "encryption_key", + "sso", + "sso_disabled", + "jwt_configuration", + "addons", + "default_organization", + "compliance_level", + "require_proof_of_possession", + "token_endpoint_auth_method", + "signed_request_object", + "client_authentication_methods", + } + + for _, field := range fieldsToRemove { + delete(clientSchema, field) + } + + return clientSchema +} + +func readClientsForDataSource(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*config.Config).GetAPI() + + nameFilter := data.Get("name_filter").(string) + appTypesSet := data.Get("app_types").(*schema.Set) + isFirstParty := data.Get("is_first_party").(bool) + + appTypes := make([]string, 0, appTypesSet.Len()) + for _, v := range appTypesSet.List() { + appTypes = append(appTypes, v.(string)) + } + + var clients []*management.Client + + params := []management.RequestOption{ + management.PerPage(100), + } + + if len(appTypes) > 0 { + params = append(params, management.Parameter("app_type", strings.Join(appTypes, ","))) + } + if isFirstParty { + params = append(params, management.Parameter("is_first_party", "true")) + } + + var page int + for { + // Add current page parameter + params = append(params, management.Page(page)) + + list, err := api.Client.List(ctx, params...) + if err != nil { + return diag.FromErr(err) + } + + for _, client := range list.Clients { + if nameFilter == "" || strings.Contains(client.GetName(), nameFilter) { + clients = append(clients, client) + } + } + + if !list.HasNext() { + break + } + + // Remove the page parameter and increment for next iteration + params = params[:len(params)-1] + page++ + } + + filterID := generateFilterID(nameFilter, appTypes, isFirstParty) + data.SetId(filterID) + + if err := flattenClientList(data, clients); err != nil { + return diag.FromErr(err) + } + + return nil +} + +func generateFilterID(nameFilter string, appTypes []string, isFirstParty bool) string { + h := sha256.New() + h.Write([]byte(fmt.Sprintf("%s-%v-%v", nameFilter, appTypes, isFirstParty))) + return fmt.Sprintf("clients-%x", h.Sum(nil)) +} diff --git a/internal/auth0/clients/data_source_test.go b/internal/auth0/clients/data_source_test.go new file mode 100644 index 000000000..d4c66bf11 --- /dev/null +++ b/internal/auth0/clients/data_source_test.go @@ -0,0 +1,134 @@ +package clients_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + "github.com/auth0/terraform-provider-auth0/internal/acctest" +) + +const testAccGivenAClient = ` +resource "auth0_client" "my_client_1" { + name = "Acceptance Test 1 - {{.testName}}" + app_type = "non_interactive" + is_first_party = true + description = "Description for client 1 {{.testName}}" +} + +resource "auth0_client" "my_client_2" { + name = "Acceptance Test 2 - {{.testName}}" + app_type = "spa" + is_first_party = false + description = "Description for client 2 {{.testName}}" +} +` + +const testAccDataClientsWithNameFilter = ` +data "auth0_clients" "test" { + depends_on = [ + auth0_client.my_client_1, + auth0_client.my_client_2 + ] + + name_filter = "{{.testName}}" +} +` + +const testAccDataClientsWithAppTypeFilter = ` +data "auth0_clients" "test" { + depends_on = [ + auth0_client.my_client_1, + auth0_client.my_client_2 + ] + + name_filter = "{{.testName}}" + app_types = ["non_interactive"] +} +` + +const testAccDataClientsWithIsFirstPartyFilter = ` +data "auth0_clients" "test" { + depends_on = [ + auth0_client.my_client_1, + auth0_client.my_client_2 + ] + + name_filter = "{{.testName}}" + is_first_party = true +} +` + +func TestAccDataClientsNameFilter(t *testing.T) { + acctest.Test(t, resource.TestCase{ + PreventPostDestroyRefresh: true, + Steps: []resource.TestStep{ + { + Config: acctest.ParseTestName(testAccGivenAClient+testAccDataClientsWithNameFilter, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "id"), + resource.TestCheckResourceAttr("data.auth0_clients.test", "clients.#", "2"), + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "clients.0.name"), + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "clients.0.app_type"), + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "clients.0.is_first_party"), + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "clients.1.name"), + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "clients.1.app_type"), + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "clients.1.is_first_party"), + ), + }, + }, + }) +} + +func TestAccDataClientsAppTypeFilter(t *testing.T) { + acctest.Test(t, resource.TestCase{ + PreventPostDestroyRefresh: true, + Steps: []resource.TestStep{ + { + Config: acctest.ParseTestName(testAccGivenAClient+testAccDataClientsWithAppTypeFilter, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "id"), + resource.TestCheckResourceAttr("data.auth0_clients.test", "clients.#", "1"), + resource.TestCheckResourceAttr("data.auth0_clients.test", "clients.0.app_type", "non_interactive"), + resource.TestCheckResourceAttr("data.auth0_clients.test", "clients.0.name", fmt.Sprintf("Acceptance Test 1 - %v", t.Name())), + ), + }, + }, + }) +} + +func TestAccDataClientsIsFirstPartyFilter(t *testing.T) { + acctest.Test(t, resource.TestCase{ + PreventPostDestroyRefresh: true, + Steps: []resource.TestStep{ + { + Config: acctest.ParseTestName(testAccGivenAClient+testAccDataClientsWithIsFirstPartyFilter, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("data.auth0_clients.test", "id"), + resource.TestCheckResourceAttr("data.auth0_clients.test", "clients.0.is_first_party", "true"), + ), + }, + }, + }) +} + +const testAccDataClientsWithInvalidAppTypeFilter = ` +data "auth0_clients" "test" { + app_types = ["invalid"] +} +` + +func TestAccDataClientsInvalidAppTypeFilter(t *testing.T) { + acctest.Test(t, resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: acctest.ParseTestName(testAccDataClientsWithInvalidAppTypeFilter, t.Name()), + ExpectError: regexp.MustCompile( + `expected app_types\.0 to be one of \["native" "spa" "regular_web" "non_interactive" "rms" "box" "cloudbees" "concur" "dropbox" "mscrm" "echosign" "egnyte" "newrelic" "office365" "salesforce" "sentry" "sharepoint" "slack" "springcm" "sso_integration" "zendesk" "zoom"\], got invalid`, + ), + }, + }, + }) +} diff --git a/internal/auth0/clients/flatten.go b/internal/auth0/clients/flatten.go new file mode 100644 index 000000000..c60bd687d --- /dev/null +++ b/internal/auth0/clients/flatten.go @@ -0,0 +1,35 @@ +package clients + +import ( + "github.com/auth0/go-auth0/management" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func flattenClientList(data *schema.ResourceData, clients []*management.Client) error { + if clients == nil { + return data.Set("clients", make([]map[string]interface{}, 0)) + } + + clientList := make([]map[string]interface{}, 0, len(clients)) + for _, client := range clients { + clientMap := map[string]interface{}{ + "client_id": client.GetClientID(), + "client_secret": client.GetClientSecret(), + "name": client.GetName(), + "description": client.GetDescription(), + "app_type": client.GetAppType(), + "is_first_party": client.GetIsFirstParty(), + "is_token_endpoint_ip_header_trusted": client.GetIsTokenEndpointIPHeaderTrusted(), + "callbacks": client.GetCallbacks(), + "allowed_logout_urls": client.GetAllowedLogoutURLs(), + "allowed_origins": client.GetAllowedOrigins(), + "allowed_clients": client.GetAllowedClients(), + "grant_types": client.GetGrantTypes(), + "web_origins": client.GetWebOrigins(), + "client_metadata": client.GetClientMetadata(), + } + clientList = append(clientList, clientMap) + } + + return data.Set("clients", clientList) +} diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 11fea2716..0b63f33d5 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -15,6 +15,7 @@ import ( "github.com/auth0/terraform-provider-auth0/internal/auth0/attackprotection" "github.com/auth0/terraform-provider-auth0/internal/auth0/branding" "github.com/auth0/terraform-provider-auth0/internal/auth0/client" + "github.com/auth0/terraform-provider-auth0/internal/auth0/clients" "github.com/auth0/terraform-provider-auth0/internal/auth0/connection" "github.com/auth0/terraform-provider-auth0/internal/auth0/customdomain" "github.com/auth0/terraform-provider-auth0/internal/auth0/email" @@ -155,6 +156,7 @@ func New() *schema.Provider { "auth0_branding": branding.NewDataSource(), "auth0_branding_theme": branding.NewThemeDataSource(), "auth0_client": client.NewDataSource(), + "auth0_clients": clients.NewDataSource(), "auth0_connection": connection.NewDataSource(), "auth0_connection_scim_configuration": connection.NewSCIMConfigurationDataSource(), "auth0_custom_domain": customdomain.NewDataSource(), diff --git a/test/data/recordings/TestAccDataClientsAppTypeFilter.yaml b/test/data/recordings/TestAccDataClientsAppTypeFilter.yaml new file mode 100644 index 000000000..55b573434 --- /dev/null +++ b/test/data/recordings/TestAccDataClientsAppTypeFilter.yaml @@ -0,0 +1,390 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 212 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test 2 - TestAccDataClientsAppTypeFilter","description":"Description for client 2 TestAccDataClientsAppTypeFilter","app_type":"spa","is_first_party":false,"token_endpoint_auth_method":"none"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + 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 2 - TestAccDataClientsAppTypeFilter","description":"Description for client 2 TestAccDataClientsAppTypeFilter","client_id":"waw6wnZpsQ6h4bR12hZmehiUbk1XWbjX","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 302.146167ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 237 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test 1 - TestAccDataClientsAppTypeFilter","description":"Description for client 1 TestAccDataClientsAppTypeFilter","app_type":"non_interactive","is_first_party":true,"token_endpoint_auth_method":"client_secret_post"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + 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 1 - TestAccDataClientsAppTypeFilter","description":"Description for client 1 TestAccDataClientsAppTypeFilter","client_id":"0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 484.241708ms + - id: 2 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/waw6wnZpsQ6h4bR12hZmehiUbk1XWbjX + 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 2 - TestAccDataClientsAppTypeFilter","description":"Description for client 2 TestAccDataClientsAppTypeFilter","client_id":"waw6wnZpsQ6h4bR12hZmehiUbk1XWbjX","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 195.7585ms + - id: 3 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp + 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 1 - TestAccDataClientsAppTypeFilter","description":"Description for client 1 TestAccDataClientsAppTypeFilter","client_id":"0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 188.318625ms + - id: 4 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?app_type=non_interactive&include_totals=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":2,"next":"","clients":[{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 1 - TestAccDataClientsAppTypeFilter","description":"Description for client 1 TestAccDataClientsAppTypeFilter","client_id":"0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 185.550375ms + - id: 5 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?app_type=non_interactive&include_totals=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":2,"next":"","clients":[{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 1 - TestAccDataClientsAppTypeFilter","description":"Description for client 1 TestAccDataClientsAppTypeFilter","client_id":"0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 189.999458ms + - id: 6 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/waw6wnZpsQ6h4bR12hZmehiUbk1XWbjX + 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 2 - TestAccDataClientsAppTypeFilter","description":"Description for client 2 TestAccDataClientsAppTypeFilter","client_id":"waw6wnZpsQ6h4bR12hZmehiUbk1XWbjX","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 187.793833ms + - id: 7 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp + 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 1 - TestAccDataClientsAppTypeFilter","description":"Description for client 1 TestAccDataClientsAppTypeFilter","client_id":"0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 189.502208ms + - id: 8 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?app_type=non_interactive&include_totals=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":2,"next":"","clients":[{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 1 - TestAccDataClientsAppTypeFilter","description":"Description for client 1 TestAccDataClientsAppTypeFilter","client_id":"0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 176.373625ms + - id: 9 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/0B5dlGm0RJPTeLyLtsrDOj6XRJx2sAQp + 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: 200.54575ms + - 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/waw6wnZpsQ6h4bR12hZmehiUbk1XWbjX + 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: 249.060708ms diff --git a/test/data/recordings/TestAccDataClientsInvalidAppTypeFilter.yaml b/test/data/recordings/TestAccDataClientsInvalidAppTypeFilter.yaml new file mode 100644 index 000000000..2797c38e0 --- /dev/null +++ b/test/data/recordings/TestAccDataClientsInvalidAppTypeFilter.yaml @@ -0,0 +1,3 @@ +--- +version: 2 +interactions: [] diff --git a/test/data/recordings/TestAccDataClientsIsFirstPartyFilter.yaml b/test/data/recordings/TestAccDataClientsIsFirstPartyFilter.yaml new file mode 100644 index 000000000..eb2aeec2d --- /dev/null +++ b/test/data/recordings/TestAccDataClientsIsFirstPartyFilter.yaml @@ -0,0 +1,390 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 222 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test 2 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 2 TestAccDataClientsIsFirstPartyFilter","app_type":"spa","is_first_party":false,"token_endpoint_auth_method":"none"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + 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 2 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 2 TestAccDataClientsIsFirstPartyFilter","client_id":"n24EhMnLK5xIhF7kysco62B9c07gLOY2","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 366.835208ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 247 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test 1 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 1 TestAccDataClientsIsFirstPartyFilter","app_type":"non_interactive","is_first_party":true,"token_endpoint_auth_method":"client_secret_post"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + 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 1 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 1 TestAccDataClientsIsFirstPartyFilter","client_id":"pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 509.990292ms + - id: 2 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/n24EhMnLK5xIhF7kysco62B9c07gLOY2 + 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 2 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 2 TestAccDataClientsIsFirstPartyFilter","client_id":"n24EhMnLK5xIhF7kysco62B9c07gLOY2","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 208.089083ms + - id: 3 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN + 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 1 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 1 TestAccDataClientsIsFirstPartyFilter","client_id":"pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 180.986708ms + - id: 4 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?include_totals=true&is_first_party=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":4,"next":"","clients":[{"name":"Default App","client_id":"WaxogeX7u5rXTTycyt6JYT1gAw60o5eR","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"callbacks":[],"jwt_configuration":{"secret_encoded":false,"alg":"RS256","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}},{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 1 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 1 TestAccDataClientsIsFirstPartyFilter","client_id":"pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"All Applications","client_id":"DFt28STZC23etWufnhxv962OyhUKgfQj","client_secret":"[REDACTED]","is_first_party":true,"callbacks":[],"signing_keys":[{"cert":"[REDACTED]"}],"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: 192.660083ms + - id: 5 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?include_totals=true&is_first_party=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":4,"next":"","clients":[{"name":"Default App","client_id":"WaxogeX7u5rXTTycyt6JYT1gAw60o5eR","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"callbacks":[],"jwt_configuration":{"secret_encoded":false,"alg":"RS256","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}},{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 1 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 1 TestAccDataClientsIsFirstPartyFilter","client_id":"pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"All Applications","client_id":"DFt28STZC23etWufnhxv962OyhUKgfQj","client_secret":"[REDACTED]","is_first_party":true,"callbacks":[],"signing_keys":[{"cert":"[REDACTED]"}],"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: 189.647084ms + - id: 6 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN + 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 1 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 1 TestAccDataClientsIsFirstPartyFilter","client_id":"pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 180.217208ms + - id: 7 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/n24EhMnLK5xIhF7kysco62B9c07gLOY2 + 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 2 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 2 TestAccDataClientsIsFirstPartyFilter","client_id":"n24EhMnLK5xIhF7kysco62B9c07gLOY2","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 207.12025ms + - id: 8 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?include_totals=true&is_first_party=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":4,"next":"","clients":[{"name":"Default App","client_id":"WaxogeX7u5rXTTycyt6JYT1gAw60o5eR","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"callbacks":[],"jwt_configuration":{"secret_encoded":false,"alg":"RS256","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}},{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 1 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 1 TestAccDataClientsIsFirstPartyFilter","client_id":"pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"All Applications","client_id":"DFt28STZC23etWufnhxv962OyhUKgfQj","client_secret":"[REDACTED]","is_first_party":true,"callbacks":[],"signing_keys":[{"cert":"[REDACTED]"}],"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: 217.587958ms + - id: 9 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/pwvAjQ4CXjYvUtCxfTWXv7X2ZZEZkKiN + 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: 212.300709ms + - 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/n24EhMnLK5xIhF7kysco62B9c07gLOY2 + 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: 226.284333ms diff --git a/test/data/recordings/TestAccDataClientsNameFilter.yaml b/test/data/recordings/TestAccDataClientsNameFilter.yaml new file mode 100644 index 000000000..943f98bf5 --- /dev/null +++ b/test/data/recordings/TestAccDataClientsNameFilter.yaml @@ -0,0 +1,390 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 231 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test 1 - TestAccDataClientsNameFilter","description":"Description for client 1 TestAccDataClientsNameFilter","app_type":"non_interactive","is_first_party":true,"token_endpoint_auth_method":"client_secret_post"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + 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 1 - TestAccDataClientsNameFilter","description":"Description for client 1 TestAccDataClientsNameFilter","client_id":"AFnxyRKXmmdtltWta1VSialCi8dDfP2V","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 331.254792ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 206 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test 2 - TestAccDataClientsNameFilter","description":"Description for client 2 TestAccDataClientsNameFilter","app_type":"spa","is_first_party":false,"token_endpoint_auth_method":"none"} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0/1.11.2 + 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 2 - TestAccDataClientsNameFilter","description":"Description for client 2 TestAccDataClientsNameFilter","client_id":"Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 332.118458ms + - id: 2 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg + 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 2 - TestAccDataClientsNameFilter","description":"Description for client 2 TestAccDataClientsNameFilter","client_id":"Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 206.053709ms + - id: 3 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/AFnxyRKXmmdtltWta1VSialCi8dDfP2V + 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 1 - TestAccDataClientsNameFilter","description":"Description for client 1 TestAccDataClientsNameFilter","client_id":"AFnxyRKXmmdtltWta1VSialCi8dDfP2V","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 322.37375ms + - id: 4 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?include_totals=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":6,"next":"","clients":[{"name":"Default App","client_id":"WaxogeX7u5rXTTycyt6JYT1gAw60o5eR","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"callbacks":[],"jwt_configuration":{"secret_encoded":false,"alg":"RS256","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}},{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 2 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 2 TestAccDataClientsIsFirstPartyFilter","client_id":"YABbgfGWsOwBqS6kbcRFnAu7SyY1jfWV","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}},{"name":"Acceptance Test 1 - TestAccDataClientsNameFilter","description":"Description for client 1 TestAccDataClientsNameFilter","client_id":"AFnxyRKXmmdtltWta1VSialCi8dDfP2V","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 2 - TestAccDataClientsNameFilter","description":"Description for client 2 TestAccDataClientsNameFilter","client_id":"Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}},{"name":"All Applications","client_id":"DFt28STZC23etWufnhxv962OyhUKgfQj","client_secret":"[REDACTED]","is_first_party":true,"callbacks":[],"signing_keys":[{"cert":"[REDACTED]"}],"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: 184.931208ms + - id: 5 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?include_totals=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":6,"next":"","clients":[{"name":"Default App","client_id":"WaxogeX7u5rXTTycyt6JYT1gAw60o5eR","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"callbacks":[],"jwt_configuration":{"secret_encoded":false,"alg":"RS256","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}},{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 2 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 2 TestAccDataClientsIsFirstPartyFilter","client_id":"YABbgfGWsOwBqS6kbcRFnAu7SyY1jfWV","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}},{"name":"Acceptance Test 1 - TestAccDataClientsNameFilter","description":"Description for client 1 TestAccDataClientsNameFilter","client_id":"AFnxyRKXmmdtltWta1VSialCi8dDfP2V","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 2 - TestAccDataClientsNameFilter","description":"Description for client 2 TestAccDataClientsNameFilter","client_id":"Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}},{"name":"All Applications","client_id":"DFt28STZC23etWufnhxv962OyhUKgfQj","client_secret":"[REDACTED]","is_first_party":true,"callbacks":[],"signing_keys":[{"cert":"[REDACTED]"}],"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: 205.652417ms + - id: 6 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/AFnxyRKXmmdtltWta1VSialCi8dDfP2V + 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 1 - TestAccDataClientsNameFilter","description":"Description for client 1 TestAccDataClientsNameFilter","client_id":"AFnxyRKXmmdtltWta1VSialCi8dDfP2V","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 173.679875ms + - id: 7 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg + 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 2 - TestAccDataClientsNameFilter","description":"Description for client 2 TestAccDataClientsNameFilter","client_id":"Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 185.081292ms + - id: 8 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients?include_totals=true&page=0&per_page=100 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"start":0,"limit":100,"length":0,"total":6,"next":"","clients":[{"name":"Default App","client_id":"WaxogeX7u5rXTTycyt6JYT1gAw60o5eR","client_secret":"[REDACTED]","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"callbacks":[],"jwt_configuration":{"secret_encoded":false,"alg":"RS256","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}},{"name":"API Explorer Application","client_id":"CyafwNxyVUHI4cWzvXfpMmkEQ2ewLOzN","client_secret":"[REDACTED]","app_type":"non_interactive","is_first_party":true,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"alg":"RS256","lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 2 - TestAccDataClientsIsFirstPartyFilter","description":"Description for client 2 TestAccDataClientsIsFirstPartyFilter","client_id":"YABbgfGWsOwBqS6kbcRFnAu7SyY1jfWV","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}},{"name":"Acceptance Test 1 - TestAccDataClientsNameFilter","description":"Description for client 1 TestAccDataClientsNameFilter","client_id":"AFnxyRKXmmdtltWta1VSialCi8dDfP2V","client_secret":"[REDACTED]","app_type":"non_interactive","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,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"token_endpoint_auth_method":"client_secret_post","refresh_token":{"rotation_type":"non-rotating","expiration_type":"non-expiring","leeway":0,"token_lifetime":31557600,"infinite_token_lifetime":true,"infinite_idle_token_lifetime":true,"idle_token_lifetime":2592000}},{"name":"Acceptance Test 2 - TestAccDataClientsNameFilter","description":"Description for client 2 TestAccDataClientsNameFilter","client_id":"Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg","client_secret":"[REDACTED]","app_type":"spa","is_first_party":false,"is_token_endpoint_ip_header_trusted":false,"oidc_conformant":true,"jwt_configuration":{"secret_encoded":false,"lifetime_in_seconds":36000},"signing_keys":[{"cert":"[REDACTED]"}],"sso_disabled":false,"cross_origin_authentication":false,"grant_types":["authorization_code","implicit","refresh_token"],"custom_login_page_on":true,"token_endpoint_auth_method":"none","refresh_token":{"rotation_type":"rotating","expiration_type":"expiring","leeway":0,"token_lifetime":2592000,"infinite_token_lifetime":false,"infinite_idle_token_lifetime":false,"idle_token_lifetime":1296000}},{"name":"All Applications","client_id":"DFt28STZC23etWufnhxv962OyhUKgfQj","client_secret":"[REDACTED]","is_first_party":true,"callbacks":[],"signing_keys":[{"cert":"[REDACTED]"}],"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: 216.031458ms + - id: 9 + 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/Yc7o9tFVSWm3I3SoxQ1hqG474mTbBDlg + 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: 195.255ms + - 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/1.11.2 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/AFnxyRKXmmdtltWta1VSialCi8dDfP2V + 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: 215.487917ms