Add opt-in file-backed Secrets adapter for non-Fly deployments#512
Open
FinanceAlex wants to merge 1 commit into
Open
Add opt-in file-backed Secrets adapter for non-Fly deployments#512FinanceAlex wants to merge 1 commit into
FinanceAlex wants to merge 1 commit into
Conversation
Tenant signup hard-depends on Fly secrets storage: off-platform,
FlyAdapter fails signup with {:audit_key_storage_failed, :fly_not_configured}.
This adds Loopctl.Secrets.LocalFileAdapter (same behaviour contract as
FlyAdapter, atomic writes, 0600 file mode) selected at runtime only when
SECRETS_ADAPTER=local_file is set. Default (Fly) behaviour is unchanged.
Refs mkreyman/loopctl issue 496.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #496.
Tenant signup hard-depends on Fly secrets storage: off-platform,
FlyAdapterfails signup with{:audit_key_storage_failed, :fly_not_configured}— a fresh non-Fly install cannot create its first tenant.Change: an opt-in
Loopctl.Secrets.LocalFileAdapter(same behaviour contract asFlyAdapter; atomic write via temp+rename; file mode 0600; path fromSECRETS_FILE). It is selected inruntime.exsonly whenSECRETS_ADAPTER=local_fileis set — default (Fly) behaviour is unchanged, so this is purely additive for cloud deployments.I'm aware this one touches product direction (self-hosting) more than the other two PRs, so treat it as a proposal — happy to rework the shape (adapter name, env contract, or moving it under the epic-39 private-tier umbrella) to fit your vision.
Testing: this adapter has been running in my self-hosted deployment since 2026-07-22 (signup, key issuance, daily use). Compile-checked against current
masterwith the Dockerfile's build image.