Skip to content

Issue 69 - remote signing via extension#70

Open
oren-z0 wants to merge 2 commits into
fiatjaf:masterfrom
oren-z0:issue-69-remote-signing
Open

Issue 69 - remote signing via extension#70
oren-z0 wants to merge 2 commits into
fiatjaf:masterfrom
oren-z0:issue-69-remote-signing

Conversation

@oren-z0
Copy link
Copy Markdown
Contributor

@oren-z0 oren-z0 commented Oct 21, 2024

The extension's private-key is not used directly to sign/encrypt/decrypt, but to communicate with an nsec bunker (i.e. nsec.app ).
The website doesn't even know that a bunker is used! it just sends sign/encrypt/decrypt requests to the extension.

Closes #69

I'm not sure if I implemented getRelays correctly - should I get the local extension relays or the remote ones?

Tested with Coracle and https://nsec.app (nsec.app has unrelated bugs when it comes to additional permission requests)

@fiatjaf
Copy link
Copy Markdown
Owner

fiatjaf commented Oct 21, 2024

I think this confuses the role of this extension and complicates the code unnecessarily. The functionality is good and laudable and I may even prefer to use that myself over nos2x as it is today, but I think it would be better packaged as a different extension.

@oren-z0
Copy link
Copy Markdown
Contributor Author

oren-z0 commented Oct 21, 2024

Thanks for reviewing the code.
Do you want me to add a nicer "Advanced" menu to the UI that upon selection will show the bunker-url text input?
Or publish it as a completely new extension? (nos3x?).
Feel free to publish it under your name if publishing extensions requires some "Google Developer" account.

The feature is also useful to manage a shared account, i.e. a company account where multiple people have permission to publish on behalf of the company (but not forever).
Suppose some remote computer holds the company's nsec and runs a bunker (could be as simple as running a browser with https://nsec.app). In the current web-clients' nsec-bunker flow, every session creates a new local key, and somebody needs to connect to the remote company computer to approve the new key's permissions (assuming they are not sharing a company password for the oauth-like flow).
But when the local key is fixed (and stored safely in the browser extension), it's enough to approve it once per user.

@fiatjaf
Copy link
Copy Markdown
Owner

fiatjaf commented Oct 21, 2024

I wish you would publish it yourself because this is so annoying, all the bureaucracy and whatnot. Let me think about it.

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.

[Feature Request] Instead of signing/encrypting/decrypting events directly, use a remote bunker.

2 participants