Skip to content

Commit 49b8d9a

Browse files
mungitoperritojeff-allen-mongo
authored andcommitted
DOCS-14181 audit dropCollection views
1 parent 6c860ea commit 49b8d9a

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

source/reference/audit-message.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ associated ``param`` details and the ``result`` values, if any.
133133

134134
.. list-table::
135135
:header-rows: 1
136+
:widths: 20 50 30
136137

137138
* - ``atype``
138139

@@ -244,10 +245,22 @@ associated ``param`` details and the ``result`` values, if any.
244245
- .. code-block:: none
245246
:copyable: false
246247

247-
{ ns: <database>.<collection> }
248+
{
249+
ns: <database>.<collection>,
250+
viewOn: <database>.<collection>,
251+
pipeline: []
252+
}
248253

254+
Starting in MongoDB v5.0 ``dropCollection`` adds an audit event
255+
when a :ref:`view <3.4-reference-views>` is dropped as well as
256+
when a :term:`collection` is dropped. The ``pipeline``
257+
parameter defines the ``view`` referenced in ``viewOn``.
249258

250-
- ``0`` - Success
259+
- | ``0`` - Success
260+
| ``26`` - ``NamespaceNotFound``
261+
262+
If the collection or view does not exist, the audit message shows
263+
the return code as ``result: 26``.
251264

252265
* - :authaction:`dropDatabase`
253266

@@ -256,7 +269,6 @@ associated ``param`` details and the ``result`` values, if any.
256269

257270
{ ns: <database> }
258271

259-
260272
- ``0`` - Success
261273

262274
* - :authaction:`dropIndex`

source/release-notes/5.0.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ Starting in MongoDB 5.0, ``startup`` and ``logout`` audit action types
241241
are available in
242242
:doc:`System Event Audit Messages </reference/audit-message>`.
243243

244+
The ``dropCollection`` audit action type (``atype``) adds an audit
245+
event when a :ref:`view <3.4-reference-views>` is dropped.
246+
244247
``mongosShutdownTimeoutMillisForSignaledShutdown`` Parameter
245248
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
246249

0 commit comments

Comments
 (0)