From ef3be7547f2e20651e0f8a37bf0c57015e81240f Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Thu, 13 Oct 2022 17:26:01 +0200 Subject: [PATCH] Fix update behavior or client_metadata --- go.mod | 2 +- go.sum | 2 + internal/provider/resource_auth0_client.go | 5 +- .../provider/resource_auth0_client_test.go | 67 ++ internal/provider/structure_auth0_client.go | 20 +- .../TestAccClientMetadataBehavior.yaml | 578 ++++++++++++++++++ 6 files changed, 671 insertions(+), 3 deletions(-) create mode 100644 test/data/recordings/TestAccClientMetadataBehavior.yaml diff --git a/go.mod b/go.mod index 624c4a18d..fc8e7c704 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/auth0/terraform-provider-auth0 go 1.18 require ( - github.com/auth0/go-auth0 v0.11.0 + github.com/auth0/go-auth0 v0.0.0-20221013131223-12cfcb1d8468 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/terraform-plugin-docs v0.13.0 diff --git a/go.sum b/go.sum index 0bd897277..5ab9ac611 100644 --- a/go.sum +++ b/go.sum @@ -63,6 +63,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/auth0/go-auth0 v0.0.0-20221013131223-12cfcb1d8468 h1:E/ai8y3Ixaz1jAfLDxixoI3DZxnv46g49C8UoEd5XKw= +github.com/auth0/go-auth0 v0.0.0-20221013131223-12cfcb1d8468/go.mod h1:XtmeQ7vZzyss3AAaLXMpupn28Y1Xj/DCt1IGEJRZ2gY= github.com/auth0/go-auth0 v0.11.0 h1:mxqbDMe91wjX3hvtPU/T7BdJqjgNQUJ02ZaROm/WRKA= github.com/auth0/go-auth0 v0.11.0/go.mod h1:XtmeQ7vZzyss3AAaLXMpupn28Y1Xj/DCt1IGEJRZ2gY= github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48= diff --git a/internal/provider/resource_auth0_client.go b/internal/provider/resource_auth0_client.go index 25716a4a9..ec469c193 100644 --- a/internal/provider/resource_auth0_client.go +++ b/internal/provider/resource_auth0_client.go @@ -780,12 +780,15 @@ func readClient(ctx context.Context, d *schema.ResourceData, m interface{}) diag d.Set("refresh_token", flattenClientRefreshTokenConfiguration(client.GetRefreshToken())), d.Set("encryption_key", client.GetEncryptionKey()), d.Set("addons", flattenClientAddons(client.Addons)), - d.Set("client_metadata", client.GetClientMetadata()), d.Set("mobile", flattenClientMobile(client.GetMobile())), d.Set("initiate_login_uri", client.GetInitiateLoginURI()), d.Set("signing_keys", client.SigningKeys), ) + if client.ClientMetadata != nil { + result = multierror.Append(result, d.Set("client_metadata", *client.ClientMetadata)) + } + return diag.FromErr(result.ErrorOrNil()) } diff --git a/internal/provider/resource_auth0_client_test.go b/internal/provider/resource_auth0_client_test.go index ebce731c9..f56ea56dd 100644 --- a/internal/provider/resource_auth0_client_test.go +++ b/internal/provider/resource_auth0_client_test.go @@ -970,3 +970,70 @@ func TestAccClientSSOIntegrationWithSAML(t *testing.T) { }, }) } + +func TestAccClientMetadataBehavior(t *testing.T) { + httpRecorder := recorder.New(t) + + resource.Test(t, resource.TestCase{ + ProviderFactories: testProviders(httpRecorder), + Steps: []resource.TestStep{ + { + Config: template.ParseTestName(` + resource "auth0_client" "my_client" { + name = "Acceptance Test - Metadata - {{.testName}}" + client_metadata = { + foo = "zoo" + bar = "baz" + } + }`, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_client.my_client", "name", fmt.Sprintf("Acceptance Test - Metadata - %s", t.Name())), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.%", "2"), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.foo", "zoo"), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.bar", "baz"), + ), + }, + { + Config: template.ParseTestName(` + resource "auth0_client" "my_client" { + name = "Acceptance Test - Metadata - {{.testName}}" + client_metadata = { + foo = "newZooButOldFoo" + newBar = "newBaz" + } + }`, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_client.my_client", "name", fmt.Sprintf("Acceptance Test - Metadata - %s", t.Name())), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.%", "2"), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.foo", "newZooButOldFoo"), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.newBar", "newBaz"), + ), + }, + { + Config: template.ParseTestName(` + resource "auth0_client" "my_client" { + name = "Acceptance Test - Metadata - {{.testName}}" + client_metadata = { + bar = "baz" + } + }`, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_client.my_client", "name", fmt.Sprintf("Acceptance Test - Metadata - %s", t.Name())), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.%", "1"), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.bar", "baz"), + ), + }, + { + Config: template.ParseTestName(` + resource "auth0_client" "my_client" { + name = "Acceptance Test - Metadata - {{.testName}}" + client_metadata = { } + }`, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_client.my_client", "name", fmt.Sprintf("Acceptance Test - Metadata - %s", t.Name())), + resource.TestCheckResourceAttr("auth0_client.my_client", "client_metadata.%", "0"), + ), + }, + }, + }) +} diff --git a/internal/provider/structure_auth0_client.go b/internal/provider/structure_auth0_client.go index d265b845a..67c6ffe91 100644 --- a/internal/provider/structure_auth0_client.go +++ b/internal/provider/structure_auth0_client.go @@ -39,7 +39,7 @@ func expandClient(d *schema.ResourceData) *management.Client { TokenEndpointAuthMethod: value.String(config.GetAttr("token_endpoint_auth_method")), InitiateLoginURI: value.String(config.GetAttr("initiate_login_uri")), EncryptionKey: value.MapOfStrings(config.GetAttr("encryption_key")), - ClientMetadata: value.MapOfStrings(config.GetAttr("client_metadata")), + ClientMetadata: expandClientMetadata(d), RefreshToken: expandClientRefreshToken(d), JWTConfiguration: expandClientJWTConfiguration(d), Addons: expandClientAddons(d), @@ -204,6 +204,24 @@ func expandClientMobileIOS(iosConfig cty.Value) *management.ClientMobileIOS { return &ios } +func expandClientMetadata(d *schema.ResourceData) *map[string]interface{} { + if !d.HasChange("client_metadata") { + return nil + } + + oldMetadata, newMetadata := d.GetChange("client_metadata") + oldMetadataMap := oldMetadata.(map[string]interface{}) + newMetadataMap := newMetadata.(map[string]interface{}) + + for key := range oldMetadataMap { + if _, ok := newMetadataMap[key]; !ok { + newMetadataMap[key] = nil + } + } + + return &newMetadataMap +} + func expandClientAddons(d *schema.ResourceData) map[string]interface{} { if !d.HasChange("addons") { return nil diff --git a/test/data/recordings/TestAccClientMetadataBehavior.yaml b/test/data/recordings/TestAccClientMetadataBehavior.yaml new file mode 100644 index 000000000..e3a9d143c --- /dev/null +++ b/test/data/recordings/TestAccClientMetadataBehavior.yaml @@ -0,0 +1,578 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 114 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test - Metadata - TestAccClientMetadataBehavior","client_metadata":{"bar":"baz","foo":"zoo"}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz","foo":"zoo"},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz","foo":"zoo"},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz","foo":"zoo"},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz","foo":"zoo"},"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: 1ms + - id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 143 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test - Metadata - TestAccClientMetadataBehavior","client_metadata":{"bar":null,"foo":"newZooButOldFoo","newBar":"newBaz"}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance Test - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"foo":"newZooButOldFoo","newBar":"newBaz"},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"foo":"newZooButOldFoo","newBar":"newBaz"},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"foo":"newZooButOldFoo","newBar":"newBaz"},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"foo":"newZooButOldFoo","newBar":"newBaz"},"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: 1ms + - id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 127 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test - Metadata - TestAccClientMetadataBehavior","client_metadata":{"bar":"baz","foo":null,"newBar":null}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance Test - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz"},"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: 1ms + - id: 9 + 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz"},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz"},"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: 1ms + - id: 11 + 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{"bar":"baz"},"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: 1ms + - id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 101 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test - Metadata - TestAccClientMetadataBehavior","client_metadata":{"bar":null}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"name":"Acceptance Test - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{},"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: 1ms + - 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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 - Metadata - TestAccClientMetadataBehavior","client_id":"HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV","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,"cross_origin_auth":false,"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"custom_login_page_on":true,"client_metadata":{},"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: 1ms + - id: 15 + 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/latest + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/HbMthbbrdYM0QhRr4ef07GAOdzMaRkMV + 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: 1ms