-
Notifications
You must be signed in to change notification settings - Fork 20
Add a simple public-key-based authenticator #79
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
base: main
Are you sure you want to change the base?
Conversation
TheBlueMatt
commented
Dec 29, 2025
JWT-based authentication is currently largely the default due to its integration in `ldk-node` indirectly via LNURL-auth. This is great, but massively over-engineered (and requiring yet another service devs have to set up and maintain) for just authenticating to a storage service (and maybe an LSP). In the next commit, we'll add an option for a much simpler authentication scheme, based simply on proof-of-knowledge of a private key and the service using the signing pubkey to identify where to store data. This then leaves authentication of installs to a higher-level (e.g. a web proxy that validates Apple DeviceCheck attestations before passing requests through to VSS).
JWT-based authentication is currently largely the default due to its integration in `ldk-node` indirectly via LNURL-auth. This is great, but massively over-engineered (and requiring yet another service devs have to set up and maintain) for just authenticating to a storage service (and maybe an LSP). Here we add a much simpler authentication scheme, based simply on proof-of-knowledge of a private key. This allows for a simple VSS install without requiring any additional services. It relies on some higher-level authentication to limit new account registration, but that can be accomplished through more traditional anti-DoS systems like Apple DeviceCheck.
|
👋 I see @valentinewallace was un-assigned. |
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.
Here we add a much simpler authentication scheme, based simply on
proof-of-knowledge of a private key.
I'm a bit skeptical of this approach right now. Generally there is no harm in supporting different authentication schemes, but we so far failed to establish a single standard authentication mechanism.
For that reason I'm afraid that adding more different authentication schemes could result in an even more complicated/confusion support matrix for users.
Any thoughts on that? Wouldn't it be preferable to commit to one scheme for now to finally establish a standard? Could you expand on why you couldn't just use the existing JWT auth for your usecase?
|
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
Isn't this mostly/almost entirely because we failed to ever actually offer any authentication mechanisms? The only auth mechanism currently implemented on the server-side (which was only recently added) is LNURL-Auth, which isn't even freestanding - it requires a second server somewhere that we don't provide. On the client side we allow for a "just give us the header" implementation to do fully-custom things, but that doens't help all that much either. If we'd provided a standard way to do authentication from day one, I have to assume people would have used it.
The authentication scheme here is totally different from what already exists - instead of having the wallet contact a server and ask for the server to sign off on the client accessing data for its user-id, this just allows the client to access its data by signing a message. This sidesteps having to implement a second server entirely, not to mention reduces complexity and dependencies. |
Well, no, at the time there was some push-back to the idea of featuring a particular default/preferred authentication scheme, as some people were of the opinion that that should be completely left to the user as they would want to integrate with whatever authentication infrastructure they'd already have in place.
Also not quite accurate, as we have users that have been running their LNURL-auth implementation for quite some time. But yes, we only recently finally made progress to add support to
I was under the impression that we concluded to finally change that and provide a default implementation?
Yeah, see above, I had always considered us not providing a default auth mechanism a failure on our end that unnecessarily risks protocol fragmentation. So fully agree we should close that gap.
Not sure I'm completely following, AFAICT the hand-rolled signature scheme is close to what the JWT token would already do?
AFAICT we still don't couple
I had previously understood that the current idea is that we'd add issuance as part of the Rust codebase? |