Skip to content

Added log ip-masking#276

Open
nanaabdul1172 wants to merge 5 commits into
XStreamRollz:mainfrom
nanaabdul1172:Ip-masking
Open

Added log ip-masking#276
nanaabdul1172 wants to merge 5 commits 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 🙏

@nanaabdul1172 nanaabdul1172 requested a review from Xhristin3 June 18, 2026 06:45

@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.

Thanks for working on the IP masking feature — important for GDPR compliance. The CI quality check is failing right now though. Could you investigate the failing logs and push a fix so we can get it merged?

Copy link
Copy Markdown
Contributor

Hey @nanaabdul1172 \u2014 the IP-masking utility looks great. The none / last-octet (default) / full-hash modes and the integration into AuditInterceptor + RequestLoggerMiddleware hit #222 exactly. CI is red on one assertion: api/src/middleware/request-logger.middleware.spec.ts still expects the unmasked "1.2.3.4" while the middleware now correctly produces "1.2.3.0". Could you update that expectation to match the masked output? Tiny fix and this lands. \ud83d\ude4c

@nanaabdul1172

nanaabdul1172 commented Jun 19, 2026 via email

Copy link
Copy Markdown
Author

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