[Asset Inventory][AWS] Forward-port #7277 — EC2/ELB/RDS fields for InfoSec - #8229
Open
kubasobon wants to merge 1 commit into
Open
[Asset Inventory][AWS] Forward-port #7277 — EC2/ELB/RDS fields for InfoSec#8229kubasobon wants to merge 1 commit into
kubasobon wants to merge 1 commit into
Conversation
…7277) ### Summary of your changes > [!NOTE] > **Stacked on #7473.** This PR is based on `asset-inventory/fix-entity-attributes`, which renames the `entity.attributes` (flattened) bag to `entity.Details` to fix the Entity Store generic-extraction bug. All new fields below are therefore emitted under **`entity.Details.*`** (not `entity.attributes.*`). Please review/merge #7473 first; this PR's diff shows only the InfoSec fetcher changes on top of it. | Resource | Field | Change | | -------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | **EC2** | `entity.Details.Role` | Added `LookupTag(tags, "role")` in `buildDetails` | | **RDS** | `entity.Details.DBInstanceStatus` | Added `Status` field to wrapper struct; mapped from `DBInstanceStatus` in provider; emitted in fetcher | | **ELB v2** (ALB/NLB) | `entity.Details.IPAddresses` | `GetIPAddresses()` now also collects `PrivateIPv4Address` and `IPv6Address` per AZ address (previously only `IpAddress`) | | **ELB v1** (Classic) | `entity.Details.State` | `GetState()` returns `"active"` (hardcoded as classic API exposes no state field) | | **ELB v1** (Classic) | `entity.Details.IPAddresses` | DNS-resolves the ELB `DNSName` at fetch time via injectable `hostResolver`; soft-fails to empty on error | ### Related Issues Closes elastic/security-team#18294 ### Checklist - [x] I have added tests that prove my fix is effective or that my feature works
Contributor
|
This pull request does not have a backport label. Could you fix it @kubasobon? 🙏
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #7277 was merged into the feature branch
asset-inventory/fix-entity-attributeson Jul 30, then mergify backported it to 9.5 via #7482 on Aug 3. The feature branch was never merged forward, somain(9.6) is currently behind 9.5 on these fields.This is a clean cherry-pick of commit
3bc1c9d0from that feature branch ontomain. It applies with no conflicts (theentity.attributes→entity.Detailsrename from #7473 already landed onmainon Jul 23).Fields added
entity.Details.Role— reads theroleinstance tagentity.Details.DBInstanceStatusentity.Details.State— hardcoded"active"(classic API has no state field)entity.Details.IPAddresses— DNS-resolved fromDNSNameat fetch time via injectablehostResolverentity.Details.IPAddresses— widened to also readPrivateIPv4AddressandIPv6Addressper AZ addressRelated