Keyword replace mappings (# / @) in configs don't support concatenating arrays
See original GitHub issueDescription
Provide a clear and concise description of the issue, including what you expected to happen.
Placeholders ##x## or @@x@@ don’t support concatenating arrays. Sometimes you would like to concatenate arrays, e.g. allowed callback URLs, logout URLs or web origins. For example having base/global allowed URLs defined, and then adding to them for all clients/applications.
config.json
{
"AUTH0_KEYWORD_REPLACE_MAPPINGS": {
"GLOBAL_WEB_ORIGINS": [
"http://local.me:8080",
"http://localhost",
"http://localhost:3000"
]
}
}
def/clients/A.json
Either ##:
{
"web_origins": [
"##GLOBAL_WEB_ORIGINS##",
"http://a.foo.com",
"https://a.foo.com"
]
}
or @@
{
"web_origins": [
@@GLOBAL_WEB_ORIGINS@@,
"http://a.foo.com",
"https://a.foo.com"
]
}
Expected result:
{
"web_origins": [
"http://local.me:8080",
"http://localhost",
"http://localhost:3000",
"http://a.foo.com",
"https://a.foo.com"
]
}
Actual result:
I get an error for @@ but for ## I get the following:
{
"web_origins": [
"http://local.me:8080,http://localhost,http://localhost:3000",
"http://a.foo.com",
"https://a.foo.com"
]
}
Environment
Please provide the following:
- Version of this library used: 3.6.3
- Other relevant versions (language, server software, OS, browser): Node 8.15.1, Linux Mint, Ubuntu 18.04
- Other modules/plugins/libraries that might be involved: N/A
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Change mappings and settings for a data stream - Elastic
Each data stream has a matching index template. Mappings and index settings from this template are applied to new backing indices created for...
Read more >How to Do a Mapping of Array of Strings in Elasticsearch
In Elasticsearch, there is no dedicated array type. Any field can contain zero or more values by default, however, all values in the...
Read more >Deploy CLI Tool Environment Variables and Keyword Mappings
Learn about environmental variables and keyword mappings used by the Deploy CLI Tool for exporting tenant configurations.
Read more >The dynamic data type - Azure Data Explorer | Microsoft Learn
An array of dynamic values, holding zero or more values with zero-based indexing. A property bag that maps unique string values to dynamic ......
Read more >Querying arrays with complex types and nested structures
Examples in this section show how to change element's data type, locate elements within arrays, and find keywords using Athena queries.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@rodschuler Thanks for posting that workaround, seems like a tenable solution. Though it highlights areas of potential improvement for the variable replacement functionality in general.
I was having the same problem but was able to get it to work by doing the following.
In the yaml file I have
web_origins: [##APP_WEB_ORIGINS##]and then in the config file you set it up similar to the following
"AUTH0_KEYWORD_REPLACE_MAPPINGS": { "APP_WEB_ORIGINS": "'https://a.foo.com','https://b.foo.com','https://c.foo.com'", }basically using single quotes inside the variable used to replace the value.