Skip to content

Commit

Permalink
vendor: Upgrade dependencies (#163)
Browse files Browse the repository at this point in the history
Signed-off-by: aeneasr <aeneas@ory.sh>
  • Loading branch information
aeneasr committed Apr 5, 2019
1 parent eebc2f4 commit f9fdefb
Show file tree
Hide file tree
Showing 6 changed files with 512 additions and 59 deletions.
2 changes: 1 addition & 1 deletion cmd/helper_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func connectToSql(dburl string) (*sqlx.DB, error) {
if err != nil {
logger.WithError(err).Fatalf(`Unable to initialize SQL connection`)
}
return connection.GetDatabase(), nil
return connection.GetDatabase()
}

return nil, errors.Errorf(`Unknown DSN "%s" in DATABASE_URL: %s`, u.Scheme, dburl)
Expand Down
6 changes: 2 additions & 4 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ package cmd

import (
"fmt"
"os"
"strconv"

"github.com/spf13/cobra"
)
Expand All @@ -38,6 +36,6 @@ var serveCmd = &cobra.Command{
func init() {
RootCmd.AddCommand(serveCmd)

disableTelemetryEnv, _ := strconv.ParseBool(os.Getenv("DISABLE_TELEMETRY"))
serveCmd.PersistentFlags().Bool("disable-telemetry", disableTelemetryEnv, "Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa")
serveCmd.PersistentFlags().Bool("disable-telemetry", false, "Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa")
serveCmd.PersistentFlags().Bool("sqa-opt-out", false, "Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa")
}
36 changes: 14 additions & 22 deletions cmd/serve_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (

"github.com/julienschmidt/httprouter"
negronilogrus "github.com/meatballhat/negroni-logrus"
"github.com/rs/cors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/urfave/negroni"
Expand Down Expand Up @@ -108,29 +107,22 @@ HTTP CONTROLS
n := negroni.New()
n.Use(negronilogrus.NewMiddlewareFromLogger(logger, "oathkeeper-api"))

if ok, _ := cmd.Flags().GetBool("disable-telemetry"); !ok {
logger.Println("Transmission of telemetry data is enabled, to learn more go to: https://www.ory.sh/docs/ecosystem/sqa")

segmentMiddleware := metricsx.NewMetricsManager(
metricsx.Hash(viper.GetString("DATABASE_URL")),
viper.GetString("DATABASE_URL") != "memory",
"MSx9A6YQ1qodnkzEFOv22cxOmOCJXMFa",
[]string{"/rules", "/.well-known/jwks.json"},
logger,
"ory-oathkeeper-api",
100,
"",
)
go segmentMiddleware.RegisterSegment(Version, GitHash, BuildTime)
go segmentMiddleware.CommitMemoryStatistics()
n.Use(segmentMiddleware)
}
metrics := metricsx.New(cmd, logger,
&metricsx.Options{
Service: "ory-oathkeeper",
ClusterID: metricsx.Hash(viper.GetString("DATABASE_URL")),
IsDevelopment: viper.GetString("DATABASE_URL") != "memory",
WriteKey: "MSx9A6YQ1qodnkzEFOv22cxOmOCJXMFa",
WhitelistedPaths: []string{"/rules", "/.well-known/jwks.json", "/judge"},
BuildVersion: Version,
BuildTime: BuildTime,
BuildHash: GitHash,
},
)
n.Use(metrics)

n.UseHandler(judgeHandler)
var h http.Handler = n
if viper.GetString("CORS_ENABLED") == "true" {
h = cors.New(corsx.ParseOptions()).Handler(n)
}
h := corsx.Initialize(n, logger, "")

go refreshKeys(keyManager, 0)
go refreshRules(matcher, 0)
Expand Down
36 changes: 14 additions & 22 deletions cmd/serve_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"net/http/httputil"

negronilogrus "github.com/meatballhat/negroni-logrus"
"github.com/rs/cors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/urfave/negroni"
Expand Down Expand Up @@ -223,29 +222,22 @@ OTHER CONTROLS
n := negroni.New()
n.Use(negronilogrus.NewMiddlewareFromLogger(logger, "oathkeeper-proxy"))

if ok, _ := cmd.Flags().GetBool("disable-telemetry"); !ok {
logger.Println("Transmission of telemetry data is enabled, to learn more go to: https://www.ory.sh/docs/ecosystem/sqa")

segmentMiddleware := metricsx.NewMetricsManager(
metricsx.Hash(viper.GetString("DATABASE_URL")),
viper.GetString("DATABASE_URL") != "memory",
"MSx9A6YQ1qodnkzEFOv22cxOmOCJXMFa",
[]string{"/"},
logger,
"ory-oathkeeper-proxy",
100,
"",
)
go segmentMiddleware.RegisterSegment(Version, GitHash, BuildTime)
go segmentMiddleware.CommitMemoryStatistics()
n.Use(segmentMiddleware)
}
metrics := metricsx.New(cmd, logger,
&metricsx.Options{
Service: "ory-oathkeeper",
ClusterID: metricsx.Hash(viper.GetString("DATABASE_URL")),
IsDevelopment: viper.GetString("DATABASE_URL") != "memory",
WriteKey: "MSx9A6YQ1qodnkzEFOv22cxOmOCJXMFa",
WhitelistedPaths: []string{"/"},
BuildVersion: Version,
BuildTime: GitHash,
BuildHash: BuildTime,
},
)
n.Use(metrics)

n.UseHandler(handler)
var h http.Handler = n
if viper.GetString("CORS_ENABLED") == "true" {
h = cors.New(corsx.ParseOptions()).Handler(n)
}
h := corsx.Initialize(n, logger, "")

cert, err := getTLSCertAndKey()
if err != nil {
Expand Down
82 changes: 72 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
module github.com/ory/oathkeeper

require (
cloud.google.com/go v0.37.2 // indirect
git.apache.org/thrift.git v0.12.0 // indirect
github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190329203910-c904b696df3c // indirect
github.com/Microsoft/go-winio v0.4.12 // indirect
github.com/Shopify/sarama v1.21.0 // indirect
github.com/Songmu/retry v0.1.0 // indirect
github.com/aclements/go-gg v0.0.0-20170323211221-abd1f791f5ee // indirect
github.com/aclements/go-moremath v0.0.0-20180329182055-b1aff36309c7 // indirect
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf
github.com/coreos/etcd v3.3.12+incompatible // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a // indirect
github.com/gliderlabs/ssh v0.1.3 // indirect
github.com/go-errors/errors v1.0.1
github.com/go-logfmt/logfmt v0.4.0 // indirect
github.com/go-openapi/analysis v0.19.0 // indirect
github.com/go-openapi/errors v0.19.0 // indirect
github.com/go-openapi/inflect v0.19.0 // indirect
Expand All @@ -17,42 +29,92 @@ require (
github.com/go-sql-driver/mysql v1.4.1
github.com/go-swagger/go-swagger v0.19.0
github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 // indirect
github.com/gobuffalo/packr v1.24.1 // indirect
github.com/gobuffalo/packr/v2 v2.1.0 // indirect
github.com/gogo/protobuf v1.2.1 // indirect
github.com/golang/gddo v0.0.0-20190312205958-5a2505f3dbf0 // indirect
github.com/golang/mock v1.2.0
github.com/golang/protobuf v1.3.1 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/pprof v0.0.0-20190404155422-f8f10df84213 // indirect
github.com/googleapis/gax-go v2.0.2+incompatible // indirect
github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f // indirect
github.com/gorilla/handlers v1.4.0 // indirect
github.com/gorilla/mux v1.7.1 // indirect
github.com/gorilla/sessions v1.1.3 // indirect
github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/jessevdk/go-flags v1.4.0 // indirect
github.com/jmoiron/sqlx v1.2.0
github.com/julienschmidt/httprouter v1.2.0
github.com/kisielk/errcheck v1.2.0 // indirect
github.com/kr/pty v1.1.4 // indirect
github.com/lib/pq v1.0.0
github.com/luna-duclos/instrumentedsql v0.0.0-20190316074304-ecad98b20aec // indirect
github.com/mattn/go-colorable v0.1.1 // indirect
github.com/mattn/goveralls v0.0.2
github.com/meatballhat/negroni-logrus v0.0.0-20170801195057-31067281800f
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/gox v1.0.0
github.com/moul/http2curl v1.0.0 // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/ory/dockertest v3.3.4+incompatible
github.com/ory/fosite v0.29.0
github.com/ory/fosite v0.29.1
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90
github.com/ory/go-convenience v0.1.0
github.com/ory/graceful v0.1.0
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.6.0
github.com/ory/hydra v0.0.0-20181208123928-e4bc6c269c6f
github.com/ory/keto v0.0.0-20181213093025-a8d7f9f546ae
github.com/ory/ladon v1.0.0
github.com/ory/x v0.0.37
github.com/ory/ladon v1.0.1
github.com/ory/x v0.0.40
github.com/pborman/uuid v1.2.0
github.com/pelletier/go-toml v1.3.0 // indirect
github.com/pkg/errors v0.8.1
github.com/pkg/profile v1.3.0 // indirect
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872 // indirect
github.com/rs/cors v1.6.0
github.com/rubenv/sql-migrate v0.0.0-20190212093014-1007f53448d7
github.com/sirupsen/logrus v1.3.0
github.com/rubenv/sql-migrate v0.0.0-20190327083759-54bad0a9b051
github.com/sirupsen/logrus v1.4.1
github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3 // indirect
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/viper v1.3.1
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.3.2
github.com/stretchr/testify v1.3.0
github.com/tcnksm/ghr v0.12.0
github.com/tcnksm/go-gitconfig v0.1.2 // indirect
github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e // indirect
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
github.com/uber/jaeger-client-go v2.16.0+incompatible // indirect
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
github.com/ugorji/go/codec v0.0.0-20190320090025-2dc34c0b8780 // indirect
github.com/urfave/negroni v1.0.0
golang.org/x/oauth2 v0.0.0-20190212230446-3e8b2be13635
golang.org/x/tools v0.0.0-20190118193359-16909d206f00
go.opencensus.io v0.20.0 // indirect
go4.org v0.0.0-20190313082347-94abd6928b1d // indirect
golang.org/x/build v0.0.0-20190405045552-3f1c27906a36 // indirect
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 // indirect
golang.org/x/exp v0.0.0-20190402192236-7fd597ecf556 // indirect
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f // indirect
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 // indirect
golang.org/x/mobile v0.0.0-20190327163128-167ebed0ec6d // indirect
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
golang.org/x/perf v0.0.0-20190312170614-0655857e383f // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
golang.org/x/tools v0.0.0-20190404132500-923d25813098
google.golang.org/appengine v1.5.0 // indirect
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 // indirect
google.golang.org/grpc v1.19.1 // indirect
gopkg.in/resty.v1 v1.10.3
gopkg.in/square/go-jose.v2 v2.2.2
gopkg.in/square/go-jose.v2 v2.3.0
honnef.co/go/tools v0.0.0-20190404041852-d36bf9040906 // indirect
)

// Fix for https://github.com/golang/lint/issues/436
replace github.com/golang/lint => github.com/golang/lint v0.0.0-20190227174305-8f45f776aaf1
Loading

0 comments on commit f9fdefb

Please sign in to comment.