Commit Graph

77 Commits

Author SHA1 Message Date
lispmeister
0e68ea2499 add Dockerfile
This Dockerfile enables the build of a Docker image for the Aperture
binary.

updated to golang:1.13 base image

add entrypoint

fix EXPOSE port number
2020-04-23 22:58:34 +04:00
Olaoluwa Osuntokun
2c1a5d6b7b Merge pull request #29 from guggero/lsat-move
lsat: copy LSAT related code from loop repository
2020-03-19 11:25:56 -07:00
Oliver Gugger
59268f8f59 auth+lsat: move LSAT specific code 2020-03-19 16:16:34 +01:00
Oliver Gugger
c2e191af14 multi: use moved lsat code 2020-03-19 16:12:33 +01:00
Oliver Gugger
36d004afb8 lsat: rename Interceptor to ClientInterceptor 2020-03-19 16:09:55 +01:00
Oliver Gugger
31e5169aec lsat: copy code from loop repo 2020-03-19 16:09:09 +01:00
Olaoluwa Osuntokun
f8257dda52 Merge pull request #28 from Roasbeef/aperture
aperture: propagate rename
2020-03-18 16:57:36 -07:00
Olaoluwa Osuntokun
0c14706fa4 aperture: propagate rename 2020-03-18 13:57:18 -07:00
Olaoluwa Osuntokun
e30cc0f060 Merge pull request #27 from wpaulino/listen-tor-onion-services
kirin: allow handling client requests over Tor onion services
2020-03-13 16:55:57 -07:00
Wilmer Paulino
494fdcc0a3 kirin: allow handling client requests over Tor onion services
In this commit, we integrate Tor onion services into the proxy. Clients
can now make their requests through Tor's encrypted network. To make
this possible, there were a few quirks, the most important being that
clients were unable to establish encrypted HTTP/2 connections due to
TLS certificates not being able to verify onion services. To work around
this, we now spin up an additional HTTP/2 server _without TLS_ that's
not exposed to the outside world and can only be accessed through the
onion services, which already provide encryption.

