It's step 1 in /includes/steps/enable-authentication-in-replica-set.rst,
as borrowed from /includes/steps/generate-key-file.rst.

This follows the approach use in /includes/steps/enable-authentication-in-sharded-cluster.rst.