r/devops • • Oct 06 '26

Security Database security

So I work in a very small company as a dev
And we have external devops company which manages local http servers and MySQL servers for our saas product.

So the thing is I would like to shift some of their work to our in-house dev team.

I thought about starting small and manage a separate server on the cloud that will just run internal cron based daily tasks. But those tasks require read and write permission to the existing db which managed by the local company. Could I ask them to give me access to to the db from another server? I read that it’s a bad practice to expose prod db to the internet even if it has white list so I’m not sure here.

0 Upvotes

21 comments sorted by

View all comments

Show parent comment

1

u/Low-Opening25 Oct 06 '26

why would he be missing SSL? DB enforcing TLS connections solves the problem in one day instead of some convoluted networking shenanigans. There is plenty of database SaaS out there supporting major platforms using TLS over public infrastructure

2

u/delamon Oct 06 '26

Even with mTLS, exposing MySQL to public internet feels wrong. Unless there is a need for accepting connections from third-party clients, hiding it behing VPN will be safer

-1

u/Low-Opening25 Oct 06 '26

you expose it on some long random prefix host, non standard port, it’s not going to be easy to find + mTLS and it’s pretty solid for most use cases as long as you don’t leak credentials.

1

u/Kamikx Oct 07 '26

No. Just no.

-1

u/Different-Car6898 Oct 06 '26

Usually, when people split DB and App from same server, they forget to think about TLS. Just auth and IP whitelisting. They mentioned Mysql on a server, so no SaaS. And, as I mentioned above, to enforce TLS on Mysql you need to generate a cert and change the way you handle DB connection in all App drivers. It's another secret to manage, and rotate, and since you have another party managin that secret, people often forget to communicate rotation etc. Soo, VPN p2p just solves it long term so you don't think much about it... Ofc it's easy to manage when everything is on your infra. I was giving tips, nothing else:)

1

u/Low-Opening25 Oct 06 '26

all of that takes 25mins to setup

0

u/Different-Car6898 Oct 06 '26

It's not about setup. It's about ownership...

1

u/Low-Opening25 Oct 06 '26

if you mean of tech dept and complexity then you win

0

u/Different-Car6898 Oct 06 '26

Didn't see it as competition, but glad we agree about something being a potential problem 😊