aperture: propagate rename

This commit is contained in:
Olaoluwa Osuntokun
2020-03-18 13:39:18 -07:00
parent e30cc0f060
commit 0c14706fa4
26 changed files with 121 additions and 105 deletions

3
.gitignore vendored
View File

@@ -11,4 +11,5 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
/kirin
/aperture
cmd/aperture/aperture

View File

@@ -1,5 +1,5 @@
PKG := github.com/lightninglabs/kirin
ESCPKG := github.com\/lightninglabs\/kirin
PKG := github.com/lightninglabs/aperture
ESCPKG := github.com\/lightninglabs\/aperture
LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
GOVERALLS_PKG := github.com/mattn/goveralls
@@ -56,12 +56,12 @@ $(GOACC_BIN):
# ============
build:
@$(call print, "Building kirin.")
$(GOBUILD) $(PKG)/cmd/kirin
@$(call print, "Building aperture.")
$(GOBUILD) $(PKG)/cmd/aperture
install:
@$(call print, "Installing kirin.")
$(GOINSTALL) $(PKG)/cmd/kirin
@$(call print, "Installing aperture.")
$(GOINSTALL) $(PKG)/cmd/aperture
# =======
# TESTING
@@ -114,5 +114,5 @@ list:
clean:
@$(call print, "Cleaning source.$(NC)")
$(RM) ./kirin
$(RM) ./aperture
$(RM) coverage.txt

View File

