[SERVER-11440] 'indexName' needs trimming when auditing 'dropIndexes' Created: 29/Oct/13  Updated: 11/Jul/16  Resolved: 29/Oct/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.4

Type: Bug Priority: Minor - P4
Reporter: bard.bloom@10gen.com Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Participants:

 Description   

1. The spec says the action is called "dropIndexes". In the audit log file,
though, it's called "dropIndex" (singular). I think the log file is right
and the spec is wrong, since this action drops one index, not several.

 
      {u'remote': {u'ip': u'127.0.0.1', u'port': 59920}, u'users':
      [{u'userSource': u'db40\u0586', u'user': u'user41\u05d0'}], u'atype':
      u'dropIndex', u'ts': datetime.datetime(2013, 10, 29, 14, 44, 55, 457000,
      tzinfo=<bson.tz_util.FixedOffset object at 0x276ec10>), u'param':
      {u'ns': u'db40\u0586.c42\u0628', u'indexName':
      u'db40\u0586.c42\u0628.$indexname44\u05d0\u03c9'}, u'result': 0,
      u'local': {u'ip': u'127.0.0.1', u'port': 27017}, u'id': {u'opnum': 0,
      u'connid': ObjectId('000000000000000000000000')}} 

2. The indexName field for the bson formatted audit of the dropIndexes action has the form
db40.c42.$indexname44 — with database and collection names and a mysterious
'$' attached to it. (For createIndex, it's just the bare name, like
index44, without those things.)
Since we have an 'ns' field with the same information in the 'param' part
of the audit log record, I think we don't need to put these prefixes on the
indexName here.
u'param':

{u'ns': u'db40.c42', u'indexName': u'db40.c42.$indexname44'}

,

3. The same goes for text formatted audit logs. They look like this:

            2013-10-29T10:53:50.907-0400 user14ऊ@db13אω
            127.0.0.1:59949/127.0.0.1:27017 000000000000000000000000.0 Dropped
            index db13אω.c15இ.$indexname17ซ from db13אω.c15இ.

but probably shouldn't have the "db13אω.c15இ.$" on the index name.



 Comments   
Comment by auto [ 29/Oct/13 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-11440 changed auditLogging of dropIndex to show indexName rather than indexNamespace
Branch: master
https://github.com/mongodb/mongo/commit/6b80fc72e0ec7ad6b23382fe1f47a09e2b56cb8c

Comment by bard.bloom@10gen.com [ 29/Oct/13 ]

Sorry! This should be a SERVER ticket not a QA ticket.

Generated at Thu Feb 08 03:25:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.