feat: improve secret-ref UX and docs for profiles#110
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
1ea20b9 to
335abba
Compare
335abba to
e3e1d8f
Compare
There was a problem hiding this comment.
Pull request overview
Adds richer store credential/encryption handling to the Cloudstic CLI by introducing secret reference flags and interactive flows (including macOS Keychain writes), plus a new store verify command to validate store connectivity and encrypted-repo unlock.
Changes:
- Added
cloudstic store verifysubcommand and updated CLI usage + shell completions. - Enhanced
store newto support*_secretflags, prefill existing store values in interactive mode, and verify configured encryption credentials for initialized encrypted repos. - Expanded docs on secret reference usage and interactive encryption setup.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/user-guide.md | Documents store verify and recommends *_secret secret-ref fields/schemes. |
| docs/encryption.md | Adds explanation of profile credential references and supported secret-ref schemes. |
| cmd/cloudstic/usage.go | Updates help output for new subcommand and new *-secret flags. |
| cmd/cloudstic/secret_store_stub.go | Non-darwin stubs for native secret store write/exists helpers. |
| cmd/cloudstic/secret_store_darwin.go | macOS implementation for writing/checking secrets via security. |
| cmd/cloudstic/secret_store_darwin_test.go | Unit tests for the macOS security command invocations. |
| cmd/cloudstic/runner.go | Adds reusable stdin/line reader plumbing to support interactive prompting. |
| cmd/cloudstic/interactive.go | Uses runner line reader; adds hidden-input secret prompt. |
| cmd/cloudstic/completion.go | Adds completions for store verify and the new *-secret flags. |
| cmd/cloudstic/cmd_store.go | Implements store verify, secret-ref flag handling, interactive encryption config, and verification of encrypted repo unlock credentials. |
| cmd/cloudstic/cmd_store_test.go | Adds/updates tests covering prefills, secret refs, credential verification, and missing-secret behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Implement RFC 0011 issue #91 with CLI UX and documentation updates for profile/store secret references.
What Changed
store newnow accepts explicit*_secretflags:-password-secret,-encryption-key-secret,-recovery-key-secret-s3-access-key-secret,-s3-secret-key-secret-store-sftp-password-secret,-store-sftp-key-secret*-envflags remain supported and are converted toenv://...refs when writing.*-secretand*-envare provided,*-secretwins.cloudstic help) for new*_secretflags.docs/user-guide.md: secret ref guidance, scheme list, examples, and headless fallback guidance.docs/encryption.md: explicit separation between repository key slots and profile credential references.Notes
For documentation examples, this PR assumes cross-platform secret schemes are available:
keychain://...(macOS)wincred://...(Windows)secret-service://...(Linux)Validation
go test ./cmd/cloudstic -count=1go test ./...golangci-lint run ./...Tracking
rfcs/0011-profile-credential-storage-backends.md