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: register ASM_TRUSTED_IPS capability to RC #2460

Merged
merged 6 commits into from
Dec 22, 2023

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Dec 21, 2023

What does this PR do?

ASM_TRUSTED_IPS is the Remote Config capability that signifies this library is compatible with trusted IPs; meaning it uses libddwaf v1.12.0 or later.

This is expected to produce additional data under the ASM_DATA RC product, which contains a set of trusted IPs. The merge strategy for this data is identical to that of other data currently received from RC, meaning if the same entry is provided multiple times, the library will retain the one with the latest expiration timestamp.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

ASM_TRUSTED_IPS is the Remote Config capability that signifies this
library is compatible with trusted IPs; meaning it uses
`libddwaf v1.12.0` or later.

This is expected to produce additional data under the `ASM_DATA` RC
product, which contains a set of trusted IPs. The merge strategy for
this data is identical to that of other data currently received from RC,
meaning if the same entry is provided multiple times, the library will
retain the one with the latest expiration timestamp.
@RomainMuller RomainMuller requested a review from a team as a code owner December 21, 2023 10:49
internal/appsec/remoteconfig.go Outdated Show resolved Hide resolved
internal/appsec/remoteconfig.go Outdated Show resolved Hide resolved
- Pre-allocating certain maps & slices for more efficient processing
- Making `combineRCRulesUpdates` a method of `*rulesManager`
- Extracting a duplicated []Capabilities slice into a shared variable
@RomainMuller RomainMuller changed the base branch from main to romain.marcadier/prealloc-rc December 21, 2023 10:52
@pr-commenter
Copy link

pr-commenter bot commented Dec 21, 2023

Benchmarks

Benchmark execution time: 2023-12-21 16:40:45

Comparing candidate commit 82220ea in PR branch romain.marcadier/trusted-ips/APPSEC-18230 with baseline commit 3569a53 in branch main.

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

Base automatically changed from romain.marcadier/prealloc-rc to main December 21, 2023 16:23
Copy link
Contributor

@Hellzy Hellzy left a comment

Choose a reason for hiding this comment

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

Best line-to-feature ratio

@RomainMuller RomainMuller enabled auto-merge (squash) December 22, 2023 09:17
@RomainMuller RomainMuller changed the title appsec: register ASM_TRUSTED_IPS capability to RC appsec: register ASM_TRUSTED_IPS capability to RC Dec 22, 2023
@RomainMuller RomainMuller merged commit ab78ae0 into main Dec 22, 2023
336 checks passed
@RomainMuller RomainMuller deleted the romain.marcadier/trusted-ips/APPSEC-18230 branch December 22, 2023 09:20
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.

None yet

2 participants