Skip to content

Conversation

@kcreddy
Copy link
Contributor

@kcreddy kcreddy commented Nov 22, 2024

Proposed commit message

Cisco Duo Admin API has very low API request limit (Ex: not more than 1 request per minute for Authentication logs). Reaching this limit would lead to 42901 from the API. The response also doesn't include a Retry-After header, which leads to a default back-off retry attempts. This subsequently leads to further 42901 as the limit is already reached.

This PR allows users to set optional retry configuration allowed by CEL input for CEL-based data-streams. When number of retries are reduces, this helps in reducing the number retry requests being made when already reached 429.

Reference:
https://help.duo.com/s/article/1338?language=en_US
https://duo.com/docs/adminapi#authentication-logs
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-cel.html#_resource_retry_max_attempts

Note

This only reduces 42901 Too Many Requests from the retry attempts. The users have to tune Interval and Rate limit to avoid the 42901 from the initial request (non-retry).

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Screenshots

Screenshot 2024-11-22 at 11 52 29 AM
@kcreddy kcreddy self-assigned this Nov 22, 2024
@kcreddy kcreddy added Integration:cisco_duo Cisco Duo bugfix Pull request that fixes a bug issue labels Nov 22, 2024
@elastic-vault-github-plugin-prod
Copy link

elastic-vault-github-plugin-prod bot commented Nov 22, 2024

🚀 Benchmarks report

Package cisco_duo 👍(3) 💚(2) 💔(3)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
activity 3649.64 2857.14 -792.5 (-21.71%) 💔
telephony_v2 22222.22 14925.37 -7296.85 (-32.84%) 💔
trust_monitor 16393.44 9345.79 -7047.65 (-42.99%) 💔

To see the full report comment with /test benchmark fullreport

@kcreddy kcreddy marked this pull request as ready for review November 22, 2024 06:52
@kcreddy kcreddy requested a review from a team as a code owner November 22, 2024 06:52
@kcreddy kcreddy added the Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] label Nov 22, 2024
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Copy link
Contributor

@chemamartinez chemamartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worthy to include the same options for the rest of the data streams using CEL

@kcreddy
Copy link
Contributor Author

kcreddy commented Nov 22, 2024

It may be worthy to include the same options for the rest of the data streams using CEL

Agreed. Will do

@kcreddy kcreddy changed the title cisco_duo.auth: Make retry options configurable cisco_duo: Make retry options configurable in CEL-based datastreams Nov 22, 2024
Copy link
Contributor

@chemamartinez chemamartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link

💚 Build Succeeded

History

  • 💚 Build #18587 succeeded 5d396eac51d87fe94d4522c0caeac190ba2a1af8

cc @kcreddy

@kcreddy kcreddy merged commit b4ebf10 into elastic:main Nov 22, 2024
5 checks passed
@kcreddy kcreddy deleted the cisco_duo.auth-retry-config branch November 22, 2024 08:45
@elastic-vault-github-plugin-prod

Package cisco_duo - 2.2.6 containing this change is available at https://epr.elastic.co/package/cisco_duo/2.2.6/

qcorporation pushed a commit that referenced this pull request Feb 3, 2025
…11822) Cisco Duo Admin API has very low API request limit (Ex: `not more than 1 request per minute` for Authentication logs). Reaching this limit would lead to `42901` from the API. The response also doesn't include a `Retry-After` header, which leads to a default back-off retry attempts. This subsequently leads to further `42901` as the limit is already reached. This PR allows users to set optional retry configuration allowed by CEL input for CEL-based data-streams. When number of retries are reduces, this helps in reducing the number retry requests being made when already reached `429`.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
…lastic#11822) Cisco Duo Admin API has very low API request limit (Ex: `not more than 1 request per minute` for Authentication logs). Reaching this limit would lead to `42901` from the API. The response also doesn't include a `Retry-After` header, which leads to a default back-off retry attempts. This subsequently leads to further `42901` as the limit is already reached. This PR allows users to set optional retry configuration allowed by CEL input for CEL-based data-streams. When number of retries are reduces, this helps in reducing the number retry requests being made when already reached `429`.
qcorporation pushed a commit that referenced this pull request Feb 4, 2025
…11822) Cisco Duo Admin API has very low API request limit (Ex: `not more than 1 request per minute` for Authentication logs). Reaching this limit would lead to `42901` from the API. The response also doesn't include a `Retry-After` header, which leads to a default back-off retry attempts. This subsequently leads to further `42901` as the limit is already reached. This PR allows users to set optional retry configuration allowed by CEL input for CEL-based data-streams. When number of retries are reduces, this helps in reducing the number retry requests being made when already reached `429`.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
…lastic#11822) Cisco Duo Admin API has very low API request limit (Ex: `not more than 1 request per minute` for Authentication logs). Reaching this limit would lead to `42901` from the API. The response also doesn't include a `Retry-After` header, which leads to a default back-off retry attempts. This subsequently leads to further `42901` as the limit is already reached. This PR allows users to set optional retry configuration allowed by CEL input for CEL-based data-streams. When number of retries are reduces, this helps in reducing the number retry requests being made when already reached `429`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:cisco_duo Cisco Duo Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

3 participants