Skip to content

Commit

Permalink
DXCDT-518: Stop requiring read:client_keys permission for reading t…
Browse files Browse the repository at this point in the history
…he `auth0_client_credentials` resource (#795)
  • Loading branch information
sergiught authored Aug 30, 2023
1 parent bb277ab commit a9e6cf9
Show file tree
Hide file tree
Showing 5 changed files with 425 additions and 434 deletions.
11 changes: 1 addition & 10 deletions internal/auth0/client/resource_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,7 @@ func createClientCredentials(ctx context.Context, data *schema.ResourceData, met
func readClientCredentials(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics {
api := meta.(*config.Config).GetAPI()

client, err := api.Client.Read(
ctx,
data.Id(),
management.IncludeFields(
"client_id",
"client_secret",
"token_endpoint_auth_method",
"client_authentication_methods",
),
)
client, err := api.Client.Read(ctx, data.Id())
if err != nil {
return diag.FromErr(internalError.HandleAPIError(data, err))
}
Expand Down
4 changes: 2 additions & 2 deletions test/data/recordings/TestAccAllowUpdatingTheClientSecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/F1b9w2ByGOOOMZ2ocQ76K5jjM2VqMUCk?fields=client_id%2Cclient_secret%2Ctoken_endpoint_auth_method%2Cclient_authentication_methods&include_fields=true
url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/F1b9w2ByGOOOMZ2ocQ76K5jjM2VqMUCk
method: GET
response:
proto: HTTP/2.0
Expand Down Expand Up @@ -272,7 +272,7 @@ interactions:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/F1b9w2ByGOOOMZ2ocQ76K5jjM2VqMUCk?fields=client_id%2Cclient_secret%2Ctoken_endpoint_auth_method%2Cclient_authentication_methods&include_fields=true
url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/clients/F1b9w2ByGOOOMZ2ocQ76K5jjM2VqMUCk
method: GET
response:
proto: HTTP/2.0
Expand Down
Loading

0 comments on commit a9e6cf9

Please sign in to comment.