Open wbobeirne opened 5 years ago
LND #1160 could be interesting. Essentially a macaroon could be created that is tailored to a specific IP address with certain permissions. So even weekly or monthly payments could be possible. Or it could be done in the app itself. Maybe both is best.
Yeah, I think macaroons are going to be the secret weapon for a lot of this stuff. That's definitely what I want to use in the future. I think unfortunately, in the short term, I'll just need to keep the admin macaroon hot while you're on a page you've authorized. I'm thinking the first payment will always require you to confirm (to decrypt the macaroon and get it in memory) and then it'll stay for the duration of the session. But a custom macaroon would be perfect for this instead.
I think this is an awesome feature, but just want to lay out a few security concerns and potential attacks that come to mind:
Sorry for the delayed response, these are great questions. I think with a mix of low allowances and reasonable rate limits, there wouldn't be quite as much concern for wallet draining as, say, MyEtherWallet or EtherDelta have felt the heat for. However, I definitely want to do everything within my power to prevent those cases.
Ultimately I'd lean towards implementing 3 initially, potentially not having it be site-based auth at all, to prevent most of these hacking cases. That would also nicely get around any question of subdomains. Though it could introduce an issue with custodial services that host nodes for many different sites.
Hey William,
FYI, this is now launched: https://rawtx.com/rawtx/update/2019/04/15/introducing-project-micro.html. Would love to get this kind of functionality in webln so that we can support a standard shared across wallets.
Provide an interface where a user can setup automatic no-ask payments for certain lapps. This would be limited by domain, and have the following configurations:
Should a maximum be exceeded, the user will be prompted for the payment instead of it being automatic.
Ideally they could configure this during or after a payment request (Maybe a checkbox?) There should also be a list of active auto pay configs, and some UI treatment for when you're on a page that can auto-pay (and perhaps after each auto-payment.)