Shopify / Shopify/shadowenv

[idea] load directly from ejson

Open
#125 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
458
Forks
22
PR merge metrics
No merged PRs in 30d

Description

This would require some unfortunate linking or rewriting but it would be kind of excellent to have a single (env/load-from-ejson "config/secrets.ejson" ".env") or something. This would load that ejson file, decrypt it, identify the subtree of environment map, and load it as name/value pairs.

Challenges:

  • Would require an additional change detection feature
  • A bit more expensive than current evaluation
  • New failure modes (key not present, key invalid, ciphertext invalid, JSON invalid, file missing)
  • ejson is written in go so we couldn't trivially import it as a lib, and I don't love the idea of shelling out.
  • Reimplementing just the decryption side of ejson would be annoying and feels wrong, but maybe not so bad: would be pretty easy and we already have dalek-ed25519 which would be most of the right libraries.

Benefits:

  • Disincentivizes writing decrypted secrets to disk
  • Appealingly nice integration between our tools.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed env/load-from-ejson entry point and the current environment-loading flow. Determine how config/secrets.ejson would be decrypted and mapped into .env-style name/value pairs, including the listed failure modes and change detection; done means the integration works without writing decrypted secrets to disk.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, rust
Domain
cli, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.