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

feat(Integrations): update user login and signup events collection #2976

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Nov 27, 2024

Description

Implement changes on user login and signup automated event collection according to the RFC.

The following changes have been implemented:

  • Separate event collection methods to have an automated version and a SDK version.
  • Collect login information and send them via the appropriate addresses on the automated event collection methods.
  • Add missing fingerprint addresses appsec.events.users.login.failure and appsec.events.users.login.success
  • Update the Wordpress, Laravel and Symphony integration to use new automated methods.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

Related Jiras: APPSEC-55606, APPSEC-55605, APPSEC-55604

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 75.54585% with 56 lines in your changes missing coverage. Please review.

Project coverage is 72.80%. Comparing base (4cc2897) to head (ee0b645).

Files with missing lines Patch % Lines
appsec/src/extension/tags.c 75.90% 18 Missing and 22 partials ⚠️
...DTrace/Integrations/Laravel/LaravelIntegration.php 63.63% 8 Missing ⚠️
...DTrace/Integrations/Symfony/SymfonyIntegration.php 66.66% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2976      +/-   ##
============================================
+ Coverage     72.75%   72.80%   +0.05%     
- Complexity     2750     2753       +3     
============================================
  Files           138      138              
  Lines         15038    15137      +99     
  Branches       1020     1026       +6     
============================================
+ Hits          10941    11021      +80     
- Misses         3543     3555      +12     
- Partials        554      561       +7     
Flag Coverage Δ
appsec-extension 68.22% <76.19%> (+0.24%) ⬆️
tracer-php 74.58% <73.77%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
appsec/src/extension/user_tracking.c 74.52% <100.00%> (+2.83%) ⬆️
...ce/Integrations/WordPress/WordPressIntegration.php 94.11% <100.00%> (+0.29%) ⬆️
...DTrace/Integrations/Laravel/LaravelIntegration.php 80.92% <63.63%> (+0.04%) ⬆️
...DTrace/Integrations/Symfony/SymfonyIntegration.php 82.71% <66.66%> (-0.14%) ⬇️
appsec/src/extension/tags.c 79.42% <75.90%> (-0.39%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cc2897...ee0b645. Read the comment docs.

@pr-commenter
Copy link

pr-commenter bot commented Nov 27, 2024

Benchmarks [ tracer ]

Benchmark execution time: 2024-12-13 09:45:01

Comparing candidate commit ee0b645 in PR branch leiyks/add-laravel-login-and-signup-collection with baseline commit 4cc2897 in branch master.

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

scenario:ContextPropagationBench/benchInject64Bit

  • 🟥 execution_time [+1.455µs; +1.847µs] or [+23.923%; +30.368%]

scenario:HookBench/benchWithoutHook-opcache

  • 🟩 execution_time [-3.482µs; -2.687µs] or [-6.534%; -5.043%]

scenario:LogsInjectionBench/benchLogsInfoBaseline-opcache

  • 🟥 execution_time [+282.810ns; +339.590ns] or [+18.233%; +21.893%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+1.203µs; +1.682µs] or [+22.075%; +30.881%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+1.245µs; +1.617µs] or [+22.713%; +29.513%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+1.236µs; +1.559µs] or [+22.704%; +28.633%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+1.272µs; +1.701µs] or [+23.225%; +31.047%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4-opcache

  • 🟥 execution_time [+153.195ns; +464.405ns] or [+2.232%; +6.767%]

scenario:SpanBench/benchOpenTelemetryInteroperability

  • 🟥 execution_time [+19.382µs; +25.000µs] or [+6.311%; +8.140%]

scenario:TraceSerializationBench/benchSerializeTrace

  • 🟩 execution_time [-13.201µs; -8.099µs] or [-6.498%; -3.987%]

@Leiyks Leiyks force-pushed the leiyks/add-laravel-login-and-signup-collection branch from 95dcd66 to 22d8216 Compare December 3, 2024 15:00
@pr-commenter
Copy link

pr-commenter bot commented Dec 3, 2024

Benchmarks [ appsec ]

Benchmark execution time: 2024-12-13 09:52:48

Comparing candidate commit ee0b645 in PR branch leiyks/add-laravel-login-and-signup-collection with baseline commit 4cc2897 in branch master.

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

@Leiyks Leiyks force-pushed the leiyks/add-laravel-login-and-signup-collection branch 3 times, most recently from bd11fe5 to 9de7062 Compare December 9, 2024 14:39
@Leiyks Leiyks force-pushed the leiyks/add-laravel-login-and-signup-collection branch from dfb19df to 50499a4 Compare December 10, 2024 13:00
@Leiyks Leiyks changed the title feat(Integrations: Laravel): update user login and signup events feat(Integrations): update user lifecycle tracking events Dec 11, 2024
@Leiyks Leiyks force-pushed the leiyks/add-laravel-login-and-signup-collection branch from 2d3ddb4 to ef44aac Compare December 11, 2024 17:11
@Leiyks Leiyks changed the title feat(Integrations): update user lifecycle tracking events feat(Integrations): update user login and signup events collection Dec 11, 2024
@Leiyks Leiyks marked this pull request as ready for review December 12, 2024 10:02
@Leiyks Leiyks requested review from a team as code owners December 12, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants