Skip to content

feat: add support for OS specific keychains - #1703

Merged
elizabethengelman merged 55 commits into
mainfrom
feat/os_keychain
Jan 9, 2025
Merged

feat: add support for OS specific keychains#1703
elizabethengelman merged 55 commits into
mainfrom
feat/os_keychain

Conversation

@willemneal

@willemneal willemneal commented Nov 5, 2024

Copy link
Copy Markdown
Contributor

Addresses #1481
I updated this branch to point at main instead of feat/add_stellar_ledger so we wouldn't have too many PRs stacked on each other.

This adds support for using secrets stored in OS specific key rings.

Update to system test: stellar-deprecated/system-test#109

  • key generate (no fund)
  • keys generate (fund)
  • keys fund
  • keys address
  • keys show: should not display the secure store's secret and instead return an error: ❌ error: Secure Store does not reveal secret key
  • tx sign
  • keys rm and keys add will be addressed in Feat/os keychain followup #1770
  • manual test on Mac OS
    • cargo run keys generate --secure-store carol --network local --no-fund
    • cargo run keys generate --secure-store dean --network local --fund
    • cargo run keys fund carol --network local
    • cargo run keys address carol
    • cargo run keys show carol
    • tx sign: cargo run contract deploy --wasm target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm --build-only --network local --source carol | \ cargo run tx sign --network local --sign-with-key carol
    • tx simulate: cargo run contract deploy --wasm target/test-wasms/hello_world.wasm --build-only --network testnet --source fred-testnet | \ cargo run tx simulate --network testnet --source fred-testnet
      this command is not working on a local network or with the test-wasms, it does work on testnet with wasm generated from a new contract
    • tx simulate, sign, send: cargo run contract deploy --wasm target/test-wasms/hello_world.wasm --build-only --network testnet --source fred-testnet | \ cargo run tx simulate --network testnet --source fred-testnet | \ cargo run tx sign --network testnet --sign-with-key fred-testnet | \ cargo run tx send --network testnet
      same as above
  • manual test on Linux (tested with UTM vm)
    • cargo run keys generate --secure-store --network testnet --no-fund alice
    • cargo run keys generate --secure-store --network testnet --fund bob
    • cargo run keys fund --network testnet alice
    • cargo run keys address alice
    • cargo run keys show alice
    • tx sign: cargo run contract deploy --wasm target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm --build-only --network testnet --source alice | \ cargo run tx sign --network local --sign-with-key alice
    • tx simulate: cargo run contract deploy --wasm target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm --build-only --network testnet --source alice | \ cargo run tx simulate --network testnet --source alice
    • tx simulate, sign, send
  • manual test on Windows(trying to test on windows via UTM, but have run into some issues with spinning up the windows vm)
    • cargo run keys generate --secure-store --network testnet --no-fund alice
    • cargo run keys generate --secure-store --network testnet --fund bob
    • cargo run keys fund --network testnet alice
    • cargo run keys address alice
    • cargo run keys show alice
    • tx sign: cargo run contract deploy --wasm target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm --build-only --network testnet --source alice | \ cargo run tx sign --network local --sign-with-key alice
    • tx simulate: cargo run contract deploy --wasm target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm --build-only --network testnet --source alice | \ cargo run tx simulate --network testnet --source alice
    • tx simulate, sign, send

Comment thread cmd/soroban-cli/src/config/address.rs
Comment thread cmd/soroban-cli/src/signer/keyring.rs Outdated
@willemneal

Copy link
Copy Markdown
Contributor Author

@elizabethengelman I can't review my own PR and can't figure out how to transfer to you, but besides my two suggestions, I think this is amazing and am excited to roll this out. I do think this should go first and then ledger since this is more widely applicable!

Comment thread cmd/soroban-cli/src/commands/keys/address.rs Outdated
Comment thread cmd/soroban-cli/src/config/address.rs Outdated
Comment thread cmd/soroban-cli/src/commands/keys/generate.rs Outdated
Comment thread cmd/soroban-cli/src/config/secret.rs
This will allow for exporting the phrase later
@elizabethengelman

Copy link
Copy Markdown
Contributor

@willemneal I'm planning to merge this in this afternoon - what do you think? I think that the e2e test should be fixed by stellar-deprecated/system-test#109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Epic] Implement more robust signing, which includes ledger, and lab Sign with system keychain

2 participants