There are database services offering access to the database via a HTTPS API, such as Neon and Algolia. This is great for serverless environments, but from a security standpoint, I’m curious if this setup effectively addresses the risks of exposing a public-facing database that can be accessed by any client.
The most secure approach I’ve found for direct access to publicly facing databases is to use a client certificate as an additional layer of security, alongside traditional credentials. When comparing these two approaches—using HTTPS API vs. client certificates—what is the more secure option? What are the specific security concerns or drawbacks of each method?