Best practices for securely storing API keys
Picture by Jose Fontano

Best practices for securely storing API keys

In the past, I’ve seen many people use Git repositories to store sensitive information related to their projects.

Lately, I’ve been seeing some people announce that they’re storing API keys on their private GitHub repositories. I’m writing this article because people should understand the risks of storing API keys with your code.

This article is not intended to be a permanent solution to the problems you might have with storing API keys. Instead, it’s my own analysis of the problem and my suggestions on how to fix it.

So, what exactly is the problem with storing sensitive information near your code on a Git repository?

Why you shouldn’t store API keys on Git repositories

Storing API Keys, or any other sensitive information, on a git repository is something to be avoided at all costs. Even if the repository is private, you should not see it as a safe place to store sensitive information.

(...)

So, where should API keys be stored?

There are many alternatives for securely storing API keys and secrets. Some of them let you use your Git repository and encrypt the sensitive data. Other tools are more sophisticated and decrypt sensitive information as part of a deploy workflow. Let’s look at some of the available solutions.

(...)

To get all the details, read the full, original article.

要查看或添加评论,请登录

Bruno Pedro的更多文章

  • Three Meaningful API Metrics

    Three Meaningful API Metrics

    How can you improve an API if you’re not measuring its behavior? There’s no way to improve what you can’t measure…

    1 条评论
  • Data Models, Types, or Schemas?

    Data Models, Types, or Schemas?

    This article was originally published in the API Changelog newsletter on February 14, 2025. Naming things is hard.

    2 条评论
  • Selectively Serving Your API Reference

    Selectively Serving Your API Reference

    This article was originally published in the API Changelog newsletter on February 7, 2025. What are you looking for…

  • Are AI Agentic Workflows the Future of Automation?

    Are AI Agentic Workflows the Future of Automation?

    This article was originally published in the API Changelog newsletter on January 30, 2025. Most integrations are just…

  • Non-technical API Design

    Non-technical API Design

    Originally published on August 27, 2019, on my personal blog. Last week I published a tweet asking people that consider…

    2 条评论
  • What are Web APIs

    What are Web APIs

    What exactly are Web APIs? Why are Web APIs so popular and widely used? Let’s first explore what APIs are so you can…

  • How to securely store API keys

    How to securely store API keys

    In the past, I’ve seen many people use git repositories to store sensitive information related to their projects…

  • 5 steps to API frustration

    5 steps to API frustration

    This article is a satire that describes what often happens to developers that are looking for an API and want to…

  • API friction

    API friction

    The concept of friction in products and applications is not something new and can be experienced by almost everyone…

  • Growing your business with an API

    Growing your business with an API

    This article summarizes a talk I recently gave at the Nordic APIs Platform Summit in Stockholm, Sweden. The full title…

社区洞察

其他会员也浏览了