From 6f864ae3310ae07e3c741bbc02519d30ef736f7f Mon Sep 17 00:00:00 2001 From: Dayenne Souza Date: Thu, 7 Nov 2024 15:05:47 -0300 Subject: [PATCH] fix password reading from azure and aws --- DEPLOYING.md | 6 +++--- app/components/app_auth.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DEPLOYING.md b/DEPLOYING.md index 18d5909..f4a3b68 100644 --- a/DEPLOYING.md +++ b/DEPLOYING.md @@ -197,7 +197,7 @@ To effectively manage user access and configuration settings in your app's deplo - **Hiding the Settings Page** - Use `HIDE_SETTINGS: TRUE` to conceal the Settings page. This prevents users from altering configurations that could impact the experience for other users. + Use `HIDE_SETTINGS=TRUE` to conceal the Settings page. This prevents users from altering configurations that could impact the experience for other users. - **OpenAI API Key** @@ -205,7 +205,7 @@ To effectively manage user access and configuration settings in your app's deplo - **Authentication** - Enable `AUTH_ENABLED: TRUE` to restrict app access to authorized users with credentials defined in a `.secrets.toml` file under the `.streamlit` directory: + Enable `AUTH_ENABLED=TRUE` to restrict app access to authorized users with credentials defined in a `.secrets.toml` file under the `.streamlit` directory: ```toml [passwords] @@ -222,7 +222,7 @@ When deploying your app on Azure or AWS, you may need to configure user credenti Add credentials in the format `user=password`, separated by semicolons (`;`), to your web app's environment variables: ```plaintext - USER_CREDENTIALS="user1=pass1;user2=pass2" + USER_CREDENTIALS="user1=pwd1;user2=pwd2" ``` This setup ensures secure handling of user authentication and sensitive configurations across different deployment platforms. By using these configurations, you can maintain control over user access and protect essential settings. diff --git a/app/components/app_auth.py b/app/components/app_auth.py index 0f97282..dd46b55 100644 --- a/app/components/app_auth.py +++ b/app/components/app_auth.py @@ -51,8 +51,8 @@ def load_passwords() -> None: if credentials_string: user_pairs = credentials_string.split(";") for pair in user_pairs: - if ":" in pair: - user, password = pair.split(":") + if "=" in pair: + user, password = pair.split("=") credentials_dict[user] = password secrets_content = {"passwords": credentials_dict}