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

Do not prompt for password to start owner API #656

Merged
merged 4 commits into from
Jul 12, 2022

Conversation

davidtavarez
Copy link
Contributor

It makes no sense to ask for the password if one only wants to initialize the APIs. Asking for the password makes things unnecessarily difficult and insecure in case I, as a system administrator, want to have the APIs running as a system service.

It makes no sense to ask for the password if one only wants to initialize the APIs. Asking for the password makes things unnecessarily difficult and insecure in case I, as a system administrator, want to have the APIs running as a system service.
opening wallet if password argument is present
@phyro phyro requested a review from yeastplume July 11, 2022 17:59
@phyro
Copy link
Member

phyro commented Jul 11, 2022

@yeastplume I'm not familiar with this part. The wallet lifecycle RFC says

'Open' wallets store their in-memory seeds XORed against the token, which is temporarily XORed against the supplied token during each request to reproduce the master seed.

Is opening a wallet here by design or can we remove it?

@davidtavarez
Copy link
Contributor Author

@yeastplume I'm not familiar with this part. The wallet lifecycle RFC says

'Open' wallets store their in-memory seeds XORed against the token, which is temporarily XORed against the supplied token during each request to reproduce the master seed.

Is opening a wallet here by design or can we remove it?

It can be remove it. When the open_wallet method is called, the token is generated. If I want to use the APIs I should not be asked to enter the password wallet and then anyways get the token via que API using open_wallet method.

My guess is that since the token can be null while using init_secure_api one could call init_secure_api directly without calling open_wallet because the wallet is already open.

What changes this PR is that the wallet will not open unless someone passes the password directly while setting the owner_api flag.

What I want to achieve is to be able to configure a local service that runs the API. In case the instance running the service is restarted, the service could be started automatically after starting the instance without human intervention.

@yeastplume
Copy link
Member

I think this is fine, the password check is likely left over from before the implementation of the lifecycle API and tokens, when there was no concept of opening or closing wallets, just the single 'open wallet' on the listener.

@yeastplume yeastplume merged commit b45802a into mimblewimble:master Jul 12, 2022
bayk added a commit to mwcproject/mwc-wallet that referenced this pull request Aug 13, 2024
…r API (mimblewimble#656)

* Do not prompt for password to start owner API
  It makes no sense to ask for the password if one only wants to initialize the APIs. Asking for the password makes things unnecessarily difficult and insecure in case I, as a system administrator, want to have the APIs running as a system service.
* Update wallet_args.rs
* Update wallet_args.rs
   opening wallet if password argument is present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants