I'm curious about the OpenAI keys in the Streamlit apps on Share App

I’m curious about the OpenAI keys in the Streamlit apps on Share App. Are the services on Share App intended for actual usage, or is the purpose to fork and use them locally?

When entering an OpenAI key, it seems like the key information would be sent to the server. I’m curious if there are any security concerns with this. If there are no issues, I’d like to develop something similar and share it as well!

I’m leaving this question because it’s hard to confirm.

Thank you!

1 Like

Hi @jongmin_lee1

That’s a great question, apps that can be forked would allow you to either replicate the app or use it as the starting point for adding further features to it. As for the OpenAI API key, you can securely store them in the Secrets management on the Community Cloud platform as well as locally or for self-deployment. Such keys can then be used in-app by using the st.secrets method.

For further information on Secrets management in Streamlit please refer to the following Docs page:

1 Like

Thank you for the kind explanation. However, what I was curious about is different. It’s not about my OpenAI key, but when sharing an app on Streamlit App Share, like the attached image, I want to confirm if there are any security concerns in passing the OpenAI key to the user and using it!
@dataprofessor

Indeed, if this is not your own streamlit app, you must trust the developer of this third-party streamlit app not to store or misuse the credentials you have voluntarily entered there.

1 Like

Hi @jongmin_lee1

There is always a risk when using your API key in any code. Unless you have access to the code of the app and can explicitly see that the API key is not misusing the key then you can proceed with care.

I wrote a blog on how you can securely use API keys (see link below) in Streamlit apps:

Hope this helps!

3 Likes

thank you for your reply! it really helps! Have a good day :slight_smile:

1 Like

thank you for your reply! it really helps!
may be opening code helps.
Have a good day :slight_smile:

1 Like

You’re welcome!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.