Blog
  • AI Gateway
  • AI Security
  • AIOps
  • API Security
  • API Gateway
|
    • API Management
    • API Development
    • API Design
    • Automation
    • Service Mesh
    • Insomnia
    • View All Blogs
  1. Home
  2. Blog
  3. Engineering
  4. 3 Solutions for Avoiding Plain-Text Passwords in Insomnia
Engineering
December 8, 2020
3 min read

3 Solutions for Avoiding Plain-Text Passwords in Insomnia

Kevin Chen
Topics
InsomniaAPI SecuritySecrets Management
Share on Social

More on this topic

Videos

PEXA’s Resilient API Platform on Kong Konnect

Webinars

Why API-First Starts With Kong Insomnia

See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

Get a Demo

When testing APIs, software engineers often repeat identical values across multiple requests, but who wants to waste time typing the same values every time?

Insomnia's environment variables solve this problem by allowing you to define a value once as an environment variable and reference that value wherever it’s needed. Insomnia also enables you to override certain variables using sub-environments or folder environments. Standard variables are base URLs, authentication tokens and resource IDs, but you can create any variables that help you save time.

Eventually, you'll run into a request that requires some form of authentication. The issue with storing passwords in plain text is that anyone can read them.

The Solutions We Discovered Together

This issue prompted the community to question how to avoid plain-text passwords in the “Manage Environments” section of Insomnia. Thanks to a combination of community contributions and Insomnia features, you can easily avoid this situation through various options:

1. Use Private Environments

The easiest solution is to use private environments. A private environment will never be exported or synced. However, it will still be in plain text, so it doesn't completely solve the issue at hand, but I wanted to point out that it is available.

2. Use ENV Files

My preferred option would be using env files. An Insomnia plugin created by community member Edirin made this possible. Huge thanks to him for creating this Insomnia Plugin – dotenv that makes it tenfold easier to use env files in environments.

To use Edirin's creation:

  1. Open Insomnia preferences. The shortcuts are (Ctrl + ,) or (Cmd + ,) depending on your operating system.
  2. Navigate to the Plugins tab and type in "insomnia-plugin-dotenv" in the search bar.
  3. Click "Install Plugin."

Plain-Text Passwords in Insomnia: Install DotEnv Plugin

The alternative, and perhaps easier, installation method is to visit the plugin hub and click the "Install in Core" button on the top right.

After installing the dotenv plugin:

  1. Navigate back to the "Manage Environment" page.
  2. Create a key-value-pair where the value references the "dotenv" plugin you just installed. The process uses regular JSON, so add your key, and when typing the value, press ctrl + space (or cmd + space) and select the dotenv plugin from the autocomplete dropdown. Then, click on the tag and configure the plugin. Here is an example of what it would look like:

Plain-Text Passwords in Insomnia: Configure Plugin DotEnv

  1. Choose the .env file and which variable name you need to retrieve from it. The live preview below is a nice touch to ensure you see the value assigned to the variable.
  2. Click "Done," and you're good to go!

3. Use ENV Files With Sub Environments

Opender took it one step further by utilizing the Insomnia Plugin – dotenv alongside sub environments.

  1. As seen in this sample environment, you'll want to map each variable against the env file in the base Insomnia environment.
  2. Specify an envFilePath variable in the three sub environments, e.g., .env.local, .env.staging and .env.production.
  3. Most importantly, when consuming the dotenv plugin, reference the envFilePath variable instead of hard-coding it.

Plain-Text Passwords in Insomnia: envfilepath

This is handy for collaboration. The environment variable setup is shared (in the base environment). Still, each collaborator provides the specific keys from a file on their file-system, which is never synced or exported.

Thank You, Insomnia Community!

The results of this collaboration to avoid plain-text passwords in Insomnia demonstrate two things:

  1. The community is incredible.
  2. Insomnia is awesome.

The combination of these two created a fantastic new plugin and excellent use case. I'd like to make one last shout out to Alex for kicking it off in the following GitHub issue. We're all a little better at protecting our plain-text passwords now, thanks to you.

