← All articles
Security6 min read

How to Manage API Keys and Credentials Securely in a Development Team

A practical guide to API key management for dev teams - from the common mistakes teams make to structured, role-based solutions that scale.

How to Manage API Keys and Credentials Securely in a Development Team

Every development team reaches a point where credential chaos becomes a real problem. Someone shares a Stripe API key in Slack. A database password lives in a shared Notion doc. A new developer joins and spends their first afternoon asking teammates to forward credentials one by one.

This guide covers what goes wrong with ad-hoc credential sharing, and how modern development teams structure API key management in a way that actually scales.


The Common Mistakes Teams Make

1. Slack DMs and group chats

Slack is where most small teams start. Someone needs the AWS key. A teammate pastes it in a DM. Three months later, that developer has left - and the key is still sitting in a searchable Slack history that half the company can access.

Slack messages are not encrypted at rest in a way that isolates secrets from other message content. They are indexed for search. They can be accessed by Slack workspace admins. And they are almost never rotated after being shared.

2. Shared spreadsheets and Notion docs

A Google Sheet titled "Dev Credentials" is the next most common solution. It solves the discoverability problem - sort of - but creates new ones. Every person with edit access can read every credential, regardless of whether they need it. There is no audit trail. When a credential is rotated, whoever updates the sheet may or may not remember to tell everyone.

Notion is slightly better because it has page-level permissions, but the same fundamental problem remains: credentials are stored in a tool designed for documentation, not secret management.

3. .env files committed to Git

This happens in startups more often than anyone admits. A developer adds credentials to a .env file and commits it. GitHub scans for exposed secrets and flags it. The team rotates the keys in a panic. But the commit is still in Git history.


What Proper API Key Management Looks Like

A structured credential management system for a development team has a few non-negotiable properties:

Role-based access control

Not everyone on the team needs access to every credential. A QA engineer needs staging database access. They do not need the production Stripe secret key.

Proper credential management assigns roles to team members and restricts which credentials each role can see. When a QA engineer leaves, their access is revoked - not the credential itself.

An audit trail for every reveal

Every time a credential is viewed, copied, or exported, that event should be logged with a timestamp and the identity of the person who accessed it. This is essential for compliance (SOC 2, ISO 27001) and for investigating incidents.

Per-project credential vaults

Credentials belong to projects, not to individuals. A project vault holds all the API keys, database passwords, and environment variables for that project. New team members are granted access to the vault, not handed credentials directly.

Credential expiry tracking

Many teams rotate API keys on a schedule or when specific events occur (a team member leaving, a suspected breach). A credential management system tracks expiry dates and sends reminders before a credential expires - preventing outages caused by forgotten rotations.


Practical Steps to Improve Your Team's Credential Security

  1. Audit what you currently have. List every shared credential location: Slack, Notion, Google Sheets, .env files in repos. Understand the scope of the problem before solving it.

  2. Establish a "no credential in chat" policy. Even with a vault in place, old habits are hard to break. Make it an explicit team rule that credentials are never shared in Slack, email, or any chat tool.

  3. Use a dedicated credential vault. Tools like SlateBeaver are built specifically for this. Each project gets a vault. Access is role-based. Every reveal is logged. Environment variables are managed separately from passwords.

  4. Rotate credentials when someone leaves. This is the most commonly skipped step. When a developer offboards, run through a checklist: which credentials did they have access to? Which should be rotated? A proper offboarding checklist built into your credential management tool makes this systematic rather than an afterthought.

  5. Start with your highest-risk credentials. Production database passwords and payment gateway keys are the highest priority. Start there, then work outward to staging and development credentials.


Summary

API key management for development teams does not need to be complex, but it does need to be intentional. The common solutions - Slack, Notion, spreadsheets - introduce risk that compounds over time as teams grow and employee turnover increases.

Structured credential management with role-based access, per-project vaults, and an audit trail is not just a security best practice. It is the foundation for a team that can scale without accumulating security debt.

Try SlateBeaver free for 7 days →