Skip to content
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
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Conversation

willemneal
Copy link
Member

@willemneal willemneal commented Nov 5, 2024

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.

  • generate (no fund): cargo run keys generate --secure-store ee-25-a --network local --no-fund
  • generate (fund): cargo run keys generate --secure-store ee-25-b --network local --fund
  • keys fund: cargo run keys fund ee-25-b --network local
  • keys address: cargo run keys address ee-25-a
  • keys rm: addressed in Feat/os keychain followup #1770
  • keys add: will be addressed in Feat/os keychain followup #1770
  • keys show: cargo run keys show ee-25-a should not display the secure store's secret and return an error:
    ❌ error: Secure Store does not reveal secret key
  • tx sign:
cargo run contract deploy --wasm target/wasm32-unknown-unknown/test-wasms/test_hello_world.wasm --build-only --network local --source ee-25-g | \
cargo run tx sign --network local --sign-with-key ee-25-g
  • manual test on Mac OS
  • manual test on Linux
  • manual test on Windows

@elizabethengelman elizabethengelman changed the base branch from feat/add_stellar_ledger to main December 2, 2024 22:26
@elizabethengelman elizabethengelman marked this pull request as ready for review December 3, 2024 14:08
@@ -39,6 +49,10 @@ pub struct Cmd {
#[arg(long, short = 's')]
pub as_secret: bool,

/// Save in OS-specific secure store
#[arg(long)]
pub secure_store: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to add an alias for this arg: keychain for mac, secret-service for linux and windows-credential-manager for windows?

@@ -46,7 +46,7 @@ jobs:
- run: rustup target add ${{ matrix.sys.target }}

- if: matrix.sys.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev libdbus-1-dev
Copy link
Contributor

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.

@elizabethengelman elizabethengelman mentioned this pull request Dec 3, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
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