From 1dffe4d73d4445d0f8d2ccb325200bd1c500ae64 Mon Sep 17 00:00:00 2001 From: markofu Date: Wed, 27 Mar 2013 15:47:23 +0000 Subject: [PATCH] Update control-access-to-mongodb-with-authentication.txt When the length is 753, it breaks setting up keyFile authentication on Windows. Modified the instructions to be clearer. --- .../control-access-to-mongodb-with-authentication.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/tutorial/control-access-to-mongodb-with-authentication.txt b/source/tutorial/control-access-to-mongodb-with-authentication.txt index 7523199df76..0a80660cb73 100644 --- a/source/tutorial/control-access-to-mongodb-with-authentication.txt +++ b/source/tutorial/control-access-to-mongodb-with-authentication.txt @@ -226,15 +226,21 @@ authentication with specific MongoDB deployments: Generate a Key File ------------------- -Use the following command at the system shell to generate pseudo-random +Use the following openssl command at the system shell to generate pseudo-random content for a key file: .. code-block:: sh - openssl rand -base64 753 + openssl rand -base64 741 .. note:: + The length should not be too high and should be a multiple of 3. + + On Windows, the maximum size you can request and not have to deal with equals signs is 741. + + On non-Windows systems, the maximum is 753. + Be aware that MongoDB strips whitespace characters (e.g. ``x0d``, ``x09``, and ``x20``,) for cross-platform convenience. As a result, the following keys are identical: