[SERVER-11409] audit log for createIndex should have only the index spec in the index spec location Created: 28/Oct/13 Updated: 11/Jul/16 Resolved: 28/Oct/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Timothy Olsen (Inactive) | Assignee: | Matt Dannenberg |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL 6.4 |
||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | Run mongodb enterprise at git commit 8a2bca9ecaa4a6b203a80d8432c7033036eb467b w/ audit logging turned on. Create an index. |
||||
| Participants: | |||||
| Description |
|
In both textfile and bsonfile formats of the audit log, a createIndex action is logging more than just the index spec where only the index spec should be. Here is the line from the textfile:
And here is the line from the bsonfile (represented as a python unicode dict):
In both cases, a larger object containing the index spec is logged. In other words, the following is being logged:
When the following should be logged instead:
|
| Comments |
| Comment by Eric Milkie [ 28/Oct/13 ] |
|
We should probably come up with a different term for this then. This is the full index specification, which is more than just the keys. I figured it will be important to the audit log consumers to include all the flags that the ensureIndex() contained. |
| Comment by Timothy Olsen (Inactive) [ 28/Oct/13 ] |
|
Ok, I was a little confused with what an index spec is. The following page seems to say that an "index specification document" is the key: http://docs.mongodb.org/manual/reference/method/db.collection.dropIndex/ Whereas it seems you're saying that an index spec is the same as an element in the array returned by db.COLLECTION.getIndexes() in the mongo shell. Is that correct? |
| Comment by auto [ 28/Oct/13 ] |
|
Author: {u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: |
| Comment by Eric Milkie [ 28/Oct/13 ] |
|
I changed the name of one of the bson format fields in the auditing spec, so bouncing back to Matt for a bit of code change. |
| Comment by Eric Milkie [ 28/Oct/13 ] |
|
I believe the code behavior is correct; the spec is unclear and I will edit it for clarity now. |