In #868, we add support for multiple JavaScript enrichments. This allows to implement new enrichments in JavaScript and easily add them to Enrich. However, most enrichments take parameters. So as it stands, people using these new JavaScript enrichments would need to modify the script itself every time they need to change parameters. This is very inconvenient, and prevents us from (in the future) hosting the script separately. The solution is to allow passing these parameters in the enrichment configuration, so instead of
{
...
"script": "....." // base64-encoded
...
}
we would have:
{
...
"script": ".....", // base64-encoded
"config": {
// arbitrary JSON that the enrichment code can consume
}
...
}
This will also help in case we need to deal with secrets inside JavaScript code. (Currently, secrets can’t be substituted because the script code is in base64.)
In #868, we add support for multiple JavaScript enrichments. This allows to implement new enrichments in JavaScript and easily add them to Enrich. However, most enrichments take parameters. So as it stands, people using these new JavaScript enrichments would need to modify the script itself every time they need to change parameters. This is very inconvenient, and prevents us from (in the future) hosting the script separately. The solution is to allow passing these parameters in the enrichment configuration, so instead of
we would have:
This will also help in case we need to deal with secrets inside JavaScript code. (Currently, secrets can’t be substituted because the script code is in base64.)