Skip to content

Added log ip-masking#276

Open
nanaabdul1172 wants to merge 1 commit into
XStreamRollz:mainfrom
nanaabdul1172:Ip-masking
Open

Added log ip-masking#276
nanaabdul1172 wants to merge 1 commit into
XStreamRollz:mainfrom
nanaabdul1172:Ip-masking

Conversation

@nanaabdul1172

Copy link
Copy Markdown

Closes #222
Added LOG_IP_MASKING env var (default: "last-octet"). Masked the last octet of IPv4 addresses and the last 64 bits of IPv6 addresses before logging or storing.

Copy link
Copy Markdown
Contributor

Hi @nanaabdul1172 👋 — appreciate the IP-masking work for #222, the new ip-mask helper and audit integration look well thought-out. However, the CI / quality check is currently red on this branch (run 27625951658). Could you take a look at the failure logs and push a fix? Once CI is green I'll be happy to merge. Thanks! 🙏

@Xhristin3 Xhristin3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice feature — LOG_IP_MASKING with modes none, last-octet, full-hash covering v4/v6/v4-mapped is solid. Holding on merge because quality CI is red:\n\napi test suite has one failure:\n- RequestLoggerMiddleware › logs a 2xx request with the required fields on completion\n- the assertion expects "1.2.3.4" but now receives "1.2.3.0" — i.e. your last-octet masking is actually working, the existing test just predates it.\n\nPlease update that assertion in api/src/middleware/request-logger.middleware.spec.ts to expect the masked IP ("1.2.3.0") so it reflects the new behavior. Re-request review once CI is green 🙏

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.

obs: Implement configurable IP masking for log privacy

2 participants