Skip to content

Store storefront config in encrypted ejson files - #577

Merged
kieran-osgood-shopify merged 1 commit into
mainfrom
ejson
Aug 12, 2026
Merged

Store storefront config in encrypted ejson files#577
kieran-osgood-shopify merged 1 commit into
mainfrom
ejson

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Adds an encrypted ejson file for the e2e configuration and the demo app
Adds a dev secrets edit command that wraps up decryption -> editing -> encryption flow so edits are secure

This is how the flow works in practice, a 1 time prompt to download the private key for decryption, and then dev up will work smoothly going fowards

Screen.Recording.2026-08-11.at.17.57.52.mov

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from d854029 to 5dfb0bb Compare August 5, 2026 11:06
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from 5dfb0bb to b16294b Compare August 5, 2026 11:35
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the ejson branch 2 times, most recently from af064ae to 386cb6e Compare August 5, 2026 11:45
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from b16294b to 0075a38 Compare August 5, 2026 11:45
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from 0075a38 to 9571f14 Compare August 5, 2026 12:33
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from 9571f14 to 398373e Compare August 6, 2026 15:48
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from 398373e to ae576c3 Compare August 6, 2026 17:30
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from ae576c3 to 739c95b Compare August 7, 2026 11:05
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from 739c95b to 028246e Compare August 7, 2026 11:25
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from 028246e to f3bba28 Compare August 7, 2026 13:51
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from f3bba28 to b874950 Compare August 7, 2026 14:15
@kieran-osgood-shopify
kieran-osgood-shopify marked this pull request as ready for review August 7, 2026 15:25
@kieran-osgood-shopify
kieran-osgood-shopify requested a review from a team as a code owner August 7, 2026 15:25
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/e2e-checkout-customer-account branch from b874950 to 9040a4d Compare August 10, 2026 09:08
@kieran-osgood-shopify
kieran-osgood-shopify changed the base branch from kieran-osgood/e2e-checkout-customer-account to graphite-base/577 August 10, 2026 14:01
@kieran-osgood-shopify
kieran-osgood-shopify changed the base branch from graphite-base/577 to main August 10, 2026 14:01
Comment thread scripts/secrets_edit
Root `.env` currently serves both the sample apps and the E2E suite, so
running the suite overwrites the storefront config a developer keeps for
their own store, and none of those values can be shared or reviewed.

This first step adds the encrypted source of truth and the tooling around
it. Nothing reads these files yet, so behaviour is unchanged.

- `config/secrets/demo.ejson` and `config/secrets/e2e.ejson` hold every
  value, secret and non-secret, so no plaintext config exists to commit by
  accident. Each holds one `environment` object, the only key `ejson2env`
  reads, plus a `_description` that ejson leaves unencrypted.
- `scripts/ejson_lint` fails on any unencrypted value and reports key names
  only. It needs no private key, so it runs on forks. Wired into `dev check`.
- `scripts/install_ejson_key` fetches the private key from GCP Secret
  Manager into the ejson keydir during `dev up`. The key travels through a
  redirect, so it never reaches argv, an environment variable, or the
  output. Every failure path exits 0: a developer without the key keeps
  full control of their own `.env`.
- `scripts/secrets_edit` backs `dev secrets edit <demo|e2e>`. It decrypts to
  a private temporary copy, opens $EDITOR, restores the ciphertext of
  unchanged values so the diff shows only real changes, then writes back
  content that is already encrypted. No plaintext reaches the working tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@kyle-schellen kyle-schellen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and no issues 👍 🎉

kieran-osgood-shopify commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@kieran-osgood-shopify
kieran-osgood-shopify merged commit 5334f01 into main Aug 12, 2026
27 checks passed
@kieran-osgood-shopify
kieran-osgood-shopify deleted the ejson branch August 12, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants