-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrations: Update notebook to omit Mongo credentials from commands when authentication disabled #672
Labels
enhancement
New feature or request
Comments
I'm going to defer this until after the Berkeley schema roll out. |
Here's a snippet that has the effect I want, although it infers the authentication enabled-ness from the value of the username configuration parameter (as opposed to getting an explicit indicator of authentication enabled-ness, assuming such a thing exists): cli_options_for_authentication = f"""
--username='{cfg.origin_mongo_username}' \
--password='{cfg.origin_mongo_password}' \
--authenticationDatabase='admin'
""" if cfg.origin_mongo_username not in ["", None] else ""
# Load the transformed collections into the origin server, replacing any same-named ones that are there.
shell_command = f"""
{mongorestore} \
--host='{cfg.origin_mongo_host}' \
--port='{cfg.origin_mongo_port}' \
{cli_options_for_authentication} \
--gzip \
--verbose \
--dir='{cfg.transformer_dump_folder_path}' \
--drop \
--preserveUUID \
--stopOnError
""" |
eecavanna
moved this to In Progress
in 2024 - Sprint 48 - October 21 - November 1, 2024
Oct 31, 2024
8 tasks
8 tasks
eecavanna
moved this from In Progress
to In Review
in 2024 - Sprint 48 - October 21 - November 1, 2024
Oct 31, 2024
github-project-automation
bot
moved this from In Review
to Done
in 2024 - Sprint 48 - October 21 - November 1, 2024
Oct 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In migrate_10_8_0_to_11_0_0.ipynb, there is a cell that contains the following:
Task
When the Mongo server does not have authentication enabled, omit the
--username
,--password
, and--authenticationDatabase
options from the command.Do the same for similar cells.
The text was updated successfully, but these errors were encountered: