-
Notifications
You must be signed in to change notification settings - Fork 934
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
Add documentation examples for loading credentials externally #2299
Conversation
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com>
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com>
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com>
@@ -113,3 +113,70 @@ def after_dataset_loaded(self, dataset_name: str, data: Any) -> None: | |||
end = time.time() | |||
self._logger.info("Loading dataset %s ended at %0.3f", dataset_name, end) | |||
``` | |||
|
|||
## Use Hooks to load external credentials | |||
We recommend using the `after_context_created` Hook to add credentials to the session's config loader instance. In this example we show how to load credentials from Azure KeyVault. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to KeyVault?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth saying something like other stores are supported (examples) and explain what differences there may be (if any)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I added a couple of comments of revisions and maybe we could put something about other key vaults being supported (if they are ?) but that's a lower priority.
Co-authored-by: Jo Stichbury <jo_stichbury@mckinsey.com>
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com>
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Just some minor suggestions. 🌟
} | ||
``` | ||
|
||
And finally, don't forget to add the hook to your `settings.py` file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add this link here to our docs on how to register hook implementations
.
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com>
Signed-off-by: Ahdra Merali ahdra.merali@quantumblack.com
Description
This PR resolves issue #2148.
Checklist
RELEASE.md
file