From 08e9451651eb77092c9764a810c53d0ec266e162 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Fri, 14 Oct 2022 14:16:35 +0200 Subject: [PATCH] Add client_aliases to client resource --- docs/data-sources/client.md | 1 + docs/data-sources/global_client.md | 1 + docs/resources/client.md | 1 + docs/resources/connection.md | 2 +- docs/resources/global_client.md | 1 + .../auth0_connection/resource_with_oauth2.tf | 2 +- internal/provider/resource_auth0_client.go | 9 +++ .../provider/resource_auth0_client_test.go | 6 ++ internal/provider/structure_auth0_client.go | 1 + test/data/recordings/TestAccClient.yaml | 76 +++++++++---------- 10 files changed, 60 insertions(+), 40 deletions(-) diff --git a/docs/data-sources/client.md b/docs/data-sources/client.md index 7438cdbc0..0cebf1b67 100644 --- a/docs/data-sources/client.md +++ b/docs/data-sources/client.md @@ -38,6 +38,7 @@ data "auth0_client" "some-client-by-id" { - `allowed_origins` (List of String) URLs that represent valid origins for cross-origin resource sharing. By default, all your callback URLs will be allowed. - `app_type` (String) Type of application the client represents. Possible values are: `native`, `spa`, `regular_web`, `non_interactive`, `sso_integration`. Specific SSO integrations types accepted as well are: `rms`, `box`, `cloudbees`, `concur`, `dropbox`, `mscrm`, `echosign`, `egnyte`, `newrelic`, `office365`, `salesforce`, `sentry`, `sharepoint`, `slack`, `springcm`, `zendesk`, `zoom`. - `callbacks` (List of String) URLs that Auth0 may call back to after a user authenticates for the client. Make sure to specify the protocol (https://) otherwise the callback may fail in some cases. With the exception of custom URI schemes for native clients, all callbacks should use protocol https://. +- `client_aliases` (List of String) List of audiences/realms for SAML protocol. Used by the wsfed addon. - `client_metadata` (Map of String) Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: `:,-+=_*?"/\()<>@ [Tab] [Space]`. - `client_secret` (String) Secret for the client. Keep this private. To access this attribute you need to add the `read:client_keys` scope to the Terraform client. Otherwise, the attribute will contain an empty string. - `cross_origin_auth` (Boolean) Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false). diff --git a/docs/data-sources/global_client.md b/docs/data-sources/global_client.md index 97e8e6e83..3d67112d0 100644 --- a/docs/data-sources/global_client.md +++ b/docs/data-sources/global_client.md @@ -25,6 +25,7 @@ data "auth0_global_client" "global" {} - `allowed_origins` (List of String) URLs that represent valid origins for cross-origin resource sharing. By default, all your callback URLs will be allowed. - `app_type` (String) Type of application the client represents. Possible values are: `native`, `spa`, `regular_web`, `non_interactive`, `sso_integration`. Specific SSO integrations types accepted as well are: `rms`, `box`, `cloudbees`, `concur`, `dropbox`, `mscrm`, `echosign`, `egnyte`, `newrelic`, `office365`, `salesforce`, `sentry`, `sharepoint`, `slack`, `springcm`, `zendesk`, `zoom`. - `callbacks` (List of String) URLs that Auth0 may call back to after a user authenticates for the client. Make sure to specify the protocol (https://) otherwise the callback may fail in some cases. With the exception of custom URI schemes for native clients, all callbacks should use protocol https://. +- `client_aliases` (List of String) List of audiences/realms for SAML protocol. Used by the wsfed addon. - `client_id` (String) The ID of the client. - `client_metadata` (Map of String) Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: `:,-+=_*?"/\()<>@ [Tab] [Space]`. - `client_secret` (String) Secret for the client. Keep this private. To access this attribute you need to add the `read:client_keys` scope to the Terraform client. Otherwise, the attribute will contain an empty string. diff --git a/docs/resources/client.md b/docs/resources/client.md index a1c476250..d484e3694 100644 --- a/docs/resources/client.md +++ b/docs/resources/client.md @@ -100,6 +100,7 @@ resource "auth0_client" "my_client" { - `allowed_origins` (List of String) URLs that represent valid origins for cross-origin resource sharing. By default, all your callback URLs will be allowed. - `app_type` (String) Type of application the client represents. Possible values are: `native`, `spa`, `regular_web`, `non_interactive`, `sso_integration`. Specific SSO integrations types accepted as well are: `rms`, `box`, `cloudbees`, `concur`, `dropbox`, `mscrm`, `echosign`, `egnyte`, `newrelic`, `office365`, `salesforce`, `sentry`, `sharepoint`, `slack`, `springcm`, `zendesk`, `zoom`. - `callbacks` (List of String) URLs that Auth0 may call back to after a user authenticates for the client. Make sure to specify the protocol (https://) otherwise the callback may fail in some cases. With the exception of custom URI schemes for native clients, all callbacks should use protocol https://. +- `client_aliases` (List of String) List of audiences/realms for SAML protocol. Used by the wsfed addon. - `client_metadata` (Map of String) Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: `:,-+=_*?"/\()<>@ [Tab] [Space]`. - `client_secret_rotation_trigger` (Map of String) Custom metadata for the rotation. For more info: [rotate-client-secret](https://auth0.com/docs/get-started/applications/rotate-client-secret). - `cross_origin_auth` (Boolean) Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false). diff --git a/docs/resources/connection.md b/docs/resources/connection.md index 978cdf0fc..8f99fef9c 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -216,7 +216,7 @@ resource "auth0_connection" "oauth2" { pkce_enabled = true scripts = { fetchUserProfile = <@ [Tab] [Space]`. - `client_secret` (String, Sensitive) Secret for the client. Keep this private. To access this attribute you need to add the `read:client_keys` scope to the Terraform client. Otherwise, the attribute will contain an empty string. diff --git a/examples/resources/auth0_connection/resource_with_oauth2.tf b/examples/resources/auth0_connection/resource_with_oauth2.tf index 904fc3141..7d3045b0e 100644 --- a/examples/resources/auth0_connection/resource_with_oauth2.tf +++ b/examples/resources/auth0_connection/resource_with_oauth2.tf @@ -12,7 +12,7 @@ resource "auth0_connection" "oauth2" { pkce_enabled = true scripts = { fetchUserProfile = <