-
-
Notifications
You must be signed in to change notification settings - Fork 432
Description
Problem
Users need to be able to add API keys from the UI in #1426.
Furthermore, we should probably store these in a file separate from the config.
Proposed Solution
-
Add the API keys form section back to the AI settings.
-
Read API keys from the environment variables passed to the
jupyter-lab
process. These should be listed in the UI but should also be read-only. -
Allow users to add API keys. Upon doing so, they should be saved in a new/existing
.env
file at the root of the current workspace. -
Read API keys from the
.env
file. These should be listed in the UI and be made editable. -
Make sure to create a
.gitignore
file containing.env
automatically to ensure users don't accidentally commit the.env
file to the repo. Add.env
to.gitignore
if the file already exists.
Additional questions
-
Are there any new risks with this approach? We are now saving secrets in a local
.env
file instead of the global config under the Jupyter data directory. We are moving towards having local config files because we want to allow different Jupyter AI configurations in different directories. -
Should we use a secrets manager instead? What is the status of that work? cc @brichet @jtpio