Once the onion services are created, we store their private keys within
etcd to ensure we can recover them later on as the proxy is intended to
be long-lived.
2020-03-13 12:54:33 -07:00
Olaoluwa Osuntokun
34b4e1f6a5 Merge pull request #26 from guggero/stream-interceptor
lsat: server stream interceptor
2020-02-17 15:50:49 -08:00
Oliver Gugger
1e20b175cd auth: add stream server interceptor 2020-02-03 17:10:59 +01:00
Oliver Gugger
0fffe01dcc auth: refactor interceptor token extraction 2020-02-03 17:10:58 +01:00
Olaoluwa Osuntokun
64393335db Merge pull request #25 from Roasbeef/auto-cert-bugfix
kirin: fix bug when using pure autocert
2020-01-22 18:10:14 -08:00
Olaoluwa Osuntokun
b18e4baed1 kirin: fix bug when using pure autocert
When using the `autocert` route, we actually don't need to pass anything
into `ListenAndServeTLS`, instead we can pass blank strings.
2020-01-22 17:35:31 -08:00
Olaoluwa Osuntokun
4b60be65ee challenger: rename macaroon name 2020-01-22 17:03:46 -08:00
Olaoluwa Osuntokun
de6be5daff Merge pull request #24 from Roasbeef/invoiceonly-mac
challenger: modify to only use invoice macaroon
2020-01-22 17:02:14 -08:00
Olaoluwa Osuntokun
e86965f6f9 challenger: modify to only use invoice macaroon 2020-01-22 16:56:03 -08:00
Olaoluwa Osuntokun
1d57c19fd1 Merge pull request #23 from guggero/update-readme
readme: clarify install instructions
2020-01-22 14:45:00 -08:00
Oliver Gugger
d1096b1df8 readme: clarify install instructions 2020-01-22 11:30:02 +01:00
Oliver Gugger
b002512fc3 Merge pull request #21 from guggero/install-doc
doc: update installation instructions
2020-01-16 13:06:14 +01:00
Olaoluwa Osuntokun
3b3af0a719 Merge pull request #22 from guggero/autocert
Add autocert functionality to get certificate through Let's Encrypt
2020-01-15 19:36:09 -08:00
Oliver Gugger
712168f38d doc: update installation instructions 2020-01-15 22:42:57 +01:00
Oliver Gugger
5276c1b850 kirin: add autocert functionality 2020-01-14 09:41:00 +01:00
Oliver Gugger
e539e6306f mod: add autocert library 2020-01-10 14:16:41 +01:00
Oliver Gugger
9af8647028 config: add autocert options 2020-01-10 14:00:36 +01:00
Oliver Gugger
156ca9589a Merge pull request #20 from guggero/lsat-header-rfc
multi: change WWW-Authenticate header format
2020-01-09 09:46:11 +01:00
Oliver Gugger
76a5ed5f2a multi: change WWW-Authenticate header format
To be compliant with RFC 7235 section 4.1 we change the format of the
WWW-Authenticate header field to double quoted and comma separated
fields.
2020-01-07 15:38:22 +01:00
Oliver Gugger
8b731e87e4 Merge pull request #19 from guggero/server-interceptor
auth: add server interceptor
2020-01-07 14:37:48 +01:00
Oliver Gugger
a402e403bc auth+log: add log subsystem name as constant 2020-01-07 14:37:07 +01:00
Oliver Gugger
45e4bb49d5 auth: add server interceptor 2020-01-07 14:37:07 +01:00
Oliver Gugger
02584d1f38 mod: update to latest loop and lnd versions 2020-01-03 16:44:08 +01:00
Oliver Gugger
f4d62e0a7f Merge pull request #17 from guggero/makefile
make: add Makefile and linter configuration
2019-12-04 11:00:21 +01:00
Oliver Gugger
c6c62b9472 multi: fix all linter errors 2019-12-04 10:58:04 +01:00
Oliver Gugger
41cd93c319 make: add Makefile and linter configuration 2019-12-04 10:47:59 +01:00
Oliver Gugger
a6a5a0e302 Merge pull request #16 from guggero/auth-whitelist
proxy: add authentication whitelist
2019-12-04 10:46:39 +01:00
Oliver Gugger
b60460feee proxy: add test for auth whitelist 2019-12-04 10:45:08 +01:00
Oliver Gugger
51c7deac05 proxy: replace certificate generation with cert package 2019-12-04 10:45:07 +01:00
Oliver Gugger
c2e9d540ba proxy: add auth whitelist for paths 2019-12-04 10:45:07 +01:00
Oliver Gugger
3e2d486f75 auth: add auth level constant 2019-11-29 17:12:53 +01:00
Oliver Gugger
d58c70588d auth: remove unused constant 2019-11-29 16:15:40 +01:00
Oliver Gugger
8928e68bf2 Merge pull request #12 from wpaulino/lsat-mint
multi: introduce proper LSAT creation and verification
2019-11-28 14:25:46 +01:00
Wilmer Paulino
831a41b33e macaroons: remove temporary macaroon creation and verification logic 2019-11-26 11:14:11 -08:00
Wilmer Paulino
530894a5ed auth: remove unused Challenger interface 2019-11-26 11:13:45 -08:00
Wilmer Paulino
38cd0e7847 auth: integrate proper macaroon creation and verification
We move the proxy from using its placeholder macaroon creation and
verification to instead use the agreed upon macaroon design. Much of
this is solely a refactor, but some new functionality has also been
introduced as part of integrating the LSAT mint:

1. A request's target service is now verified to ensure its attached
   LSAT is authorized.

2. The preimage is now checked against the token's committed payment
   hash to ensure it has been paid for.
2019-11-26 11:13:19 -08:00
Wilmer Paulino
95c405b0c7 auth+proxy: extend Authenticator methods with target service name
The target service name remains unused in its current form, but will be
required in order to verify that an incoming request with an LSAT
attached is authorized to access the service being attempted. We can
derive this from the request's host field, but we choose to extend the
methods with the additional parameter in order to prevent parsing the
host field again to determine which service is being accessed.
2019-11-26 11:12:48 -08:00
Wilmer Paulino
7b676b8b91 auth: use concrete preimage type in FromHeader and SetHeader 2019-11-26 11:12:20 -08:00
Wilmer Paulino
25851ae16d kirin: add static service limiter
The service limiter holds all of the constraints that should be applied
to a given service at the base tier. These are currently static and are
parsed from the proxy's configuration file as a temporary work-around.
Eventually, we plan to integrate this with etcd as well in order to
achieve dynamic service discovery.
2019-11-25 17:08:35 -08:00
Wilmer Paulino
02f2a287b0 kirin: add etcd-backed secret store
This will store the secret of each LSAT minted by the proxy, which is
crucial for LSAT verification. The secrets are stored under a new
"secrets" key prefixed by the top level LSAT etcd key, and each secret
can be found by its unique identifier prefixed with the secrets key.
2019-11-25 17:08:34 -08:00
Wilmer Paulino
401c0e2d38 kirin: add etcd client configuration
Allows the ability for the proxy to connect to an etcd cluster for any
reliable data storage purposes. No data is being stored yet as of this
commit, but we'll be storing LSAT secrets at a later commit.

One key component in this commit is that we introduce a new top level
key that will serve to hold all LSAT proxy-related data. Any nested keys
should be prefixed with said top level key.

Co-authored-by: Oliver Gugger <gugger@gmail.com>
2019-11-25 17:08:32 -08:00