|
| 1 | +# MongoDB Shell Security Testing Summary |
| 2 | + |
| 3 | +This document lists specific instances of security-relevant testing that is being |
| 4 | +performed for the MongoDB Shell. All parts of the MongoDB Shell source code |
| 5 | +are subject to integration and unit testing on every change made to the project, |
| 6 | +including the specific instances listed below. |
| 7 | + |
| 8 | +# Security Tests |
| 9 | + |
| 10 | +## Loading the MongoDB `crypt_shared` library securely |
| 11 | + |
| 12 | +mongosh loads the `crypt_shared` MongoDB library at runtime. In order to do so securely, |
| 13 | +we verify that the path resolution logic used for it adheres to expectations, and e.g. |
| 14 | +the shared library will not be loaded if it comes with incorrect filesystem permissions. |
| 15 | + |
| 16 | +<!-- Source File: `packages/cli-repl/src/crypt-library-paths.spec.ts` --> |
| 17 | + |
| 18 | + |
| 19 | +## Authentication End-to-End Tests |
| 20 | + |
| 21 | +While mongosh is a client-side application and therefore, in many cases not responsible |
| 22 | +for correct authentication, we still consider any failure in our authentication tests |
| 23 | +a potential warning sign for security-relevant impact. |
| 24 | + |
| 25 | +<!-- Source File: `packages/e2e-tests/test/e2e-auth.spec.ts` --> |
| 26 | + |
| 27 | + |
| 28 | +## OIDC Authentication End-to-End Tests |
| 29 | + |
| 30 | +In addition to our regular tests for the different authentication mechanisms supported |
| 31 | +by MongoDB, we give special consideration to our OpenID Connect database authentication |
| 32 | +feature, as it involves client applications performing actions based on directions |
| 33 | +received from the database server. |
| 34 | + |
| 35 | +Additional, since the shell supports connections to multiple different endpoints in the |
| 36 | +same application, these tests ensure that OIDC authentication for distinct endpoints |
| 37 | +happens in isolation. |
| 38 | + |
| 39 | +<!-- Source File: `packages/e2e-tests/test/e2e-oidc.spec.ts` --> |
| 40 | + |
| 41 | + |
| 42 | +## TLS End-to-End Tests |
| 43 | + |
| 44 | +Our TLS tests verify that core security properties of TLS connections |
| 45 | +are applied appropriately for mongosh, in particular certificate validation |
| 46 | +and compliance with user-specified behavior that is specific to TLS connectivity. |
| 47 | + |
| 48 | +<!-- Source File: `packages/e2e-tests/test/e2e-tls.spec.ts` --> |
| 49 | + |
| 50 | + |
| 51 | +## Shell History Redaction Tests |
| 52 | + |
| 53 | +The MongoDB Shell redacts items from the shell history file when it detects |
| 54 | +potentially sensitive information in them. Our tests verify this behavior. |
| 55 | + |
| 56 | +<!-- Source File: `packages/history/src/history.spec.ts` --> |
| 57 | + |
0 commit comments