@@ -1,7 +1,28 @@
# Lightning Service Authentication Token (LSAT) proxy
Kirin is a HTTP reverse proxy that supports proxying requests for gRPC (HTTP/2)
and REST (HTTP/1 and HTTP/2) backends.
Aperture is your portal to the Lightning-Native Web. Aperture is used in
production today by [Lightning Loop](https://lightning.engineering/loop), a
non-custodial on/off ramp for the Lightning Network.
Aperture is a HTTP 402 reverse proxy that supports proxying requests for gRPC
(HTTP/2) and REST (HTTP/1 and HTTP/2) backends using the [LSAT Protocol
Standard](https://lsat.tech/). LSAT stands for: Lightning Service
Authentication Token. They combine HTTP 402, macaroons, and the Lightning
Network to create a new standard for authentication and paid servies on the
web.
LSATs are a new standard protocol for authentication and paid APIs developed by
Lightning Labs. LSATs can serve both as authentication, as well as a payment
mechanism (one can view it as a ticket) for paid APIs. In order to obtain a
token, we require the user to pay us over Lightning in order to obtain a
pre-image, which itself is a cryptographic component of the final LSAT token
The implementation of the authentication token is chosen to be macaroons, as
they allow us to package attributes and capabilities along with the token. This
system allows one to automate pricing on the fly and allows for a number of
novel constructs such as automated tier upgrades. In another light, this can be
viewed as a global HTTP 402 reverse proxy at the load balancing level for web
services and APIs.
## Installation / Setup
@@ -9,25 +30,25 @@ and REST (HTTP/1 and HTTP/2) backends.
* Make sure lnd ports are reachable.
**kirin**
**aperture**
* Compilation requires go `1.13.x` or later.
* To build `kirin` in the current directory, run `make build` and then copy the
file `./kirin` from the local directory to the server.
* To build and install `kirin` directly on the machine it will be used, run the
* To build `aperture` in the current directory, run `make build` and then copy the
file `./aperture` from the local directory to the server.
* To build and install `aperture` directly on the machine it will be used, run the
`make install` command which will place the binary into your `$GOPATH/bin`
folder.
* Make sure port `8081` is reachable from outside (or whatever port we choose,
could also be 443 at some point)
* Make sure there is a valid `tls.cert` and `tls.key` file located in the
`~/.kirin` directory that is valid for the domain that kirin is running on.
Kirin doesn't support creating its own certificate through Let's Encrypt yet.
`~/.aperture` directory that is valid for the domain that aperture is running on.
Aperture doesn't support creating its own certificate through Let's Encrypt yet.
If there is no `tls.cert` and `tls.key` found, a self-signed pair will be
created.
* Make sure all required configuration items are set in `~/.kirin/kirin.yaml`,
* Make sure all required configuration items are set in `~/.aperture/aperture.yaml`,
compare with `sample-conf.yaml`.
* Start kirin without any command line parameters (`./kirin`), all configuration
is done in the `~/.kirin/kirin.yaml` file.
* Start aperture without any command line parameters (`./aperture`), all configuration
is done in the `~/.aperture/aperture.yaml` file.
## Demo

View File

@@ -1,4 +1,4 @@
package kirin
package aperture
import (
"crypto/tls"
@@ -11,9 +11,9 @@ import (
"time"
"github.com/coreos/etcd/clientv3"
"github.com/lightninglabs/kirin/auth"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/kirin/proxy"
"github.com/lightninglabs/aperture/auth"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/aperture/proxy"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/cert"
"github.com/lightningnetwork/lnd/lnrpc"
@@ -48,7 +48,7 @@ func Main() {
// shutdown signal is received.
func start() error {
// First, parse configuration file and set up logging.
configFile := filepath.Join(kirinDataDir, defaultConfigFilename)
configFile := filepath.Join(apertureDataDir, defaultConfigFilename)
cfg, err := getConfig(configFile)
if err != nil {
return fmt.Errorf("unable to parse config file: %v", err)
@@ -98,7 +98,7 @@ func start() error {
"secure operation")
}
certDir := filepath.Join(kirinDataDir, "autocert")
certDir := filepath.Join(apertureDataDir, "autocert")
log.Infof("Configuring autocert for server %v with cache dir "+
"%v", serverName, certDir)
@@ -124,12 +124,12 @@ func start() error {
// and save them at the specified location (if they don't already
// exist).
default:
tlsKeyFile = filepath.Join(kirinDataDir, defaultTLSKeyFilename)
tlsCertFile = filepath.Join(kirinDataDir, defaultTLSCertFilename)
tlsKeyFile = filepath.Join(apertureDataDir, defaultTLSKeyFilename)
tlsCertFile = filepath.Join(apertureDataDir, defaultTLSCertFilename)
if !fileExists(tlsCertFile) && !fileExists(tlsKeyFile) {
log.Infof("Generating TLS certificates...")
err := cert.GenCertPair(
"kirin autogenerated cert", tlsCertFile,
"aperture autogenerated cert", tlsCertFile,
tlsKeyFile, nil, nil,
cert.DefaultAutogenValidity,
)
@@ -221,7 +221,7 @@ func setupLogging(cfg *config) error {
}
// Now initialize the logger and set the log level.
logFile := filepath.Join(kirinDataDir, defaultLogFilename)
logFile := filepath.Join(apertureDataDir, defaultLogFilename)
err := logWriter.InitLogRotator(
logFile, defaultMaxLogFileSize, defaultMaxLogFiles,
)

View File

@@ -9,7 +9,7 @@ import (
"net/http"
"regexp"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/loop/lsat"
"github.com/lightningnetwork/lnd/lntypes"
"gopkg.in/macaroon.v2"

View File

@@ -6,7 +6,7 @@ import (
"net/http"
"testing"
"github.com/lightninglabs/kirin/auth"
"github.com/lightninglabs/aperture/auth"
"github.com/lightninglabs/loop/lsat"
"gopkg.in/macaroon.v2"
)
@@ -15,7 +15,7 @@ import (
func createDummyMacHex(preimage string) string {
dummyMac, err := macaroon.New(
[]byte("aabbccddeeff00112233445566778899"), []byte("AA=="),
"kirin", macaroon.LatestVersion,
"aperture", macaroon.LatestVersion,
)
if err != nil {
panic(err)

View File

@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"github.com/lightninglabs/kirin/freebie"
"github.com/lightninglabs/aperture/freebie"
)
const (

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/loop/lsat"
"gopkg.in/macaroon.v2"
)

View File

@@ -3,8 +3,8 @@ package auth_test
import (
"context"
"github.com/lightninglabs/kirin/auth"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/aperture/auth"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/loop/lsat"
"gopkg.in/macaroon.v2"
)

View File

@@ -1,10 +1,10 @@
package kirin
package aperture
import (
"context"
"fmt"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/loop/lndclient"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lntypes"

7
cmd/aperture/main.go Normal file
View File

@@ -0,0 +1,7 @@
package main
import "github.com/lightninglabs/aperture"
func main() {
aperture.Main()
}

View File

@@ -1,7 +0,0 @@
package main
import "github.com/lightninglabs/kirin"
func main() {
kirin.Main()
}

View File

@@ -1,17 +1,17 @@
package kirin
package aperture
import (
"github.com/btcsuite/btcutil"
"github.com/lightninglabs/kirin/proxy"
"github.com/lightninglabs/aperture/proxy"
)
var (
kirinDataDir = btcutil.AppDataDir("kirin", false)
defaultConfigFilename = "kirin.yaml"
apertureDataDir = btcutil.AppDataDir("aperture", false)
defaultConfigFilename = "aperture.yaml"
defaultTLSKeyFilename = "tls.key"
defaultTLSCertFilename = "tls.cert"
defaultLogLevel = "info"
defaultLogFilename = "kirin.log"
defaultLogFilename = "aperture.log"
defaultMaxLogFiles = 3
defaultMaxLogFileSize = 10
)
@@ -50,7 +50,7 @@ type config struct {
// be used while creating a certificate through Let's Encrypt.
ServerName string `long:"servername" description:"Server name (FQDN) to use for the TLS certificate."`
// AutoCert can be set to true if kirin should try to create a valid
// AutoCert can be set to true if aperture should try to create a valid
// certificate through Let's Encrypt using ServerName.
AutoCert bool `long:"autocert" description:"Automatically create a Let's Encrypt cert using ServerName."`

19
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/lightninglabs/kirin
module github.com/lightninglabs/aperture
go 1.13
@@ -7,31 +7,28 @@ require (
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d
github.com/coreos/etcd v3.3.17+incompatible
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190212144455-93d5ec2c7f76 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.3.2
github.com/google/btree v1.0.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/gorilla/websocket v1.4.1 // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/json-iterator/go v1.1.8 // indirect
github.com/json-iterator/go v1.1.9 // indirect
github.com/lightninglabs/loop v0.3.0-alpha.0.20200103135410-5e00ce62677a
github.com/lightningnetwork/lnd v0.9.0-beta-rc4.0.20200313014957-4cb518c17498
github.com/lightningnetwork/lnd/cert v1.0.0
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.uber.org/zap v1.13.0 // indirect
go.uber.org/zap v1.14.1 // indirect
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17
golang.org/x/net v0.0.0-20191112182307-2180aed22343
golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea // indirect
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect
google.golang.org/grpc v1.25.1
gopkg.in/macaroon-bakery.v2 v2.1.0 // indirect
gopkg.in/macaroon.v2 v2.1.0
gopkg.in/yaml.v2 v2.2.2
sigs.k8s.io/yaml v1.1.0 // indirect
gopkg.in/yaml.v2 v2.2.8
sigs.k8s.io/yaml v1.2.0 // indirect
)

41
go.sum
View File

@@ -68,8 +68,8 @@ github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ
github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190212144455-93d5ec2c7f76 h1:FE783w8WFh+Rvg+7bZ5g8p7gP4SeVS4AoNwkvazlsBg=
github.com/coreos/go-systemd v0.0.0-20190212144455-93d5ec2c7f76/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -99,8 +99,8 @@ github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhLbJ8nIiOJHkEZZ+5YoOsAbD3sk82NiE=
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -139,8 +139,8 @@ github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI=
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c h1:3UvYABOQRhJAApj9MdCN+Ydv841ETSoy6xLzdmmr/9A=
github.com/juju/clock v0.0.0-20190205081909-9c5c9712527c/go.mod h1:nD0vlnrUjcjJhqN5WuCWZyzfd5AHZAC9/ajvbSx69xA=
github.com/juju/errors v0.0.0-20190806202954-0232dcc7464d h1:hJXjZMxj0SWlMoQkzeZDLi2cmeiWKa7y1B8Rg+qaoEc=
@@ -244,8 +244,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc h1:yUaosFVTJwnltaHbSNC3i82I92quFs+OFPRl8kNMVwo=
github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 h1:tcJ6OjwOMvExLlzrAVZute09ocAGa7KqOON60++Gz4E=
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02/go.mod h1:tHlrkM198S068ZqfrO6S8HsoJq2bF3ETfTL+kt4tInY=
github.com/urfave/cli v1.18.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
@@ -254,14 +254,14 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo=
go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -312,8 +312,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd h1:DBH9mDw0zluJT/R+nGuV3jWFWLFaHyYZWD4tOT+cjn0=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea h1:Mz1TMnfJDRJLk8S8OPCoJYgrsp/Se/2TBre2+vwX128=
golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
@@ -337,8 +335,6 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -355,9 +351,8 @@ gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/macaroon-bakery.v2 v2.0.1 h1:0N1TlEdfLP4HXNCg7MQUMp5XwvOoxk+oe9Owr2cpvsc=
gopkg.in/macaroon-bakery.v2 v2.0.1/go.mod h1:B4/T17l+ZWGwxFSZQmlBwp25x+og7OkhETfr3S9MbIA=
gopkg.in/macaroon-bakery.v2 v2.1.0 h1:9Jw/+9XHBSutkaeVpWhDx38IcSNLJwWUICkOK98DHls=
gopkg.in/macaroon-bakery.v2 v2.1.0/go.mod h1:B4/T17l+ZWGwxFSZQmlBwp25x+og7OkhETfr3S9MbIA=
gopkg.in/macaroon.v2 v2.0.0/go.mod h1:+I6LnTMkm/uV5ew/0nsulNjL16SK4+C8yDmRUzHR17I=
gopkg.in/macaroon.v2 v2.1.0 h1:HZcsjBCzq9t0eBPMKqTN/uSN6JOm78ZJ2INbqcBQOUI=
gopkg.in/macaroon.v2 v2.1.0/go.mod h1:OUb+TQP/OP0WOerC2Jp/3CwhIKyIa9kQjuc7H24e6/o=
@@ -370,10 +365,12 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

6
log.go
View File

@@ -1,9 +1,9 @@
package kirin
package aperture
import (
"github.com/btcsuite/btclog"
"github.com/lightninglabs/kirin/auth"
"github.com/lightninglabs/kirin/proxy"
"github.com/lightninglabs/aperture/auth"
"github.com/lightninglabs/aperture/proxy"
"github.com/lightningnetwork/lnd/build"
)

View File

@@ -1,4 +1,4 @@
package kirin
package aperture
import (
"context"

View File

@@ -1,4 +1,4 @@
package kirin
package aperture
import (
"bytes"

View File

@@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"github.com/lightninglabs/kirin/auth"
"github.com/lightninglabs/aperture/auth"
"google.golang.org/grpc/codes"
)

View File

@@ -14,9 +14,9 @@ import (
"testing"
"time"
"github.com/lightninglabs/kirin/auth"
"github.com/lightninglabs/kirin/proxy"
proxytest "github.com/lightninglabs/kirin/proxy/testdata"
"github.com/lightninglabs/aperture/auth"
"github.com/lightninglabs/aperture/proxy"
proxytest "github.com/lightninglabs/aperture/proxy/testdata"
"github.com/lightningnetwork/lnd/cert"
"github.com/lightningnetwork/lnd/macaroons"
"google.golang.org/grpc"
@@ -475,7 +475,7 @@ func genCertPair(certFile, keyFile string) (*x509.CertPool,
crt := tls.Certificate{}
err := cert.GenCertPair(
"kirin autogenerated cert", certFile, keyFile, nil, nil,
"aperture autogenerated cert", certFile, keyFile, nil, nil,
cert.DefaultAutogenValidity,
)
if err != nil {

View File

@@ -9,8 +9,8 @@ import (
"regexp"
"strings"
"github.com/lightninglabs/kirin/auth"
"github.com/lightninglabs/kirin/freebie"
"github.com/lightninglabs/aperture/auth"
"github.com/lightninglabs/aperture/freebie"
)
var (

View File

@@ -1,7 +1,7 @@
listenaddr: "localhost:8081"
staticroot: "./static"
debuglevel: "debug"
servername: kirin.example.com
servername: aperture.example.com
autocert: false
authenticator:

View File

@@ -1,4 +1,4 @@
package kirin
package aperture
import (
"context"
@@ -9,7 +9,7 @@ import (
"strings"
"github.com/coreos/etcd/clientv3"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/loop/lsat"
)

View File

@@ -1,4 +1,4 @@
package kirin
package aperture
import (
"bytes"
@@ -12,7 +12,7 @@ import (
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/embed"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/loop/lsat"
)

View File

@@ -1,10 +1,10 @@
package kirin
package aperture
import (
"context"
"github.com/lightninglabs/kirin/mint"
"github.com/lightninglabs/kirin/proxy"
"github.com/lightninglabs/aperture/mint"
"github.com/lightninglabs/aperture/proxy"
"github.com/lightninglabs/loop/lsat"
)

View File

@@ -122,4 +122,4 @@
</script>
</body>
</html>
</html>