From 9bd99e2fef6885741b73cda45cb825805f89507e Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Thu, 18 May 2023 18:05:33 -0400 Subject: [PATCH 01/11] Initial commit for auth0_resource_server_scope resource --- docs/resources/resource_server.md | 2 +- docs/resources/resource_server_scope.md | 65 +++++++ .../auth0_resource_server_scope/import.sh | 7 + .../auth0_resource_server_scope/resource.tf | 21 +++ internal/auth0/resourceserver/resource.go | 11 +- .../auth0/resourceserver/resource_scope.go | 177 ++++++++++++++++++ .../resourceserver/resource_scope_test.go | 97 ++++++++++ internal/provider/provider.go | 1 + 8 files changed, 378 insertions(+), 3 deletions(-) create mode 100644 docs/resources/resource_server_scope.md create mode 100644 examples/resources/auth0_resource_server_scope/import.sh create mode 100644 examples/resources/auth0_resource_server_scope/resource.tf create mode 100644 internal/auth0/resourceserver/resource_scope.go create mode 100644 internal/auth0/resourceserver/resource_scope_test.go diff --git a/docs/resources/resource_server.md b/docs/resources/resource_server.md index 709fd9e64..4ee16e75f 100644 --- a/docs/resources/resource_server.md +++ b/docs/resources/resource_server.md @@ -44,7 +44,7 @@ resource "auth0_resource_server" "my_resource_server" { - `allow_offline_access` (Boolean) Indicates whether refresh tokens can be issued for this resource server. - `enforce_policies` (Boolean) If this setting is enabled, RBAC authorization policies will be enforced for this API. Role and permission assignments will be evaluated during the login transaction. - `name` (String) Friendly name for the resource server. Cannot include `<` or `>` characters. -- `scopes` (Block Set) List of permissions (scopes) used by this resource server. (see [below for nested schema](#nestedblock--scopes)) +- `scopes` (Block Set, Deprecated) List of permissions (scopes) used by this resource server. (see [below for nested schema](#nestedblock--scopes)) - `signing_alg` (String) Algorithm used to sign JWTs. Options include `HS256` and `RS256`. - `signing_secret` (String) Secret used to sign tokens when using symmetric algorithms (HS256). - `skip_consent_for_verifiable_first_party_clients` (Boolean) Indicates whether to skip user consent for applications flagged as first party. diff --git a/docs/resources/resource_server_scope.md b/docs/resources/resource_server_scope.md new file mode 100644 index 000000000..16897562d --- /dev/null +++ b/docs/resources/resource_server_scope.md @@ -0,0 +1,65 @@ +--- +page_title: "Resource: auth0_resource_server_scope" +description: |- + With this resource, you can manage user permissions. +--- + +# Resource: auth0_resource_server_scope + +With this resource, you can manage user permissions. + +## Example Usage + +```terraform +resource "auth0_resource_server" "resource_server" { + name = "Example Resource Server (Managed by Terraform)" + identifier = "https://api.example.com" + + # Until we remove the ability to operate changes on + # the scopes field it is important to have this + # block in the config, to avoid diffing issues. + lifecycle { + ignore_changes = [scopes] + } +} + +resource "auth0_resource_server_scope" "read_posts" { + resource_server_identifier = auth0_resource_server.resource_server.identifier + scope = "read:posts" +} + +resource "auth0_resource_server_scope" "write_posts" { + resource_server_identifier = auth0_resource_server.resource_server.identifier + scope = "write:posts" +} +``` + + +## Schema + +### Required + +- `resource_server_identifier` (String) Identifier of the resource server that the scope is associated with. +- `scope` (String) Name of the scope. + +### Optional + +- `description` (String) Description of the scope (permission). + +### Read-Only + +- `id` (String) The ID of this resource. + +## Import + +Import is supported using the following syntax: + +```shell +# This resource can be imported by specifying the +# resource identifier and scope name separated by "::" (note the double colon) +# :: + +# +# Example: +terraform import auth0_resource_server_scope.scope "https://api.travel0.com/v1::read:posts" +``` diff --git a/examples/resources/auth0_resource_server_scope/import.sh b/examples/resources/auth0_resource_server_scope/import.sh new file mode 100644 index 000000000..bf7dca2e2 --- /dev/null +++ b/examples/resources/auth0_resource_server_scope/import.sh @@ -0,0 +1,7 @@ +# This resource can be imported by specifying the +# resource identifier and scope name separated by "::" (note the double colon) +# :: + +# +# Example: +terraform import auth0_resource_server_scope.scope "https://api.travel0.com/v1::read:posts" diff --git a/examples/resources/auth0_resource_server_scope/resource.tf b/examples/resources/auth0_resource_server_scope/resource.tf new file mode 100644 index 000000000..876dcd831 --- /dev/null +++ b/examples/resources/auth0_resource_server_scope/resource.tf @@ -0,0 +1,21 @@ +resource "auth0_resource_server" "resource_server" { + name = "Example Resource Server (Managed by Terraform)" + identifier = "https://api.example.com" + + # Until we remove the ability to operate changes on + # the scopes field it is important to have this + # block in the config, to avoid diffing issues. + lifecycle { + ignore_changes = [scopes] + } +} + +resource "auth0_resource_server_scope" "read_posts" { + resource_server_identifier = auth0_resource_server.resource_server.identifier + scope = "read:posts" +} + +resource "auth0_resource_server_scope" "write_posts" { + resource_server_identifier = auth0_resource_server.resource_server.identifier + scope = "write:posts" +} diff --git a/internal/auth0/resourceserver/resource.go b/internal/auth0/resourceserver/resource.go index cc5d291b5..cc4a8f563 100644 --- a/internal/auth0/resourceserver/resource.go +++ b/internal/auth0/resourceserver/resource.go @@ -43,8 +43,11 @@ func NewResource() *schema.Resource { "for authorization calls. Cannot be changed once set.", }, "scopes": { - Type: schema.TypeSet, - Optional: true, + Type: schema.TypeSet, + Optional: true, + Deprecated: "Managing scopes through the `scopes` attribute is deprecated and it will be changed to read-only in a future version. " + + "Migrate to the `auth0_resource_server_scope` resource to manage role scopes instead. " + + "Check the [MIGRATION GUIDE](https://github.com/auth0/terraform-provider-auth0/blob/main/MIGRATION_GUIDE.md) for more info.", Description: "List of permissions (scopes) used by this resource server.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -198,8 +201,12 @@ func readResourceServer(_ context.Context, d *schema.ResourceData, m interface{} func updateResourceServer(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { api := m.(*config.Config).GetAPI() + mutex := m.(*config.Config).GetMutex() resourceServer := expandResourceServer(d) + mutex.Lock(resourceServer.GetIdentifier()) + defer mutex.Unlock(resourceServer.GetIdentifier()) + if err := api.ResourceServer.Update(d.Id(), resourceServer); err != nil { return diag.FromErr(err) } diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go new file mode 100644 index 000000000..0c3840ee7 --- /dev/null +++ b/internal/auth0/resourceserver/resource_scope.go @@ -0,0 +1,177 @@ +package resourceserver + +import ( + "context" + "fmt" + "net/http" + "strings" + + "github.com/auth0/go-auth0/management" + "github.com/hashicorp/go-multierror" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + + "github.com/auth0/terraform-provider-auth0/internal/config" +) + +// NewScopeResource will return a new auth0_connection_client resource. +func NewScopeResource() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scope": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Name of the scope.", + }, + "resource_server_identifier": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Identifier of the resource server that the scope is associated with.", + }, + "description": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Description: "Description of the scope (permission).", + }, + }, + CreateContext: createResourceServerScope, + ReadContext: readResourceServerScope, + DeleteContext: deleteResourceServerScope, + Importer: &schema.ResourceImporter{ + StateContext: importResourceServerScope, + }, + Description: "With this resource, you can manage user permissions.", + } +} + +func createResourceServerScope(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*config.Config).GetAPI() + mutex := meta.(*config.Config).GetMutex() + + resourceServerID := data.Get("resource_server_identifier").(string) + scope := data.Get("scope").(string) + + mutex.Lock(resourceServerID) + defer mutex.Unlock(resourceServerID) + + currentScopes, err := api.ResourceServer.Read(resourceServerID) + if err != nil { + return diag.FromErr(err) + } + + scopes := append(*currentScopes.Scopes, management.ResourceServerScope{ + Value: &scope, + }) + resourceServer := management.ResourceServer{ + Scopes: &scopes, + } + + if err := api.ResourceServer.Update(resourceServerID, &resourceServer); err != nil { + return diag.FromErr(err) + } + + data.SetId(fmt.Sprintf(`%s::%s`, resourceServerID, scope)) + + return readResourceServerScope(ctx, data, meta) +} + +func readResourceServerScope(_ context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*config.Config).GetAPI() + + resourceServerID := data.Get("resource_server_identifier").(string) + scope := data.Get("scope").(string) + + existingScopes, err := api.ResourceServer.Read(resourceServerID) + if err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + return diag.FromErr(err) + } + + for _, p := range existingScopes.GetScopes() { + if p.GetValue() == scope { + result := multierror.Append( + data.Set("description", p.GetDescription()), + ) + return diag.FromErr(result.ErrorOrNil()) + } + } + + data.SetId("") + return nil +} + +func deleteResourceServerScope(_ context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*config.Config).GetAPI() + mutex := meta.(*config.Config).GetMutex() + + resourceServerID := data.Get("resource_server_identifier").(string) + scope := data.Get("scope").(string) + + mutex.Lock(resourceServerID) + defer mutex.Unlock(resourceServerID) + + existingScopes, err := api.ResourceServer.Read(resourceServerID) + if err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + return diag.FromErr(err) + } + + updateScopes := []management.ResourceServerScope{} + for _, p := range existingScopes.GetScopes() { + if p.GetValue() != scope { + updateScopes = append(updateScopes, p) + } + } + + if err := api.ResourceServer.Update( + resourceServerID, + &management.ResourceServer{ + Scopes: &updateScopes, + }, + ); err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + return diag.FromErr(err) + } + + data.SetId("") + return nil +} + +func importResourceServerScope( + _ context.Context, + data *schema.ResourceData, + _ interface{}, +) ([]*schema.ResourceData, error) { + rawID := data.Id() + if rawID == "" { + return nil, fmt.Errorf("ID cannot be empty") + } + + if !strings.Contains(rawID, "::") { + return nil, fmt.Errorf("ID must be formatted as ::") + } + + idPair := strings.Split(rawID, "::") + if len(idPair) != 3 { + return nil, fmt.Errorf("ID must be formatted as ::") + } + + result := multierror.Append( + data.Set("resource_server_identifier", idPair[0]), + data.Set("scope", idPair[1]), + ) + + return []*schema.ResourceData{data}, result.ErrorOrNil() +} diff --git a/internal/auth0/resourceserver/resource_scope_test.go b/internal/auth0/resourceserver/resource_scope_test.go new file mode 100644 index 000000000..eb0d557e6 --- /dev/null +++ b/internal/auth0/resourceserver/resource_scope_test.go @@ -0,0 +1,97 @@ +package resourceserver_test + +import ( + "strings" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + "github.com/auth0/terraform-provider-auth0/internal/acctest" +) + +const givenAResourceServer = ` +resource "auth0_resource_server" "resource_server" { + name = "Acceptance Test - {{.testName}}" + identifier = "https://uat.api.terraform-provider-auth0.com/{{.testName}}" + + lifecycle { + ignore_changes = [ scopes ] + } +} +` + +const givenAScope = ` +resource "auth0_resource_server_scope" "read_posts" { + scope = "read:posts" + resource_server_identifier = auth0_resource_server.resource_server.identifier +} +` + +const givenAnotherScope = ` +resource "auth0_resource_server_scope" "write_posts" { + depends_on = [ auth0_resource_server_scope.read_posts ] + + scope = "write:posts" + resource_server_identifier = auth0_resource_server.resource_server.identifier +} +` + +const testAccNoScopesAssigned = givenAResourceServer +const testAccOneScopeAssigned = givenAResourceServer + givenAScope + `data "auth0_resource_server" "resource_server" { + depends_on = [ auth0_resource_server_scope.read_posts ] + identifier = auth0_resource_server.resource_server.identifier +}` + +const testAccTwoScopesAssigned = givenAResourceServer + givenAScope + givenAnotherScope + `data "auth0_resource_server" "resource_server" { + depends_on = [ auth0_resource_server_scope.read_posts, auth0_resource_server_scope.write_posts] + identifier = auth0_resource_server.resource_server.identifier +}` + +const resourceServerIdentifier = "https://uat.api.terraform-provider-auth0.com/testaccuserpermission" + +func TestAccUserPermission(t *testing.T) { + acctest.Test(t, resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: acctest.ParseTestName(testAccNoScopesAssigned, strings.ToLower(t.Name())), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_resource_server.resource_server", "scopes.#", "0"), + ), + }, + { + Config: acctest.ParseTestName(testAccOneScopeAssigned, strings.ToLower(t.Name())), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.#", "1"), + resource.TestCheckResourceAttr("auth0_resource_server_scope.read_posts", "scope", "read:posts"), + resource.TestCheckResourceAttr("auth0_resource_server_scope.read_posts", "resource_server_identifier", resourceServerIdentifier), + ), + }, + { + Config: acctest.ParseTestName(testAccTwoScopesAssigned, strings.ToLower(t.Name())), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.#", "2"), + resource.TestCheckResourceAttr("auth0_resource_server_scope.write_posts", "scope", "write:posts"), + resource.TestCheckResourceAttr("auth0_resource_server_scope.write_posts", "resource_server_identifier", resourceServerIdentifier), + ), + }, + { + Config: acctest.ParseTestName(testAccOneScopeAssigned, strings.ToLower(t.Name())), + }, + { + RefreshState: true, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.#", "1"), + ), + }, + { + Config: acctest.ParseTestName(testAccNoScopesAssigned, strings.ToLower(t.Name())), + }, + { + RefreshState: true, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_resource_server.resource_server", "scopes.#", "0"), + ), + }, + }, + }) +} diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 7777b5c29..43ed1f59e 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -110,6 +110,7 @@ func New() *schema.Provider { "auth0_prompt": prompt.NewResource(), "auth0_prompt_custom_text": prompt.NewCustomTextResource(), "auth0_resource_server": resourceserver.NewResource(), + "auth0_resource_server_scope": resourceserver.NewScopeResource(), "auth0_role": role.NewResource(), "auth0_role_permission": role.NewPermissionResource(), "auth0_role_permissions": role.NewPermissionsResource(), From 177d3279f59df1502dd7a050722ced1b484ab0e3 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Thu, 18 May 2023 20:11:42 -0400 Subject: [PATCH 02/11] Recording test --- .../resourceserver/resource_scope_test.go | 4 +- .../TestAccResourceServerScope.yaml | 1730 +++++++++++++++++ 2 files changed, 1732 insertions(+), 2 deletions(-) create mode 100644 test/data/recordings/TestAccResourceServerScope.yaml diff --git a/internal/auth0/resourceserver/resource_scope_test.go b/internal/auth0/resourceserver/resource_scope_test.go index eb0d557e6..c414bb457 100644 --- a/internal/auth0/resourceserver/resource_scope_test.go +++ b/internal/auth0/resourceserver/resource_scope_test.go @@ -47,9 +47,9 @@ const testAccTwoScopesAssigned = givenAResourceServer + givenAScope + givenAnoth identifier = auth0_resource_server.resource_server.identifier }` -const resourceServerIdentifier = "https://uat.api.terraform-provider-auth0.com/testaccuserpermission" +const resourceServerIdentifier = "https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope" -func TestAccUserPermission(t *testing.T) { +func TestAccResourceServerScope(t *testing.T) { acctest.Test(t, resource.TestCase{ Steps: []resource.TestStep{ { diff --git a/test/data/recordings/TestAccResourceServerScope.yaml b/test/data/recordings/TestAccResourceServerScope.yaml new file mode 100644 index 000000000..97dca411e --- /dev/null +++ b/test/data/recordings/TestAccResourceServerScope.yaml @@ -0,0 +1,1730 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 155 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","scopes":[]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 346 + uncompressed: false + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 201 Created + code: 201 + duration: 167.907041ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 134.680916ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 62.480875ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 68.185667ms + - id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 135.709875ms + - id: 5 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 36 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"scopes":[{"value":"read:posts"}]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 65.853208ms + - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 135.670958ms + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 141.29725ms + - id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 144.268125ms + - 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/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 134.845375ms + - id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 69.17225ms + - 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/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 99.484042ms + - id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 148.400708ms + - id: 13 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 132.396625ms + - id: 14 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 125.411334ms + - id: 15 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 146.49175ms + - id: 16 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 60 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"scopes":[{"value":"read:posts"},{"value":"write:posts"}]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 146.018333ms + - id: 17 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 63.098959ms + - id: 18 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 132.144125ms + - id: 19 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 143.602125ms + - id: 20 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 148.240208ms + - id: 21 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 60.36675ms + - id: 22 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 126.460708ms + - id: 23 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 70.454958ms + - id: 24 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 59.227084ms + - id: 25 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 62.143208ms + - id: 26 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 71.801666ms + - id: 27 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 137.309875ms + - id: 28 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 126.490875ms + - id: 29 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 129.238958ms + - id: 30 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 124.240416ms + - id: 31 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 36 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"scopes":[{"value":"read:posts"}]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 168.2905ms + - id: 32 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 138.005167ms + - id: 33 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 66.00725ms + - id: 34 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 57.953042ms + - id: 35 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 128.86ms + - id: 36 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 56.857958ms + - id: 37 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 140.607958ms + - id: 38 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 60.494ms + - id: 39 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 133.242375ms + - id: 40 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 58.641583ms + - id: 41 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 135.56475ms + - id: 42 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 147.752208ms + - id: 43 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 142.472083ms + - id: 44 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 14 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"scopes":[]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 105.007125ms + - id: 45 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 64.032542ms + - id: 46 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 136.509625ms + - id: 47 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + 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: 207.606458ms From 36b76f5f31af16fe56050b5c84b9ac9be3a01cac Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Thu, 18 May 2023 21:28:15 -0400 Subject: [PATCH 03/11] Stronger tests --- .../auth0/resourceserver/resource_scope.go | 4 +- .../resourceserver/resource_scope_test.go | 12 + .../TestAccResourceServerScope.yaml | 230 +++++++++--------- 3 files changed, 130 insertions(+), 116 deletions(-) diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go index 0c3840ee7..c0c408ab0 100644 --- a/internal/auth0/resourceserver/resource_scope.go +++ b/internal/auth0/resourceserver/resource_scope.go @@ -53,6 +53,7 @@ func createResourceServerScope(ctx context.Context, data *schema.ResourceData, m resourceServerID := data.Get("resource_server_identifier").(string) scope := data.Get("scope").(string) + description := data.Get("description").(string) mutex.Lock(resourceServerID) defer mutex.Unlock(resourceServerID) @@ -63,7 +64,8 @@ func createResourceServerScope(ctx context.Context, data *schema.ResourceData, m } scopes := append(*currentScopes.Scopes, management.ResourceServerScope{ - Value: &scope, + Value: &scope, + Description: &description, }) resourceServer := management.ResourceServer{ Scopes: &scopes, diff --git a/internal/auth0/resourceserver/resource_scope_test.go b/internal/auth0/resourceserver/resource_scope_test.go index c414bb457..d0fbf0c5c 100644 --- a/internal/auth0/resourceserver/resource_scope_test.go +++ b/internal/auth0/resourceserver/resource_scope_test.go @@ -24,6 +24,8 @@ const givenAScope = ` resource "auth0_resource_server_scope" "read_posts" { scope = "read:posts" resource_server_identifier = auth0_resource_server.resource_server.identifier + + description = "Can read posts" } ` @@ -63,7 +65,11 @@ func TestAccResourceServerScope(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.#", "1"), resource.TestCheckResourceAttr("auth0_resource_server_scope.read_posts", "scope", "read:posts"), + resource.TestCheckResourceAttr("auth0_resource_server_scope.read_posts", "description", "Can read posts"), resource.TestCheckResourceAttr("auth0_resource_server_scope.read_posts", "resource_server_identifier", resourceServerIdentifier), + + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.0.value", "read:posts"), + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.0.description", "Can read posts"), ), }, { @@ -71,7 +77,13 @@ func TestAccResourceServerScope(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.#", "2"), resource.TestCheckResourceAttr("auth0_resource_server_scope.write_posts", "scope", "write:posts"), + resource.TestCheckResourceAttr("auth0_resource_server_scope.write_posts", "description", ""), resource.TestCheckResourceAttr("auth0_resource_server_scope.write_posts", "resource_server_identifier", resourceServerIdentifier), + + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.0.value", "write:posts"), + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.0.description", ""), + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.1.value", "read:posts"), + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.1.description", "Can read posts"), ), }, { diff --git a/test/data/recordings/TestAccResourceServerScope.yaml b/test/data/recordings/TestAccResourceServerScope.yaml index 97dca411e..846abacd2 100644 --- a/test/data/recordings/TestAccResourceServerScope.yaml +++ b/test/data/recordings/TestAccResourceServerScope.yaml @@ -30,13 +30,13 @@ interactions: trailer: {} content_length: 346 uncompressed: false - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 167.907041ms + duration: 148.4865ms - id: 1 request: proto: HTTP/1.1 @@ -56,7 +56,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -66,13 +66,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 134.680916ms + duration: 109.78875ms - id: 2 request: proto: HTTP/1.1 @@ -92,7 +92,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -102,13 +102,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 62.480875ms + duration: 153.497459ms - id: 3 request: proto: HTTP/1.1 @@ -128,7 +128,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -138,13 +138,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 68.185667ms + duration: 110.397541ms - id: 4 request: proto: HTTP/1.1 @@ -174,26 +174,26 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 135.709875ms + duration: 112.399875ms - id: 5 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 36 + content_length: 67 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"scopes":[{"value":"read:posts"}]} + {"scopes":[{"value":"read:posts","description":"Can read posts"}]} form: {} headers: Content-Type: @@ -210,13 +210,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 65.853208ms + duration: 104.954333ms - id: 6 request: proto: HTTP/1.1 @@ -246,13 +246,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 135.670958ms + duration: 115.474042ms - id: 7 request: proto: HTTP/1.1 @@ -282,13 +282,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 141.29725ms + duration: 149.7695ms - id: 8 request: proto: HTTP/1.1 @@ -318,13 +318,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 144.268125ms + duration: 112.455833ms - id: 9 request: proto: HTTP/1.1 @@ -344,7 +344,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -354,13 +354,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 134.845375ms + duration: 111.057667ms - id: 10 request: proto: HTTP/1.1 @@ -390,13 +390,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 69.17225ms + duration: 104.680709ms - id: 11 request: proto: HTTP/1.1 @@ -426,13 +426,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 99.484042ms + duration: 110.050542ms - id: 12 request: proto: HTTP/1.1 @@ -462,13 +462,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 148.400708ms + duration: 116.008583ms - id: 13 request: proto: HTTP/1.1 @@ -488,7 +488,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -498,13 +498,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 132.396625ms + duration: 109.773792ms - id: 14 request: proto: HTTP/1.1 @@ -534,13 +534,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 125.411334ms + duration: 111.616917ms - id: 15 request: proto: HTTP/1.1 @@ -570,26 +570,26 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 146.49175ms + duration: 109.167459ms - id: 16 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 60 + content_length: 108 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"scopes":[{"value":"read:posts"},{"value":"write:posts"}]} + {"scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]} form: {} headers: Content-Type: @@ -606,13 +606,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 146.018333ms + duration: 141.841666ms - id: 17 request: proto: HTTP/1.1 @@ -642,13 +642,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 63.098959ms + duration: 103.869667ms - id: 18 request: proto: HTTP/1.1 @@ -678,13 +678,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 132.144125ms + duration: 102.529208ms - id: 19 request: proto: HTTP/1.1 @@ -714,13 +714,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 143.602125ms + duration: 101.311333ms - id: 20 request: proto: HTTP/1.1 @@ -740,7 +740,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -750,13 +750,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 148.240208ms + duration: 102.597583ms - id: 21 request: proto: HTTP/1.1 @@ -786,13 +786,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 60.36675ms + duration: 109.080208ms - id: 22 request: proto: HTTP/1.1 @@ -822,13 +822,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 126.460708ms + duration: 103.171667ms - id: 23 request: proto: HTTP/1.1 @@ -858,13 +858,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 70.454958ms + duration: 106.986334ms - id: 24 request: proto: HTTP/1.1 @@ -894,13 +894,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 59.227084ms + duration: 110.999041ms - id: 25 request: proto: HTTP/1.1 @@ -920,7 +920,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -930,13 +930,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 62.143208ms + duration: 104.738167ms - id: 26 request: proto: HTTP/1.1 @@ -956,7 +956,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -966,13 +966,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 71.801666ms + duration: 106.247ms - id: 27 request: proto: HTTP/1.1 @@ -1002,13 +1002,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 137.309875ms + duration: 101.182791ms - id: 28 request: proto: HTTP/1.1 @@ -1038,13 +1038,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 126.490875ms + duration: 101.354417ms - id: 29 request: proto: HTTP/1.1 @@ -1074,13 +1074,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 129.238958ms + duration: 101.373875ms - id: 30 request: proto: HTTP/1.1 @@ -1110,26 +1110,26 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"},{"value":"write:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 124.240416ms + duration: 102.477125ms - id: 31 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 36 + content_length: 67 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"scopes":[{"value":"read:posts"}]} + {"scopes":[{"value":"read:posts","description":"Can read posts"}]} form: {} headers: Content-Type: @@ -1146,13 +1146,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 168.2905ms + duration: 161.79725ms - id: 32 request: proto: HTTP/1.1 @@ -1182,13 +1182,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 138.005167ms + duration: 107.715584ms - id: 33 request: proto: HTTP/1.1 @@ -1208,7 +1208,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -1218,13 +1218,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 66.00725ms + duration: 105.055209ms - id: 34 request: proto: HTTP/1.1 @@ -1254,13 +1254,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 57.953042ms + duration: 106.858958ms - id: 35 request: proto: HTTP/1.1 @@ -1290,13 +1290,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 128.86ms + duration: 100.934375ms - id: 36 request: proto: HTTP/1.1 @@ -1326,13 +1326,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 56.857958ms + duration: 106.99825ms - id: 37 request: proto: HTTP/1.1 @@ -1352,7 +1352,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -1362,13 +1362,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 140.607958ms + duration: 70.007666ms - id: 38 request: proto: HTTP/1.1 @@ -1398,13 +1398,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 60.494ms + duration: 101.330584ms - id: 39 request: proto: HTTP/1.1 @@ -1434,13 +1434,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 133.242375ms + duration: 143.421333ms - id: 40 request: proto: HTTP/1.1 @@ -1470,13 +1470,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 58.641583ms + duration: 119.410625ms - id: 41 request: proto: HTTP/1.1 @@ -1506,13 +1506,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 135.56475ms + duration: 60.974292ms - id: 42 request: proto: HTTP/1.1 @@ -1532,7 +1532,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -1542,13 +1542,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 147.752208ms + duration: 109.178417ms - id: 43 request: proto: HTTP/1.1 @@ -1578,13 +1578,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts"}]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 142.472083ms + duration: 101.595875ms - id: 44 request: proto: HTTP/1.1 @@ -1614,13 +1614,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 105.007125ms + duration: 115.6295ms - id: 45 request: proto: HTTP/1.1 @@ -1640,7 +1640,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -1650,13 +1650,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 64.032542ms + duration: 100.652833ms - id: 46 request: proto: HTTP/1.1 @@ -1676,7 +1676,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: GET response: proto: HTTP/2.0 @@ -1686,13 +1686,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466be5c6c65a7e3676c7d2d","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 136.509625ms + duration: 101.878209ms - id: 47 request: proto: HTTP/1.1 @@ -1711,7 +1711,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466be5c6c65a7e3676c7d2d + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c method: DELETE response: proto: HTTP/2.0 @@ -1727,4 +1727,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 207.606458ms + duration: 134.422958ms From 6c4a2fdc29fe1f7bdfd37d1843e83280bfa5d02b Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Fri, 19 May 2023 13:47:39 -0400 Subject: [PATCH 04/11] Fixing import --- internal/auth0/resourceserver/resource_scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go index c0c408ab0..7d514a4d0 100644 --- a/internal/auth0/resourceserver/resource_scope.go +++ b/internal/auth0/resourceserver/resource_scope.go @@ -166,7 +166,7 @@ func importResourceServerScope( } idPair := strings.Split(rawID, "::") - if len(idPair) != 3 { + if len(idPair) != 2 { return nil, fmt.Errorf("ID must be formatted as ::") } From 412be020b84ac3bf0cdd82224d2ed84e7786bdb9 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Mon, 22 May 2023 15:39:15 -0400 Subject: [PATCH 05/11] Update internal/auth0/resourceserver/resource_scope.go Co-authored-by: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> --- internal/auth0/resourceserver/resource_scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go index 7d514a4d0..7b2d713d8 100644 --- a/internal/auth0/resourceserver/resource_scope.go +++ b/internal/auth0/resourceserver/resource_scope.go @@ -63,7 +63,7 @@ func createResourceServerScope(ctx context.Context, data *schema.ResourceData, m return diag.FromErr(err) } - scopes := append(*currentScopes.Scopes, management.ResourceServerScope{ + scopes := append(currentScopes.GetScopes(), management.ResourceServerScope{ Value: &scope, Description: &description, }) From 58caeb383db0f6f06a55cda567ebc28127ff5131 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Mon, 22 May 2023 16:17:33 -0400 Subject: [PATCH 06/11] Removing mutex --- internal/auth0/resourceserver/resource_scope.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go index 7b2d713d8..2f3dda30b 100644 --- a/internal/auth0/resourceserver/resource_scope.go +++ b/internal/auth0/resourceserver/resource_scope.go @@ -49,15 +49,11 @@ func NewScopeResource() *schema.Resource { func createResourceServerScope(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { api := meta.(*config.Config).GetAPI() - mutex := meta.(*config.Config).GetMutex() resourceServerID := data.Get("resource_server_identifier").(string) scope := data.Get("scope").(string) description := data.Get("description").(string) - mutex.Lock(resourceServerID) - defer mutex.Unlock(resourceServerID) - currentScopes, err := api.ResourceServer.Read(resourceServerID) if err != nil { return diag.FromErr(err) @@ -110,14 +106,10 @@ func readResourceServerScope(_ context.Context, data *schema.ResourceData, meta func deleteResourceServerScope(_ context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { api := meta.(*config.Config).GetAPI() - mutex := meta.(*config.Config).GetMutex() resourceServerID := data.Get("resource_server_identifier").(string) scope := data.Get("scope").(string) - mutex.Lock(resourceServerID) - defer mutex.Unlock(resourceServerID) - existingScopes, err := api.ResourceServer.Read(resourceServerID) if err != nil { if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { From 878dd20a5baf248be2865892f1e7d57157847df3 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Mon, 22 May 2023 17:50:01 -0400 Subject: [PATCH 07/11] Rerecording test --- .../auth0/resourceserver/resource_scope.go | 50 +- .../resourceserver/resource_scope_test.go | 27 +- .../TestAccResourceServerScope.yaml | 654 ++++++++++++++---- 3 files changed, 598 insertions(+), 133 deletions(-) diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go index 2f3dda30b..e0f7041f1 100644 --- a/internal/auth0/resourceserver/resource_scope.go +++ b/internal/auth0/resourceserver/resource_scope.go @@ -33,11 +33,11 @@ func NewScopeResource() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, - Computed: true, Description: "Description of the scope (permission).", }, }, CreateContext: createResourceServerScope, + UpdateContext: updateResourceServerScope, ReadContext: readResourceServerScope, DeleteContext: deleteResourceServerScope, Importer: &schema.ResourceImporter{ @@ -56,6 +56,10 @@ func createResourceServerScope(ctx context.Context, data *schema.ResourceData, m currentScopes, err := api.ResourceServer.Read(resourceServerID) if err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } return diag.FromErr(err) } @@ -76,6 +80,50 @@ func createResourceServerScope(ctx context.Context, data *schema.ResourceData, m return readResourceServerScope(ctx, data, meta) } +func updateResourceServerScope(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { + api := meta.(*config.Config).GetAPI() + + resourceServerID := data.Get("resource_server_identifier").(string) + scope := data.Get("scope").(string) + newDescription := data.Get("description").(string) + + existingScopes, err := api.ResourceServer.Read(resourceServerID) + if err != nil { + if mErr, ok := err.(management.Error); ok && mErr.Status() == http.StatusNotFound { + data.SetId("") + return nil + } + return diag.FromErr(err) + } + + updatedScopes := []management.ResourceServerScope{} + + found := false + for _, p := range existingScopes.GetScopes() { + updated := p + if p.GetValue() == scope { + found = true + updated.Description = &newDescription + } + updatedScopes = append(updatedScopes, updated) + } + + if !found { + data.SetId("") + return nil + } + + if err := api.ResourceServer.Update(resourceServerID, &management.ResourceServer{ + Scopes: &updatedScopes, + }); err != nil { + return diag.FromErr(err) + } + + data.SetId(fmt.Sprintf(`%s::%s`, resourceServerID, scope)) + + return readResourceServerScope(ctx, data, meta) +} + func readResourceServerScope(_ context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics { api := meta.(*config.Config).GetAPI() diff --git a/internal/auth0/resourceserver/resource_scope_test.go b/internal/auth0/resourceserver/resource_scope_test.go index d0fbf0c5c..fb0f4530e 100644 --- a/internal/auth0/resourceserver/resource_scope_test.go +++ b/internal/auth0/resourceserver/resource_scope_test.go @@ -29,6 +29,15 @@ resource "auth0_resource_server_scope" "read_posts" { } ` +const givenAnUpdatedScope = ` +resource "auth0_resource_server_scope" "read_posts" { + scope = "read:posts" + resource_server_identifier = auth0_resource_server.resource_server.identifier + + description = "Can read posts from API" +} +` + const givenAnotherScope = ` resource "auth0_resource_server_scope" "write_posts" { depends_on = [ auth0_resource_server_scope.read_posts ] @@ -44,7 +53,12 @@ const testAccOneScopeAssigned = givenAResourceServer + givenAScope + `data "auth identifier = auth0_resource_server.resource_server.identifier }` -const testAccTwoScopesAssigned = givenAResourceServer + givenAScope + givenAnotherScope + `data "auth0_resource_server" "resource_server" { +const testAccOneScopeAssignedWithUpdate = givenAResourceServer + givenAnUpdatedScope + `data "auth0_resource_server" "resource_server" { + depends_on = [ auth0_resource_server_scope.read_posts ] + identifier = auth0_resource_server.resource_server.identifier +}` + +const testAccTwoScopesAssigned = givenAResourceServer + givenAnUpdatedScope + givenAnotherScope + `data "auth0_resource_server" "resource_server" { depends_on = [ auth0_resource_server_scope.read_posts, auth0_resource_server_scope.write_posts] identifier = auth0_resource_server.resource_server.identifier }` @@ -72,6 +86,13 @@ func TestAccResourceServerScope(t *testing.T) { resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.0.description", "Can read posts"), ), }, + { + Config: acctest.ParseTestName(testAccOneScopeAssignedWithUpdate, strings.ToLower(t.Name())), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.#", "1"), + resource.TestCheckResourceAttr("auth0_resource_server_scope.read_posts", "description", "Can read posts from API"), + ), + }, { Config: acctest.ParseTestName(testAccTwoScopesAssigned, strings.ToLower(t.Name())), Check: resource.ComposeTestCheckFunc( @@ -83,11 +104,11 @@ func TestAccResourceServerScope(t *testing.T) { resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.0.value", "write:posts"), resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.0.description", ""), resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.1.value", "read:posts"), - resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.1.description", "Can read posts"), + resource.TestCheckResourceAttr("data.auth0_resource_server.resource_server", "scopes.1.description", "Can read posts from API"), ), }, { - Config: acctest.ParseTestName(testAccOneScopeAssigned, strings.ToLower(t.Name())), + Config: acctest.ParseTestName(testAccOneScopeAssignedWithUpdate, strings.ToLower(t.Name())), }, { RefreshState: true, diff --git a/test/data/recordings/TestAccResourceServerScope.yaml b/test/data/recordings/TestAccResourceServerScope.yaml index 846abacd2..3d2c6b9d2 100644 --- a/test/data/recordings/TestAccResourceServerScope.yaml +++ b/test/data/recordings/TestAccResourceServerScope.yaml @@ -30,13 +30,13 @@ interactions: trailer: {} content_length: 346 uncompressed: false - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 148.4865ms + duration: 124.453791ms - id: 1 request: proto: HTTP/1.1 @@ -56,7 +56,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -66,13 +66,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 109.78875ms + duration: 104.010958ms - id: 2 request: proto: HTTP/1.1 @@ -92,7 +92,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -102,13 +102,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 153.497459ms + duration: 136.039875ms - id: 3 request: proto: HTTP/1.1 @@ -128,7 +128,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -138,13 +138,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 110.397541ms + duration: 114.441542ms - id: 4 request: proto: HTTP/1.1 @@ -174,13 +174,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 112.399875ms + duration: 99.721833ms - id: 5 request: proto: HTTP/1.1 @@ -210,13 +210,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 104.954333ms + duration: 99.151708ms - id: 6 request: proto: HTTP/1.1 @@ -246,13 +246,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 115.474042ms + duration: 61.51175ms - id: 7 request: proto: HTTP/1.1 @@ -282,13 +282,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 149.7695ms + duration: 112.525375ms - id: 8 request: proto: HTTP/1.1 @@ -318,13 +318,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 112.455833ms + duration: 130.109542ms - id: 9 request: proto: HTTP/1.1 @@ -344,7 +344,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -354,13 +354,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 111.057667ms + duration: 96.8505ms - id: 10 request: proto: HTTP/1.1 @@ -390,13 +390,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 104.680709ms + duration: 104.600792ms - id: 11 request: proto: HTTP/1.1 @@ -426,13 +426,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 110.050542ms + duration: 110.375125ms - id: 12 request: proto: HTTP/1.1 @@ -462,13 +462,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 116.008583ms + duration: 101.29275ms - id: 13 request: proto: HTTP/1.1 @@ -488,7 +488,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -498,13 +498,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 109.773792ms + duration: 103.883958ms - id: 14 request: proto: HTTP/1.1 @@ -534,13 +534,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 111.616917ms + duration: 121.660792ms - id: 15 request: proto: HTTP/1.1 @@ -570,26 +570,26 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 109.167459ms + duration: 102.259083ms - id: 16 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 108 + content_length: 76 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]} + {"scopes":[{"value":"read:posts","description":"Can read posts from API"}]} form: {} headers: Content-Type: @@ -606,13 +606,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 141.841666ms + duration: 104.692166ms - id: 17 request: proto: HTTP/1.1 @@ -642,13 +642,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 103.869667ms + duration: 110.959834ms - id: 18 request: proto: HTTP/1.1 @@ -678,13 +678,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 102.529208ms + duration: 100.620667ms - id: 19 request: proto: HTTP/1.1 @@ -714,13 +714,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 101.311333ms + duration: 134.971ms - id: 20 request: proto: HTTP/1.1 @@ -740,7 +740,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -750,13 +750,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 102.597583ms + duration: 102.653875ms - id: 21 request: proto: HTTP/1.1 @@ -786,13 +786,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 109.080208ms + duration: 112.996167ms - id: 22 request: proto: HTTP/1.1 @@ -812,7 +812,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -822,13 +822,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 103.171667ms + duration: 105.354666ms - id: 23 request: proto: HTTP/1.1 @@ -858,13 +858,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 106.986334ms + duration: 104.21825ms - id: 24 request: proto: HTTP/1.1 @@ -884,7 +884,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -894,13 +894,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 110.999041ms + duration: 97.492959ms - id: 25 request: proto: HTTP/1.1 @@ -930,13 +930,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 104.738167ms + duration: 92.677417ms - id: 26 request: proto: HTTP/1.1 @@ -956,7 +956,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -966,26 +966,26 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 106.247ms + duration: 99.707458ms - id: 27 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 5 + content_length: 117 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - null + {"scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]} form: {} headers: Content-Type: @@ -993,7 +993,7 @@ interactions: User-Agent: - Go-Auth0-SDK/0.17.1 url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope - method: GET + method: PATCH response: proto: HTTP/2.0 proto_major: 2 @@ -1002,13 +1002,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 101.182791ms + duration: 121.260625ms - id: 28 request: proto: HTTP/1.1 @@ -1028,7 +1028,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -1038,13 +1038,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 101.354417ms + duration: 105.279917ms - id: 29 request: proto: HTTP/1.1 @@ -1074,13 +1074,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 101.373875ms + duration: 99.937042ms - id: 30 request: proto: HTTP/1.1 @@ -1100,7 +1100,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -1110,34 +1110,34 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"},{"value":"write:posts","description":""}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 102.477125ms + duration: 101.030667ms - id: 31 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 67 + content_length: 5 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"scopes":[{"value":"read:posts","description":"Can read posts"}]} + null form: {} headers: Content-Type: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope - method: PATCH + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b + method: GET response: proto: HTTP/2.0 proto_major: 2 @@ -1146,13 +1146,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 161.79725ms + duration: 101.098917ms - id: 32 request: proto: HTTP/1.1 @@ -1172,7 +1172,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -1182,13 +1182,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 107.715584ms + duration: 98.525875ms - id: 33 request: proto: HTTP/1.1 @@ -1208,7 +1208,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -1218,13 +1218,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 105.055209ms + duration: 101.969292ms - id: 34 request: proto: HTTP/1.1 @@ -1244,7 +1244,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -1254,13 +1254,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 106.858958ms + duration: 106.158375ms - id: 35 request: proto: HTTP/1.1 @@ -1290,13 +1290,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 100.934375ms + duration: 99.982291ms - id: 36 request: proto: HTTP/1.1 @@ -1316,7 +1316,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -1326,13 +1326,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 106.99825ms + duration: 99.101875ms - id: 37 request: proto: HTTP/1.1 @@ -1352,7 +1352,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -1362,13 +1362,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 70.007666ms + duration: 133.572959ms - id: 38 request: proto: HTTP/1.1 @@ -1398,13 +1398,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 101.330584ms + duration: 94.161375ms - id: 39 request: proto: HTTP/1.1 @@ -1434,13 +1434,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 143.421333ms + duration: 135.92925ms - id: 40 request: proto: HTTP/1.1 @@ -1470,13 +1470,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 119.410625ms + duration: 131.616709ms - id: 41 request: proto: HTTP/1.1 @@ -1506,14 +1506,50 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"},{"value":"write:posts","description":""}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 60.974292ms + duration: 107.400083ms - id: 42 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 76 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"scopes":[{"value":"read:posts","description":"Can read posts from API"}]} + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 155.540209ms + - id: 43 request: proto: HTTP/1.1 proto_major: 1 @@ -1532,7 +1568,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope method: GET response: proto: HTTP/2.0 @@ -1542,14 +1578,50 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 109.178417ms - - id: 43 + duration: 102.546916ms + - id: 44 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 104.542542ms + - id: 45 request: proto: HTTP/1.1 proto_major: 1 @@ -1578,14 +1650,338 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts"}]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 101.595875ms - - id: 44 + duration: 97.858541ms + - id: 46 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 109.463208ms + - id: 47 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 99.643083ms + - id: 48 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 97.389458ms + - id: 49 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 95.357417ms + - id: 50 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 103.832583ms + - id: 51 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%252F%252Fuat.api.terraform-provider-auth0.com%252Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 99.246ms + - id: 52 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 92.696667ms + - id: 53 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 97.754875ms + - id: 54 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [] + trailer: {} + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: {} + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.17.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/https:%2F%2Fuat.api.terraform-provider-auth0.com%2Ftestaccresourceserverscope + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: -1 + uncompressed: true + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[{"value":"read:posts","description":"Can read posts from API"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 103.118375ms + - id: 55 request: proto: HTTP/1.1 proto_major: 1 @@ -1614,14 +2010,14 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 115.6295ms - - id: 45 + duration: 112.519292ms + - id: 56 request: proto: HTTP/1.1 proto_major: 1 @@ -1640,7 +2036,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -1650,14 +2046,14 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 100.652833ms - - id: 46 + duration: 99.001708ms + - id: 57 request: proto: HTTP/1.1 proto_major: 1 @@ -1676,7 +2072,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: GET response: proto: HTTP/2.0 @@ -1686,14 +2082,14 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"6466d09a7d5d10ef63dece6c","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' + body: '{"id":"646be36d826801d224b4df2b","name":"Acceptance Test - testaccresourceserverscope","identifier":"https://uat.api.terraform-provider-auth0.com/testaccresourceserverscope","allow_offline_access":false,"skip_consent_for_verifiable_first_party_clients":false,"token_lifetime":86400,"token_lifetime_for_web":7200,"signing_alg":"RS256","scopes":[]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 101.878209ms - - id: 47 + duration: 105.180625ms + - id: 58 request: proto: HTTP/1.1 proto_major: 1 @@ -1711,7 +2107,7 @@ interactions: - application/json User-Agent: - Go-Auth0-SDK/0.17.1 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/6466d09a7d5d10ef63dece6c + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/resource-servers/646be36d826801d224b4df2b method: DELETE response: proto: HTTP/2.0 @@ -1727,4 +2123,4 @@ interactions: - application/json; charset=utf-8 status: 204 No Content code: 204 - duration: 134.422958ms + duration: 142.590458ms From 109ca8a7c63a8959ee55d8603f1215b8d48dc783 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Mon, 22 May 2023 17:58:12 -0400 Subject: [PATCH 08/11] Fixing docs --- docs/resources/resource_server_scope.md | 6 +++--- internal/auth0/resourceserver/resource_scope.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/resources/resource_server_scope.md b/docs/resources/resource_server_scope.md index 16897562d..b38f05fee 100644 --- a/docs/resources/resource_server_scope.md +++ b/docs/resources/resource_server_scope.md @@ -1,12 +1,12 @@ --- page_title: "Resource: auth0_resource_server_scope" description: |- - With this resource, you can manage user permissions. + With this resource, you can manage scopes (permissions) associated with a resource server (API). --- # Resource: auth0_resource_server_scope -With this resource, you can manage user permissions. +With this resource, you can manage scopes (permissions) associated with a resource server (API). ## Example Usage @@ -39,7 +39,7 @@ resource "auth0_resource_server_scope" "write_posts" { ### Required -- `resource_server_identifier` (String) Identifier of the resource server that the scope is associated with. +- `resource_server_identifier` (String) Identifier of the resource server that the scope (permission) is associated with. - `scope` (String) Name of the scope. ### Optional diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go index e0f7041f1..ee7d2dfa4 100644 --- a/internal/auth0/resourceserver/resource_scope.go +++ b/internal/auth0/resourceserver/resource_scope.go @@ -28,7 +28,7 @@ func NewScopeResource() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "Identifier of the resource server that the scope is associated with.", + Description: "Identifier of the resource server that the scope (permission) is associated with.", }, "description": { Type: schema.TypeString, @@ -43,7 +43,7 @@ func NewScopeResource() *schema.Resource { Importer: &schema.ResourceImporter{ StateContext: importResourceServerScope, }, - Description: "With this resource, you can manage user permissions.", + Description: "With this resource, you can manage scopes (permissions) associated with a resource server (API).", } } From 268eabf73cae8fcd077b889f3e815f63205c3142 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Mon, 22 May 2023 18:19:26 -0400 Subject: [PATCH 09/11] Updating migration guide --- MIGRATION_GUIDE.md | 71 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 5 deletions(-) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 835700bc0..6a4ceaad2 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -8,14 +8,13 @@ automated workflows before upgrading. ### Deprecations - [Client Authentication Method](#client-authentication-method) - +- [Resource Server Scopes](#resource-server-scopes) #### Client Authentication Method - The `token_endpoint_auth_method` field on the `auth0_client` resource will continue to be available for managing the -client's authentication method. However, to ensure a smooth transition when we eventually remove the capability to -manage the authentication method through this field, we recommend proactively migrating to the newly introduced +client's authentication method. However, to ensure a smooth transition when we eventually remove the capability to +manage the authentication method through this field, we recommend proactively migrating to the newly introduced `auth0_client_credentials` resource as this will also give you the possibility of managing the client secret. This will help you stay prepared for future changes. @@ -31,7 +30,7 @@ This will help you stay prepared for future changes. # Example: resource "auth0_client" "my_client" { name = "My Client" - + token_endpoint_auth_method = "client_secret_post" } ``` @@ -56,6 +55,68 @@ resource "auth0_client_credentials" "test" { +#### Resource Server Scopes + +The `scopes` field on the `auth0_resource_server` resource will continue to be available for managing resource server scopes. However, to ensure a smooth transition when we eventually remove the capability to manage scopes through this field, we recommend proactively migrating to the newly introduced `auth0_resource_server_scope` resource. This will help you stay prepared for future changes. + + + + + + + + + + +
Before (v0.47.0)After (v0.48.0)
+ +```terraform +resource auth0_resource_server api { + name = "Example API" + identifier = "https://api.travel0.com/" + + scopes { + value = "read:posts" + description = "Can read posts" + } + + scopes { + value = "write:posts" + description = "Can write posts" + } +} +``` + + + +```terraform +resource auth0_resource_server api { + name = "Example API" + identifier = "https://api.travel0.com/" + + # Until we remove the ability to operate changes on + # the scopes field it is important to have this + # block in the config, to avoid diffing issues. + lifecycle { + ignore_changes = [scopes] + } +} + +resource auth0_resource_server_scope read_posts { + resource_server_identifier = auth0_resource_server.api.identifier + scope = "read:posts" + description = "Can read posts" +} + +resource auth0_resource_server_scope write_posts { + resource_server_identifier = auth0_resource_server.api.identifier + scope = "write:posts" + description = "Can write posts" +} +``` + +
+ ## Upgrading from v0.46.0 → v0.47.0 There are deprecations in this update. Please ensure you read this guide thoroughly and prepare your potential From 9d4e239c356ee967c748f96041870414f7291183 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Tue, 23 May 2023 16:28:46 +0200 Subject: [PATCH 10/11] Update internal/auth0/resourceserver/resource_scope.go --- internal/auth0/resourceserver/resource_scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auth0/resourceserver/resource_scope.go b/internal/auth0/resourceserver/resource_scope.go index ee7d2dfa4..48ede6aa1 100644 --- a/internal/auth0/resourceserver/resource_scope.go +++ b/internal/auth0/resourceserver/resource_scope.go @@ -22,7 +22,7 @@ func NewScopeResource() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "Name of the scope.", + Description: "Name of the scope (permission).", }, "resource_server_identifier": { Type: schema.TypeString, From b3363cfb09bd988e4af336a9e1d2b8fc8693e6a2 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Tue, 23 May 2023 16:29:23 +0200 Subject: [PATCH 11/11] Update docs/resources/resource_server_scope.md --- docs/resources/resource_server_scope.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/resource_server_scope.md b/docs/resources/resource_server_scope.md index b38f05fee..0e83a6349 100644 --- a/docs/resources/resource_server_scope.md +++ b/docs/resources/resource_server_scope.md @@ -40,7 +40,7 @@ resource "auth0_resource_server_scope" "write_posts" { ### Required - `resource_server_identifier` (String) Identifier of the resource server that the scope (permission) is associated with. -- `scope` (String) Name of the scope. +- `scope` (String) Name of the scope (permission). ### Optional