Repository navigation
MLE-34176 fix hard-coded credentials in examples - #149
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the notebook credential and sample-data URL updates.
No open issues 🎉
What changed in this PR
This PR removes hard-coded passwords from two MarkLogic example notebooks and updates their employee sample-data URLs.
Changes:
- Read passwords from environment variables, with
getpassprompts as fallbacks. - Reuse the configured credentials in the Spark example through separate connection options.
- Update both notebooks to the relocated
500-employees.jsonfile.
| File | Description |
|---|---|
examples/release-1.1-examples.ipynb |
Externalizes client and Spark credentials and updates the sample-data URL. |
examples/python-blog-post.ipynb |
Externalizes admin and example-user passwords and updates the sample-data URL. |
Review effort: Balanced
rjrudin
left a comment
There was a problem hiding this comment.
I strongly recommend against spending time and money on these Polaris warnings about what are clearly examples. Requiring environment variables makes the examples harder to use and accomplishes nothing from a security perspective.
…r "URI privilege required"
|
Note as well that the password is in plaintext at https://github.com/marklogic/marklogic-python-client/blob/master/test-app/src/main/ml-config/security/users/python-docs-user.json . That's in a folder called "test-app". |
|
Yes, we have agreed on not spending time to fix the hard-coded credentials used for testing. |
Removed the hard-coded admin password and user password. Both are now read from environment variables, with a getpass prompt as the fallback.
Updated the stale 500-employees URL to the new location so that the test can run successfully.