cisco_duo.auth: Provide option to ignore ingesting API Errors. - #12870
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
🚀 Benchmarks reportPackage
|
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
auth |
3322.26 | 2141.33 | -1180.93 (-35.55%) | 💔 |
offline_enrollment |
31250 | 17857.14 | -13392.86 (-42.86%) | 💔 |
summary |
55555.56 | 27777.78 | -27777.78 (-50%) | 💔 |
telephony |
58823.53 | 32258.06 | -26565.47 (-45.16%) | 💔 |
telephony_v2 |
45454.55 | 14705.88 | -30748.67 (-67.65%) | 💔 |
To see the full report comment with /test benchmark fullreport
efd6
left a comment
There was a problem hiding this comment.
Minor query only, otherwise LGTM
| ) | ||
| : | ||
| bytes(resp.Body).decode_json().as(body, | ||
| resp.StatusCode == 429 && (state.ignore_api_errors == "true") ? |
There was a problem hiding this comment.
Does state.ignore_api_errors not get interpreted as a boolean by YAML?
There was a problem hiding this comment.
Yeah it seems like without the quote, I get this error inside system tests:
Unit state changed cel-default-cel-cisco_duo-a76f1110-a53c-4c59-bf68-fec5bf59b33f (STARTING->FAILED): failed to check program: failed compilation: ERROR: <input>:76:64: found no matching overload for '_==_' applied to '(string, bool)'\n | resp.StatusCode == 429 && (state.ignore_api_errors == true) ?\n | ...............................................................^ accessing config
I defined ignore_api_errors as boolean inside manifest.yml but still the program considers it as string.
There was a problem hiding this comment.
It may be worth doing the converse conversion, bool(state.ignore_api_errors) in order to catch "ture" and similar.
Convert string option to bool.
| ) | ||
| : | ||
| bytes(resp.Body).decode_json().as(body, | ||
| resp.StatusCode == 429 && (bool(state.ignore_api_errors) == true) ? |
There was a problem hiding this comment.
| resp.StatusCode == 429 && (bool(state.ignore_api_errors) == true) ? | |
| resp.StatusCode == 429 && bool(state.ignore_api_errors) ? |
Here, otherwise madness lies.
resp.StatusCode == 429 && (…((bool(state.ignore_api_errors) == true) == true) = true) …) ?
💚 Build Succeeded
History
cc @kcreddy |
|
|
Package cisco_duo - 2.4.0 containing this change is available at https://epr.elastic.co/package/cisco_duo/2.4.0/ |
Cisco Duo auth API rate limit is very low i.e., once per minute. Sometimes 429s are received even when requests are made less than once per minute. This leads to users ingesting 429 API errors very often. Provide an option to users to ignore ingesting API Errors. Currently only 429s are ignored when this option is enabled. Also add system tests for CEL input in auth data-stream.




Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
System tests pass for
authdata-stream: