Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APPSEC-57032] Add usr.login to Kit::AppSec::Events #4508

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

Strech
Copy link
Member

@Strech Strech commented Mar 18, 2025

What does this PR do?

  1. Always set AppSec tag appsec.events.<event>.usr.login with a fallback value as usr.id
  2. Pass usr.login when available to libddwaf

Motivation:

This is an intermediate step to comply with v3 ATO behavior in which it is expected (by the backend) that we alway pass login data appsec.events.<event>.usr.login and in addition we pass usr.login to libddwaf when available.

Change log entry

No. Announcement will be done as a part of #4433

Additional Notes:

Unfortunately, in the current state the Kit::AppSec::Events and Kit::Identity are coupled, which led to some questionable areas.

How to test the change?

CI should be fine

@github-actions github-actions bot added the appsec Application Security monitoring product label Mar 18, 2025
@Strech Strech changed the title Add usr.login to Kit::AppSec::Events [APPSEC-57032] Add usr.login to Kit::AppSec::Events Mar 18, 2025
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Mar 18, 2025

Datadog Report

Branch report: appsec-57032-add-user-login-to-identity
Commit report: d234fef
Test service: dd-trace-rb

✅ 0 Failed, 20643 Passed, 1370 Skipped, 3m 13.13s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Mar 18, 2025

Benchmarks

Benchmark execution time: 2025-03-19 09:48:20

Comparing candidate commit d234fef in PR branch appsec-57032-add-user-login-to-identity with baseline commit 7d88b81 in branch master.

Found 3 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 2 unstable metrics.

scenario:line instrumentation - targeted

  • 🟩 throughput [+8728.068op/s; +9199.385op/s] or [+5.608%; +5.911%]

scenario:line instrumentation - untargeted

  • 🟩 throughput [+4779.085op/s; +5034.698op/s] or [+5.288%; +5.571%]

scenario:method instrumentation

  • 🟩 throughput [+11383.841op/s; +11876.057op/s] or [+6.864%; +7.161%]

@Strech Strech force-pushed the appsec-57032-add-user-login-to-identity branch 4 times, most recently from c2b8ff7 to 5caf87a Compare March 18, 2025 12:42
@Strech Strech marked this pull request as ready for review March 18, 2025 12:47
@Strech Strech requested review from a team as code owners March 18, 2025 12:47
@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.69%. Comparing base (7d88b81) to head (d234fef).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4508      +/-   ##
==========================================
- Coverage   97.70%   97.69%   -0.02%     
==========================================
  Files        1381     1381              
  Lines       83973    84017      +44     
  Branches     4251     4253       +2     
==========================================
+ Hits        82043    82077      +34     
- Misses       1930     1940      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Strech Strech force-pushed the appsec-57032-add-user-login-to-identity branch from 588157f to d234fef Compare March 19, 2025 09:24
@Strech Strech merged commit 4306938 into master Mar 19, 2025
461 checks passed
@Strech Strech deleted the appsec-57032-add-user-login-to-identity branch March 19, 2025 10:58
@github-actions github-actions bot added this to the 2.13.0 milestone Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec Application Security monitoring product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants