criblio / collector-templates

Templates for Cribl Stream Collectors
MIT License
24 stars 14 forks source link

Nested angle brackets should be escaped or replaced. #23

Closed nbianca-dev closed 1 month ago

nbianca-dev commented 1 month ago

The collectorUrl value in both the collector_jira_audit.json and collector_confluence_audit.json files contains nested angle brackets that is causing extra characters in the Rest Collector URL value.

Issue: Nested angle brackets <tenant> confusing Stream where the placeholder ends resulting in unwanted characters. "collectUrl": "https://<Atlassian Tenant Subdomain|The subdomain for the Atlassian tenant (e.g.https://.atlassian.net)>.atlassian.net/rest/api/3/auditing/record" -> "collectUrl": "https://example.atlassian.net)>.atlassian.net/rest/api/3/auditing/record`"

Possible fix: Escape the nested angle bracket if possible or replace with square brackets. For example <tenant> can be replaced with [tenant] to get the expected result. "collectUrl": "https://<Atlassian Tenant Subdomain|The subdomain for the Atlassian tenant (e.g.https://[tenant].atlassian.net`)>.atlassian.net/rest/api/3/auditing/record" -> "collectUrl": "https://example.atlassian.net/rest/api/3/auditing/record`"

trevor-criblio commented 1 month ago

Ah, good catch! Looks like the angle brackets within the description there are mucking with the format used to enable the UI to replace the placeholders (see https://docs.cribl.io/stream/collectors/#placeholders).