From 705d9df40ae2d1f0fe8a3776863a55b44ea075fc Mon Sep 17 00:00:00 2001 From: David Moran <23364162+wavemoran@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:44:43 -0700 Subject: [PATCH] feat: Add cross_origin_auth variable to auth0_client (#1149) Co-authored-by: Igor Rodionov --- modules/auth0/app/README.md | 1 + modules/auth0/app/main.tf | 11 ++++++----- modules/auth0/app/variables.tf | 6 ++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/auth0/app/README.md b/modules/auth0/app/README.md index 87f22e1ed..77a465ae4 100644 --- a/modules/auth0/app/README.md +++ b/modules/auth0/app/README.md @@ -104,6 +104,7 @@ components: | [authentication\_method](#input\_authentication\_method) | The authentication method for the client credentials | `string` | `"client_secret_post"` | no | | [callbacks](#input\_callbacks) | Allowed Callback URLs | `list(string)` | `[]` | no | | [context](#input\_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. | `any` |
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
| no | +| [cross\_origin\_auth](#input\_cross\_origin\_auth) | Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false). | `bool` | `false` | no | | [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no | | [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no | | [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no | diff --git a/modules/auth0/app/main.tf b/modules/auth0/app/main.tf index 294a4db55..af9dd6790 100644 --- a/modules/auth0/app/main.tf +++ b/modules/auth0/app/main.tf @@ -20,11 +20,12 @@ resource "auth0_client" "this" { alg = var.jwt_alg } - callbacks = var.callbacks - allowed_origins = var.allowed_origins - web_origins = var.web_origins - grant_types = var.grant_types - logo_uri = var.logo_uri + callbacks = var.callbacks + cross_origin_auth = var.cross_origin_auth + allowed_origins = var.allowed_origins + web_origins = var.web_origins + grant_types = var.grant_types + logo_uri = var.logo_uri } diff --git a/modules/auth0/app/variables.tf b/modules/auth0/app/variables.tf index 62fb09e71..07db907f8 100644 --- a/modules/auth0/app/variables.tf +++ b/modules/auth0/app/variables.tf @@ -9,6 +9,12 @@ variable "callbacks" { default = [] } +variable "cross_origin_auth" { + type = bool + description = "Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false)." + default = false +} + variable "allowed_origins" { type = list(string) description = "Allowed Origins"