A Contractor Needs DB Access for a Week. Open the Port?
An external contractor needs a week of database access. A teammate wants to open the DB port to the internet with a strong password. Defend the safe alternatives.
Answer key reviewed by Branko Petric
Your decision
An external contractor needs read access to the production database for one week of analysis work. A teammate proposes opening the database port (5432) to the internet in the firewall and giving the contractor a strong password. What do you do, and why?
The situation
Your company hired an external data contractor for a one-week analysis of order history. The contractor works remotely from their own laptop and asks how to connect to the production Postgres instance. The database lives on a private subnet behind a cloud firewall; today nothing outside the VPC can reach it.
Context
There is an existing VPN used by employees and a small bastion host used for admin SSH, but the contractor has never been onboarded to either. It is Monday morning and the engagement is already billed. A teammate says: fastest path is to add a firewall rule opening 5432 to the internet and give them a really strong password, we will remove it on Friday.
Related challenges
- Secrets Rotation Took Down Prod at 3 AM. Pin Credentials?
Automated rotation revoked a database password while pools and caches still held it, locking prod out at 3am. A teammate wants to pin credentials for a year. Defend fixing rotation instead.
- You Pushed AWS Keys to a Public Repo
Live cloud keys just landed in a public GitHub repo. A teammate says delete the file and force-push. Defend what you do first.
- Your S3 Website Returns 403. Make the Bucket Public?
Objects in S3 return 403 and a teammate wants to turn off Block Public Access to fix it fast. Defend the right way to grant access.
- Access Keys Are Hardcoded on the EC2 Box. Just Rotate Them?
An app on EC2 authenticates to AWS with long-lived IAM user keys in a config file. One leaked. Defend the real fix.