[SERVER-57289] redact should not convert BSONArray into BSONObj Created: 11/May/21 Updated: 29/Oct/23 Resolved: 24/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.6, 4.4.11, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Irina Yatsenko (Inactive) | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v5.2, v5.0, v4.4
|
||||||||||||
| Sprint: | Security 2021-06-14, Security 2021-06-28 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Wrapping a BSONArray object with redact changes its type to BSONObj which means it gets logged in {0:"value0", 1:"value1", ...}format rather than ["value0", "value1", ...] format. This makes it a bit harder to parse the logs and might create inconsistencies in format between redacted and non-redacted arrays or depending on whether the arrays are nested. |
| Comments |
| Comment by Githook User [ 15/Dec/21 ] |
|
Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}Message: (cherry picked from commit 3b8806bef0f65df11e4d49786bf962ce0dd6b4dd) |
| Comment by Githook User [ 15/Dec/21 ] |
|
Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}Message: (cherry picked from commit 3b8806bef0f65df11e4d49786bf962ce0dd6b4dd) |
| Comment by Haley Connelly [ 15/Dec/21 ] |
|
These backports are needed to backport https://jira.mongodb.org/browse/SERVER-61846 to 4.4 |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 24/Jun/21 ] |
|
Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}Message: |
| Comment by Mark Benvenuto [ 02/Jun/21 ] |
|
This code: https://github.com/mongodb/mongo/blob/2da60c28f0996433e61e80ac5cfdde621244837e/src/mongo/bson/bsonobj.cpp#L147-L150 should be updated to use BSONArrayBuilder for processing array entries. |