You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2026/09/18 07:15:26 UTC
[I] Reject `MapMessage` keys that collide with NoSQL provider reserved field names [logging-log4j2]
ppkarwasz opened a new issue, #4331:
URL: https://github.com/apache/logging-log4j2/issues/4331
When `NoSqlAppender` is configured with a layout that returns a `MapMessage`, `NoSqlDatabaseManager#setFields(MapMessage, NoSqlObject)` copies every entry of the message into the top-level document without checking the key. With the CouchDB provider a key named `_id` is honored as the document identifier, and an `_id` starting with `_design/` creates or overwrites a design document. Other providers have their own reserved names (`_id` for MongoDB).
`MapMessage` keys are developer-controlled structural identifiers under the [threat model](https://logging.apache.org/security.html#threat-common-sources-structural), so this is not a vulnerability, but the model allows us to reject a malformed identifier rather than silently accept it. This issue originates from a private security report classified as not a vulnerability.
Proposal: let `NoSqlProvider` (or `NoSqlConnection`) expose the set of reserved field names, and have `NoSqlDatabaseManager` skip or prefix colliding keys, logging a status warning the first time. Note that `log4j-couchdb` is planned for removal, so the CouchDB-specific part may be moot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reject `MapMessage` keys that collide with NoSQL provider reserved field names [logging-log4j2]
Posted by "Shekharrajak (via GitHub)" <gi...@apache.org>.
Shekharrajak commented on issue #4331:
URL: https://github.com/apache/logging-log4j2/issues/4331#issuecomment-6394092245
@ramanathan1504 , I am asking if these tests https://github.com/apache/logging-log4j2/pull/4411/changes looks good , if need any changes please let me know. Otherwise I can start working on the implementation part.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reject `MapMessage` keys that collide with NoSQL provider reserved field names [logging-log4j2]
Posted by "Shekharrajak (via GitHub)" <gi...@apache.org>.
Shekharrajak commented on issue #4331:
URL: https://github.com/apache/logging-log4j2/issues/4331#issuecomment-6273095293
@ppkarwasz @ramanathan1504 please check the unit tests added here https://github.com/apache/logging-log4j2/pull/4411/changes so that I can understand the expected values and then we can work on the implementation design approach.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reject `MapMessage` keys that collide with NoSQL provider reserved field names [logging-log4j2]
Posted by "ramanathan1504 (via GitHub)" <gi...@apache.org>.
ramanathan1504 commented on issue #4331:
URL: https://github.com/apache/logging-log4j2/issues/4331#issuecomment-5758510352
@ppkarwasz
should the reserved names come from a new default method on `NoSqlConnection` (empty set by default, so third-party providers keep compiling), or since `log4j-couchdb` is going away, is a guard for `_id` in `log4j-mongodb4` enough?
And for a colliding key, skip it or prefix it? I'd lean towards skip plus a one-time `StatusLogger` warning.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reject `MapMessage` keys that collide with NoSQL provider reserved field names [logging-log4j2]
Posted by "Shekharrajak (via GitHub) via notifications" <no...@logging.apache.org>.
Shekharrajak commented on issue #4331:
URL: https://github.com/apache/logging-log4j2/issues/4331#issuecomment-6546084024
@ppkarwasz @ramanathan1504 Please help in checking the unit test and implementation https://github.com/apache/logging-log4j2/pull/4411#issuecomment-6546077356
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reject `MapMessage` keys that collide with NoSQL provider reserved field names [logging-log4j2]
Posted by "ramanathan1504 (via GitHub)" <gi...@apache.org>.
ramanathan1504 commented on issue #4331:
URL: https://github.com/apache/logging-log4j2/issues/4331#issuecomment-6315556879
@Shekharrajak, thanks for the contribution!
Are you still working on this? If it's still a work in progress, please convert the PR to draft mode.
Before finalizing the PR, please make sure to:
1. Read through the 'Building.adoc' file.
2. Review recently closed PRs to see our standard conventions.
3. Add a changelog entry and update the Javadoc if applicable.
Let us know when it's ready for review!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reject `MapMessage` keys that collide with NoSQL provider reserved field names [logging-log4j2]
Posted by "Shekharrajak (via GitHub)" <gi...@apache.org>.
Shekharrajak commented on issue #4331:
URL: https://github.com/apache/logging-log4j2/issues/4331#issuecomment-6247559054
Hi @ppkarwasz @ramanathan1504 , can I work on this ticket ? Please assign it to me .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org