Skip to content

Implement a secure backend proxy to handle database interactions #23

@joaoc-dev

Description

@joaoc-dev

Currently, both the production and preview MongoDB Atlas clusters have access whitelisted from anywhere (0.0.0.0/0) to allow connections from Vercel-hosted frontend deployments.

This is insecure and not suitable for production use.
Vercel uses dynamic IPs, which makes static IP whitelisting unreliable.
We could move away from deploying at vercel but I don't think that's worth it for now.

Proposed solution:
Implement a secure backend proxy (e.g. hosted on a platform with static outbound IPs or via serverless functions) to handle all database interactions. The MongoDB clusters will then whitelist only the proxy's IP address(es), improving security.

Relates to #22

Metadata

Metadata

Assignees

Labels

backendIssue related to backendconfigurationConfigurations at code and project levelenhancementNew feature or request

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions