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

Migrate to gRPC to talk to LND directly #6

Open
AnotherDroog opened this issue Nov 21, 2018 · 4 comments
Open

Migrate to gRPC to talk to LND directly #6

AnotherDroog opened this issue Nov 21, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@AnotherDroog
Copy link
Member

Does this require nginx reverse proxy?

@AnotherDroog AnotherDroog added the enhancement New feature or request label Nov 21, 2018
@IstoraMandiri
Copy link
Contributor

IstoraMandiri commented Nov 22, 2018

There are few options:

  • Use gPRC (requires HTTPS)
  • Use REST (can use HTTP)
  • (and optionally) disable macaroons (bad idea, as this means anyone can control the node)

Reverse proxy is required as far as I've tested (unless this updated in LND), as I wasn't able to accept non-local requests.

Using REST and disabling macaroons is easiest to work with, but has no security.

Using REST and sending an invoicer macaroon to the client is equivalent to the existing invoicer service.

If you want to use gRPC, you need to send a self-signed cert for local network connections as well as the invoicer macaroon.

To send the macaroon / certificate to web clients, we could configure nginx to serve these statically to be picked up by the client. While we're at it, we can also add rate limiting etc.

If we actually want to authenticate users (for other things), this could be done using SRP; perhaps we have SRP middleware to handle auth for all requests to the box.

@AnotherDroog
Copy link
Member Author

Okay this will need more thought.

gRPC requires HTTPS, even when connecting locally?

I can investigate let’s encrypt certificates for local hostnames again, Damian found a trick there.

Otherwise, REST was nice to work with, as long as we can receive payment status on client side

@IstoraMandiri
Copy link
Contributor

IstoraMandiri commented Nov 23, 2018

gRPC requires HTTPS, even when connecting locally?

Yes afaik (if you are not on the same host), but depending on how strict the browser transport policy is, we might be able to use a self-signed certificate; we could serve the app over non-encrypted HTTP, and use gRPC with a self-signed HTTPS cert.

It also might be possible to disable encryption for gRPC (nginx can proxy to grpcs:// and grpc://), but we'd have to look into it and LND may not support it.

Would need to research.

https://github.com/grpc/grpc-web

@nolim1t
Copy link
Member

nolim1t commented Jan 13, 2019

We can indeed get nginx happening assuming we can get a dockerfile and container for it

lncm/dockerfiles#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants