I have a database that my streamlit app connects to. I don’t want the DB firewall rules to be wide open and would at least like to narrow it down to the datacentre / region that Streamlit cloud is hosted on.
I know Streamlit is hosted on Google Cloud (GCP) but I can’t see any docs as to what IP range that would be.
Obviously I could write an API to wrap by DB but it’s just experimental code and I’d rather not go to the effort (the value and sensitivity of the data is zero).
As things stand, a port scanner eventually finds my DB and even though it can’t break the security it can affect availability.
IP allowlisting won’t be possible on Community Cloud going forward since the platform is geared towards community members trying to share their apps and code publicly
The allowlisting is for the database, not to restrict the app to certain users. As things stand no Streamlit Community Cloud application can access a database without that database violating standard security practices. For the time being I’ve just allowed a bunch of GCP endpoints at random and I’ve not been attacked again.
As an aside, I take it Snowflake is the intended way to go for people wanting to develop non-trivial Streamlit apps? (which tbh doesn’t feel like what Streamlit is for - i.e. if things are getting more complicated than an ML showcase then maybe it shouldn’t be a Streamlit?).
I love the simplicity of the framework btw, it’s great for prototyping.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.