-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for OS specific keychains #1703
Open
willemneal
wants to merge
40
commits into
main
Choose a base branch
from
feat/os_keychain
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+577
−59
Open
Changes from 29 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
8c06970
feat: initial work into system keychain
willemneal 883cb8c
chore: clean up
willemneal eb70734
Add KeyName struct in address
elizabethengelman d4e2500
Add Secret::Keychain
elizabethengelman 3ee20b8
keys generate: allow for generating keys that are stored in keychain
elizabethengelman 1a24c00
keys generate: Namespace keychain entry to identity name
elizabethengelman 4a0c900
keys generate: don't allow 'keychain:' as a key name
elizabethengelman 755c318
keys address: use keychain entry in secret to get the pub key
elizabethengelman dd07bf7
tx sign: allow a keychain identity sign a tx
elizabethengelman f042d19
Cleanup
elizabethengelman 9cf5916
Use keyring mock for generate tests
elizabethengelman cd515d3
Refactor keyring: add keyring entry as StellarEntry field
elizabethengelman 276558d
Add tests for keyring
elizabethengelman 20c651b
Update config/secret tests
elizabethengelman 66d1bfc
Cleanup
elizabethengelman 8b9763e
Rename keychain arg to secure_store in generate
elizabethengelman fdefa2a
Rename Secret::Keychain to Secret::SecureStore
elizabethengelman 36559ea
Rename SignerKind::Keychain to SignerKind::SecureStore
elizabethengelman f98b709
Use print for new fns in generate
elizabethengelman 0f3106b
Return error when trying to get Secure Store secret
elizabethengelman e120595
Cleanup tests
elizabethengelman c4d6f99
Merge branch 'main' into feat/os_keychain
elizabethengelman c7e2cbc
Merge branch 'main' into feat/os_keychain
elizabethengelman 57ba3a4
Install libdbus for rpc-tests and bindings-ts workflows
elizabethengelman 0814e4b
Update generated docs
elizabethengelman 74fa05b
Install libdbus for binaries workflow when target aarch64-unknown-lin…
elizabethengelman 7ff1f6a
Clippy
elizabethengelman f263d8d
Install libdbus for rust workflow
elizabethengelman e2b7342
Install libdbus-1-dev in binaries workflow for build step
elizabethengelman dabbb27
Impl Display for KeyName
elizabethengelman d9131b4
Use resolve_muxed_account in resolve_secret
elizabethengelman 3ad6b9b
Use resolve_muxed_account to get public key
elizabethengelman 9d02b01
Clippy
elizabethengelman 4bddd24
Merge branch 'main' into feat/os_keychain
elizabethengelman a72276d
fix: Sign tx hash instead of tx env with keychain
elizabethengelman 65284cc
Merge branch 'main' into feat/os_keychain
elizabethengelman e9f86e7
Merge branch 'main' into feat/os_keychain
elizabethengelman 4288630
Remove unused bin/secret
elizabethengelman 6661b42
Merge branch 'main' into feat/os_keychain
elizabethengelman b2120d2
Merge branch 'main' into feat/os_keychain
elizabethengelman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use soroban_cli::signer::keyring::StellarEntry; | ||
|
||
fn main() { | ||
let entry = StellarEntry::new("test").unwrap(); | ||
if let Ok(key) = entry.get_public_key() { | ||
println!("{key}"); | ||
return; | ||
}; | ||
|
||
let secret = soroban_cli::config::secret::Secret::from_seed(None).unwrap(); | ||
let pub_key = secret.public_key(None).unwrap(); | ||
let key_pair = secret.key_pair(None).unwrap(); | ||
entry.set_password(key_pair.as_bytes()).unwrap(); | ||
let pub_key_2 = entry.get_public_key().unwrap(); | ||
assert_eq!(pub_key, pub_key_2); | ||
println!("{pub_key} == {pub_key_2}"); | ||
} | ||
elizabethengelman marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The keyring crate requires this pkg as a dependency, so I am including it on several of these linux workflows. I just wanted to point this out as a dependency and see if there is any other way I should handle this.