Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit a6353a0

Browse files
authored
Improved README (#27)
1 parent 274424a commit a6353a0

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed

README.md

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# GitOps Secrets
22

3-
Hello, GitOps Secrets! Goodbye environment variable storage limits.
3+
A SecretOps workflow for bundling encrypted secrets into your deployments.
44

55
![GitOps SecretsDiagram](https://user-images.githubusercontent.com/133014/158977309-ce9efc17-ba94-4cb7-a7a4-bdb101a67e6d.jpg)
66

7-
It's been a long-standing frustration that AWS Lambda deployments have a 4KB environment variable limit. This limit also impacts other environments such as [Vercel](https://vercel.com/support/articles/how-do-i-workaround-vercel-s-4-kb-environment-variables-limit) and the [Serverless framework](https://www.serverless.com/framework/docs/providers/aws/guide/variables) who use AWS Lambda as their infrastructure provider.
7+
## Usage
88

9-
A GitOps Secrets workflow eliminates environment variable limits without insecure hacks such as storing unencrypted .env files in your builds and only takes three steps:
10-
11-
1. Install the GitOps Secrets package (currently in developer preview):
9+
1. Install the `gitops-secretes` package:
1210

1311
```sh
1412
npm install gitops-secrets
@@ -47,25 +45,27 @@ const secrets = loadSecrets();
4745
4846
## Background and Motivation
4947
50-
As creators of the [Doppler Universal Secrets Platform](https://www.doppler.com/) who provide secrets sync integrations for [Vercel](https://vercel.com/integrations/doppler) and [Serverless](https://docs.doppler.com/docs/enclave-installation-serverless), we've helped customers individually to work around this limitation.
48+
Exceeding AWS Lambda's 4KB environment variable limit is a common problem that also impacts platforms such as [Vercel](https://vercel.com/support/articles/how-do-i-workaround-vercel-s-4-kb-environment-variables-limit) and the [Serverless framework](https://www.serverless.com/framework/docs/providers/aws/guide/variables) which deploy on top of AWS Lambda.
49+
50+
A SecretOps workflow that bundles encrypted secrets into a deployment eliminates such environment variable limits without insecure hacks such as storing unencrypted .env files in your builds.
5151
52-
But long-term, we wanted a generic, flexible and open source solution that both our customers and other teams experiencing the same issue could use.
52+
As creators of the [Doppler SecretOps Platform](https://www.doppler.com/) which provide secrets sync integrations for [Vercel](https://vercel.com/integrations/doppler) and [Serverless](https://docs.doppler.com/docs/enclave-installation-serverless), we built this to provide a secure solution for our customers and the open source community.
5353
5454
Our goal was to design a new way of accessing secrets in production that:
5555
56-
- [x] Allowed for a secrets payload of any size
57-
- [x] Could be up and running in minutes
58-
- [x] Scaled to work in any environment, including local development
59-
- [x] Could support the most restrictive serverless platforms
60-
- [x] Provided first class support for ES modules
61-
- [x] Prevented unencrypted secrets from ever touching the file system
62-
- [x] Abstracted away the complexity of secrets fetching using community contributed [providers](./src/providers/)
56+
- Allowed for a secrets payload of any size
57+
- Could be up and running in minutes
58+
- Scaled to work in any environment, including local development
59+
- Could support the most restrictive serverless platforms
60+
- Provided first-class support for ES modules
61+
- Prevented unencrypted secrets from ever touching the file system
62+
- Abstracted away the complexity of secrets fetching using community-contributed [providers](./src/providers/)
6363
6464
## Providers
6565
6666
A provider is designed to abstract away the complexities of fetching secrets from any secret manager or secrets store by exposing a single async `fetch` method.
6767
68-
A secrets provider returns a plain Key-Value Object to ensure that serializing to and from JSON during encryption and decryption produces the same object structure originally fetched from the provider.
68+
A secrets provider returns a plain Key-Value Object to ensure that serializing to and from JSON during encryption and decryption produces the same object structure initially fetched from the provider.
6969
7070
The current list of providers are:
7171
@@ -75,13 +75,11 @@ We'd love to see the list of providers grow! Please see our [contributing guide]
7575
7676
## Encryption and Decryption
7777
78-
There are two file formats available for bundling secrets into your build:
78+
There are two file formats available for bundling encrypted secrets into your deployments:
7979
8080
- **JSON**: Encrypted JSON file.
8181
- **JS Module**: Encrypted JSON embedded in JS module.
8282
83-
You may be forced to use the JS module format if reading static JSON at runtime is problematic, e.g. [Vercel prefers a JS module with a custom path](https://github.com/DopplerUniversity/vercel-gitops-secrets-nextjs), but otherwise, there isn't a compelling reason to use one format over another.
84-
8583
### JSON
8684
8785
To encrypt secrets to a JSON file:
@@ -119,7 +117,11 @@ secrets.populateEnv();
119117
120118
### JS Module
121119
122-
The JS module format suits restricted environments where reading static files is problematic and depending upon the platform, building with a custom path may be required.
120+
The JS module format is ideal for restricted environments such as Vercel where application-wide access to reading static files is problematic.
121+
122+
Depending upon the deployment platform and framework, you can potentially omit the `path` parameter to have encrypted secrets access and storage managed internally for you.
123+
124+
But if using Vercel with Next.js for example, the `path` configures the module to be output in your codebase with the format of the module matching that of your application.
123125
124126
To encrypt secrets to a JS module:
125127
@@ -129,27 +131,28 @@ const secrets = require("gitops-secrets");
129131
async function main() {
130132
const payload = await secrets.providers.doppler.fetch();
131133
132-
// Internally managed storage
134+
// Option 1: Internally managed storage
133135
secrets.build(payload);
134136
135-
// Custom path for restrictive environments
137+
// Option 2: Custom path for restrictive environments
136138
secrets.build(payload, { path: "lib/secrets.js" });
137139
}
138140
139141
main();
140142
```
141143
142-
Then to decrypt secrets from a JS module, you can rely on internally managed storage:
144+
To decrypt secrets from a JS module using internally managed storage, use the package-level `loadSecrets` method:
143145
144146
```js
145147
const { loadSecrets } = require("gitops-secrets");
148+
146149
const secrets = loadSecrets();
147150
148151
// Optionally merge secrets into environment variables
149152
secrets.populateEnv();
150153
```
151154
152-
Or import directly from the generated JS module:
155+
Or use the `loadSecrets` method from the generated module (ES modules also supported):
153156
154157
```js
155158
const { loadSecrets } = require("../lib/secrets");
@@ -159,18 +162,14 @@ const secrets = loadSecrets();
159162
secrets.populateEnv();
160163
```
161164
162-
### Getting Started
163-
164-
We recommend checking out the [Working around Vercel’s 4KB Environment Variables Limit for Node.js with GitOps Secrets article](https://hashnode.com/preview/623404babef4c71aa6f0d65e) which takes you through the entire process step-by-step.
165-
166-
## Examples
165+
## Getting Started
167166
168-
Take a look at the [Vercel GitOps Secrets Next.js sample repository](https://github.com/DopplerUniversity/vercel-gitops-secrets-nextjs) and deploy to Vercel to see it in action.
167+
We recommend checking out the [Working around Vercel's 4KB Environment Variables Limit for Node.js with GitOps Secrets](https://hashnode.com/preview/623404babef4c71aa6f0d65e) blog post which guides you through the entire process.
169168
170-
## Contributing
169+
Or take a look at the [Vercel GitOps Secrets Next.js sample repository](https://github.com/DopplerUniversity/vercel-gitops-secrets-nextjs) to see a complete working example that you can test and deploy to Vercel.
171170
172-
As this package is still in developer preview, a huge contribution you can make is simply testing this with your preferred framework and serverless provider as we'd love your feedback!
171+
## Support
173172
174-
You can get support in the [Doppler community forum](https://community.doppler.com/), find us on [Twitter](https://twitter.com/doppler), and for bugs or feature requests, [create an issue](https://github.com/DopplerHQ/gitops-secrets-nodejs/issues) on this repository.
173+
You can get support in the [Doppler community forum](https://community.doppler.com/), find us on [Twitter](https://twitter.com/doppler), and for bugs or feature requests, [create an issue](https://github.com/DopplerHQ/gitops-secrets-nodejs/issues) on the [DopplerHQ/gitops-secrets-nodejs](https://github.com/DopplerHQ/gitops-secrets-nodejs) GitHub repository.
175174
176-
We'd also love to see the number of providers grow and you can check out our [contributing guide](CONTRIBUTING.md) to get started.
175+
We'd also love to see the number of providers grow, and you can check out our [contributing guide](CONTRIBUTING.md) to get started.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "gitops-secrets",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"author": "Ryan Blunden <ryan.blunden@doppler.com>",
5-
"description": "Securely bundle encrypted secrets into your deployments and safely decrypt at runtime.",
5+
"description": "SecretOps workflow for bundling encrypted secrets into your deployments to safely decrypt at runtime.",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/DopplerHQ/gitops-secrets-nodejs.git"

0 commit comments

Comments
 (0)