Repository navigation
fix(dg): wallet renewal is one obvious step - #764
Merged
Merged
Conversation
… a kept master key - A renewal's code prints "This code renews <name>" and how to sign in as someone else: the new --any-identity flag drops IDENTITY_HINT. Its timeout error names that flag first. - The master-key guard looks only at what this run's store overwrites (Storer::main_slot_replaced). A --full-key file the wallet key only displaces as the default stays, is not asked about (also under --yes), and the success output names where the master key stays. - verify_grant reports the latest read, not an early failed one. - not_stored says the key stays live until it expires, a wallet renewal replaces it, or you disconnect. - The app-connect lock creates the config directory 0700. Closes #664 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Review of #764: when the keychain refuses the wallet key, Storer::write falls back to the main-slot file. The guard had not named that file, so a --full-key master key there would have been overwritten unasked. The storer now refuses that fallback. master_kept is computed after the store and excludes what was stored (by real path), reports the raw key source in masterKeyKeptAt (schema regenerated), and the human line mentions that dg auth logout deletes dg's own key file. Also: --any-identity routes to the wallet sign-in, a renewal's code drops the "anyone who answers" warning, every note uses one "stays live" line, and CHANGELOG entries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… that won't open Second review of #764: refusing every unnamed main-slot file broke renewal where the keychain is present but locked (a Mac over SSH): the first login fell back to the file, so every renewal then refused after the wallet had disabled the old key. The fallback now judges the file as the guard would: a limited key (plain, or sealed with this run's passphrase) is replaced after a copy is kept; a master key or a file that does not open is refused, naming how to unlock the keychain or move the file aside. Restores the identity-and-keys.md renewal paragraph the previous commit dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… WIFs out of key fields 61ee60c was committed from an index that `git checkout <base> -- <paths>` had reset, so it reverted wallet.rs, mod.rs, the CHANGELOG and the schema to master. This restores the tested tree (fmt, clippy -D warnings and cargo test -p dg auth:: pass on boat). The store test names the public 0x11..11 WIF through a variable, so gitleaks' generic-api-key rule does not see it in a privateKeyWif field. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aks history Co-Authored-By: Claude Opus 5.5 <[email protected]>
…assphrase seals the new one Final review of #764: over SSH with a locked keychain, an earlier fallback's sealed file opened with its old passphrase, but choosing a new one for the new key made the fallback refuse with a misleading message. Keys wallet login already opened without a master key are now passed to the storer as replaceable; the refusal is checked before the passphrase prompt unless only that passphrase can tell (a sealed file), and says which case it is. The identity guide and CHANGELOG describe the narrowed guard. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…passphrase Pins the fix for the final #764 review's Medium, and the refusal only says "another passphrase" when the sealed file did not open with it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Closes #664.
Problem
dg auth login --walletafter a wallet sign-in names that identity (IDENTITY_HINT). A user who scans with another identity waits out the full 10 minutes, and the error never says why.--full-keysign-in on a machine with a keychain, each wallet renewal asked about the master-key file and refused under--yes. The wallet key goes to the keychain, so that file was never overwritten.Fix
This code renews alice.dash (ID); only that identity's answer is read. To sign in as another identity: dg auth login --wallet --any-identity.--any-identityflag drops the hint, so any identity can answer.Storer::main_slot_replacedmirrorsStorer::write: the keychain entry when the keychain takes the key, else the key file.--full-keyfile that only stops being the default is not asked about, including under--yes.your master key stays in <file>, and--jsonreports it asmasterKeyKeptAt.verify_grantreports the latest read, not an early failed one.not_storednote says the key "stays live on the identity until it expires, a wallet renewal replaces it, or you disconnect".app-connect.lockpath creates the config directory 0700.identity-and-keys.mddescribes the renewal line and--any-identity.Compat
app-connect.tomland the key files and keychain entries keep their format and location.Tests (boat, x86_64)
cargo fmt --checkandcargo clippy -p dg --all-targets -D warnings: clean.cargo test -p dg: 629 passed, plus the integration tests.a_master_key_the_wallet_key_does_not_overwrite_is_not_asked_abouta_renewal_says_how_to_sign_in_as_another_identity--any-identityparsing, including its conflict with a file argumentnot_storedwording🤖 Generated with Claude Code