Skip to content

Commit

Permalink
fix password reading from azure and aws
Browse files Browse the repository at this point in the history
  • Loading branch information
dayesouza committed Nov 7, 2024
1 parent ff47d0c commit 6f864ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ 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**

Set `OPENAI_API_KEY="your-key"` to ensure secure access to OpenAI services. This key allows interaction with OpenAI's API while keeping it confidential.

- **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]
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions app/components/app_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 6f864ae

Please sign in to comment.