You can explore the other 250+ Insomnia plugins available on the Plugin Hub. There are tons of excellent open source plugins. If you can't find something you need, Insomnia has documentation to help you create your own.

Check out our recent blog post for even more Insomnia tips: Service Design Guidelines with OpenAPI and Kong

Topics
InsomniaAPI SecuritySecrets Management
Share on Social
Kevin Chen

Recommended posts

Kong Insomnia 11: Elevating API Security and Collaboration

Kong Logo
Product ReleasesMarch 18, 2025

We’re excited to announce the general availability of Kong Insomnia 11! This release introduces third-party vault integrations for enhanced security, an all-new Git sync experience for more seamless collaboration, and support for multi-tabs to impro

Adam Jiroun

From Chaos to Control: How Kong AI Gateway Streamlined My GenAI Application

Kong Logo
EngineeringOctober 6, 2025

🚧 The challenge: Scaling GenAI with governance While building a GenAI-powered agent for one of our company websites, I integrated components like LLM APIs, embedding models, and a RAG (Retrieval-Augmented Generation) pipeline. The application was d

Sachin Ghumbre

10 Ways Microservices Create New Security Challenges

Kong Logo
EngineeringOctober 1, 2025

Why are Microservices Security Risks? Traditional security was simple. One perimeter. Few entry points. Clear boundaries. Microservices shattered this model. Now organizations manage hundreds of independent services. The average number of API calls

Mike Bilodeau

5 Best Practices for Securing Microservices at Scale in 2025

Kong Logo
EngineeringSeptember 26, 2025

The Challenge: Securing Distributed Systems Netflix operates over 1,000 microservices handling two billion daily requests (Microservices architecture: from Netflix to APIs). One security gap can trigger cascading breaches. Traditional perimeter sec

Kong

Federated Deployments with Control Plane Groups

Kong Logo
EngineeringSeptember 24, 2025

What are Control Plane Groups? Control Plane Groups in Kong Konnect provide a structured way to manage multiple control planes within a single organization. Think of it as a federated approach: different teams can deploy and manage their own APIs wh

Declan Keane

Announcing Kong's Integration with Vault!

Kong Logo
NewsMay 28, 2019

Today we’re excited to show how Kong Enterprise customers can utilize our new plugin for HashiCorp Vault for authentication and secrets management. Like the Terraform integration released last year, this new integration with Vault represents ano

Mike Bilodeau

Introducing Kong Insomnia 12

Kong Logo
Product ReleasesNovember 4, 2025

Before we jump in… We spent the summer investing in our core experiences like Git Sync, SSO/SCIM, and more. Check out our changelog for all the details. We’re ready for you! Looking for best practices in Insomnia? Check out our new Youtube playli

Haley Giuliano

Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

Get a Demo
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, AI gateways, service mesh, and ingress controller.

Sign up for Kong newsletter

    • Platform
    • Kong Konnect
    • Kong Gateway
    • Kong AI Gateway
    • Kong Insomnia
    • Developer Portal
    • Gateway Manager
    • Cloud Gateway
    • Get a Demo
    • Explore More
    • Open Banking API Solutions
    • API Governance Solutions
    • Istio API Gateway Integration
    • Kubernetes API Management
    • API Gateway: Build vs Buy
    • Kong vs Postman
    • Kong vs MuleSoft
    • Kong vs Apigee
    • Documentation
    • Kong Konnect Docs
    • Kong Gateway Docs
    • Kong Mesh Docs
    • Kong AI Gateway
    • Kong Insomnia Docs
    • Kong Plugin Hub
    • Open Source
    • Kong Gateway
    • Kuma
    • Insomnia
    • Kong Community
    • Company
    • About Kong
    • Customers
    • Careers
    • Press
    • Events
    • Contact
    • Pricing
  • Terms
  • Privacy
  • Trust and Compliance
  • © Kong Inc. 2025