Skip to content

Commit 630ae1d

Browse files
committed
Facts from RBAC service was added
1 parent 4deb780 commit 630ae1d

18 files changed

+387
-230
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
####### Start from a golang base image ###############
2-
FROM golang:1.13.6-buster as builder
2+
FROM golang:1.17-buster as builder
33
LABEL maintainer="Motiv Labs <dev@motivsolutions.com>"
44
WORKDIR /app
55
COPY ./ ./

assets/apis/example_MultipleDefinitions.json

-93
This file was deleted.

assets/apis/example_SingleDefinition.json

-31
This file was deleted.

assets/auth/auth.json

-27
This file was deleted.

assets/config/config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
kafkaAddr: "kafka:9092"
2+
kafkaFactTopic: "rbac-facts"
3+
kafkaDLQTopic: "DLQRBAC"
4+
kafkaConsumerGroup: "RABAC"

assets/docker-compose.yml

+12-39
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,16 @@
11
# This file is used to run integration tests on travis
22
version: '3'
33
services:
4-
5-
mongo:
6-
image: mongo:3
4+
gateway:
75
ports:
8-
- "27017:27017"
9-
healthcheck:
10-
test: "mongo localhost:27017/test --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'"
11-
interval: 10s
12-
timeout: 5s
13-
retries: 5
14-
15-
upstreams:
16-
image: rodolpheche/wiremock:2.27.1-alpine
17-
ports:
18-
- '9089:8080'
19-
20-
auth-service:
21-
image: rodolpheche/wiremock:2.27.1-alpine
22-
ports:
23-
- '9088:8080'
24-
25-
jaeger:
26-
image: jaegertracing/all-in-one
27-
environment:
28-
COLLECTOR_ZIPKIN_HTTP_PORT: 9411
29-
ports:
30-
- "5775:5775/udp"
31-
- "6831:6831/udp"
32-
- "6832:6832/udp"
33-
- "5778:5778"
34-
- "16686:16686"
35-
- "14268:14268"
36-
37-
zipkin:
38-
image: openzipkin/zipkin
39-
environment:
40-
STORAGE_TYPE: mem
41-
JAVA_OPTS: -Dlogging.level.zipkin=DEBUG
42-
ports:
43-
- 9411:9411
6+
- "8080:8080"
7+
- "8081:8081"
8+
container_name: "gateway"
9+
build:
10+
context: ../
11+
dockerfile: Dockerfile
12+
volumes:
13+
- ${PWD}/config/config.yaml:/config/config.yaml
14+
- .janus.toml:/etc/janus/janus.toml
15+
- ./apis:/etc/janus/apis
16+
- ./auth:/etc/janus/auth

assets/janus.toml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
################################################################
2+
# Global configuration
3+
################################################################
4+
port = 8080
5+
6+
[log]
7+
level = "debug"
8+
9+
################################################################
10+
# API configuration backend
11+
################################################################
12+
[web]
13+
port = 8081
14+
15+
[web.credentials]
16+
secret = "secret"
17+
18+
[web.credentials.basic]
19+
users = {admin = "admin"}
20+
21+
[database]
22+
dsn = "file:///etc/janus"

go.mod

+68-14
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,113 @@
11
module github.com/hellofresh/janus
22

3-
go 1.15
3+
go 1.17
44

55
require (
66
code.cloudfoundry.org/bytefmt v0.0.0-20180108190415-b31f603f5e1e
77
contrib.go.opencensus.io/exporter/jaeger v0.2.1
88
contrib.go.opencensus.io/exporter/prometheus v0.3.0
9-
github.com/DataDog/datadog-go v0.0.0-20180330214955-e67964b4021a // indirect
109
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible
1110
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
1211
github.com/asaskevich/govalidator v0.0.0-20171111151018-521b25f4b05f
13-
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
14-
github.com/cactus/go-statsd-client v3.1.1+incompatible // indirect
1512
github.com/cucumber/godog v0.10.0
1613
github.com/cucumber/messages-go/v10 v10.0.3
1714
github.com/dgrijalva/jwt-go v3.2.0+incompatible
1815
github.com/felixge/httpsnoop v1.0.0
19-
github.com/fiam/gounidecode v0.0.0-20150629112515-8deddbd03fec // indirect
2016
github.com/fsnotify/fsnotify v1.4.9
2117
github.com/go-chi/chi v3.3.2+incompatible
2218
github.com/go-redis/redis/v7 v7.4.0
2319
github.com/gocql/gocql v0.0.0-20200624222514-34081eda590e
2420
github.com/gofrs/uuid v3.3.0+incompatible
21+
github.com/golang-jwt/jwt/v4 v4.4.3
2522
github.com/google/go-github v17.0.0+incompatible
26-
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect
2723
github.com/hellofresh/health-go/v3 v3.2.0
2824
github.com/hellofresh/logging-go v0.1.6
2925
github.com/hellofresh/opencensus-go-extras v0.0.0-20191004131501-7bd94f603dcf
3026
github.com/hellofresh/stats-go v0.8.0
3127
github.com/kelseyhightower/envconfig v1.3.0
32-
github.com/klauspost/compress v1.10.10 // indirect
3328
github.com/magiconair/properties v1.8.1
3429
github.com/mitchellh/go-homedir v1.1.0
3530
github.com/mitchellh/mapstructure v1.1.2
36-
github.com/onsi/ginkgo v1.13.0 // indirect
3731
github.com/opentracing/opentracing-go v1.2.0
3832
github.com/rafaeljesus/retry-go v0.0.0-20171214204623-5981a380a879
3933
github.com/rs/cors v1.4.0
34+
github.com/segmentio/kafka-go v0.4.38
4035
github.com/sirupsen/logrus v1.7.0
4136
github.com/spf13/cobra v1.0.0
42-
github.com/spf13/pflag v1.0.5 // indirect
4337
github.com/spf13/viper v1.7.1
44-
github.com/stretchr/testify v1.6.1
38+
github.com/stretchr/testify v1.8.1
4539
github.com/tidwall/gjson v1.1.0
46-
github.com/tidwall/match v1.0.0 // indirect
4740
github.com/ulule/limiter/v3 v3.5.0
4841
go.mongodb.org/mongo-driver v1.4.1
4942
go.opencensus.io v0.23.0
50-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
51-
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
43+
golang.org/x/crypto v0.5.0
44+
golang.org/x/net v0.5.0
5245
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
46+
)
47+
48+
require (
49+
github.com/DataDog/datadog-go v0.0.0-20180330214955-e67964b4021a // indirect
50+
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
51+
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
52+
github.com/aws/aws-sdk-go v1.29.15 // indirect
53+
github.com/beorn7/perks v1.0.1 // indirect
54+
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
55+
github.com/cactus/go-statsd-client v3.1.1+incompatible // indirect
56+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
57+
github.com/cucumber/gherkin-go/v11 v11.0.0 // indirect
58+
github.com/davecgh/go-spew v1.1.1 // indirect
59+
github.com/fiam/gounidecode v0.0.0-20150629112515-8deddbd03fec // indirect
60+
github.com/go-stack/stack v1.8.0 // indirect
61+
github.com/gogo/protobuf v1.3.1 // indirect
62+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
63+
github.com/golang/protobuf v1.4.3 // indirect
64+
github.com/golang/snappy v0.0.1 // indirect
65+
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect
66+
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
67+
github.com/hashicorp/go-immutable-radix v1.2.0 // indirect
68+
github.com/hashicorp/go-memdb v1.2.1 // indirect
69+
github.com/hashicorp/golang-lru v0.5.4 // indirect
70+
github.com/hashicorp/hcl v1.0.0 // indirect
71+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
72+
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
73+
github.com/klauspost/compress v1.15.15 // indirect
74+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
75+
github.com/onsi/ginkgo v1.13.0 // indirect
76+
github.com/onsi/gomega v1.10.1 // indirect
77+
github.com/pelletier/go-toml v1.4.0 // indirect
78+
github.com/pierrec/lz4/v4 v4.1.17 // indirect
79+
github.com/pkg/errors v0.9.1 // indirect
80+
github.com/pmezard/go-difflib v1.0.0 // indirect
81+
github.com/prometheus/client_golang v1.9.0 // indirect
82+
github.com/prometheus/client_model v0.2.0 // indirect
83+
github.com/prometheus/common v0.15.0 // indirect
84+
github.com/prometheus/procfs v0.2.0 // indirect
85+
github.com/prometheus/statsd_exporter v0.20.0 // indirect
86+
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
87+
github.com/spf13/afero v1.1.2 // indirect
88+
github.com/spf13/cast v1.3.0 // indirect
89+
github.com/spf13/jwalterweatherman v1.0.0 // indirect
90+
github.com/spf13/pflag v1.0.5 // indirect
91+
github.com/subosito/gotenv v1.2.0 // indirect
92+
github.com/tidwall/match v1.0.0 // indirect
93+
github.com/uber/jaeger-client-go v2.25.0+incompatible // indirect
94+
github.com/xdg/scram v1.0.5 // indirect
95+
github.com/xdg/stringprep v1.0.3 // indirect
96+
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
97+
golang.org/x/sys v0.4.0 // indirect
98+
golang.org/x/text v0.6.0 // indirect
5399
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
100+
google.golang.org/api v0.29.0 // indirect
101+
google.golang.org/appengine v1.6.5 // indirect
102+
google.golang.org/protobuf v1.25.0 // indirect
103+
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
54104
gopkg.in/alexcesaro/statsd.v2 v2.0.0 // indirect
105+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
55106
gopkg.in/gemnasium/logrus-graylog-hook.v2 v2.0.6 // indirect
56-
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
107+
gopkg.in/inf.v0 v0.9.1 // indirect
108+
gopkg.in/ini.v1 v1.51.0 // indirect
109+
gopkg.in/yaml.v2 v2.4.0 // indirect
110+
gopkg.in/yaml.v3 v3.0.1 // indirect
57111
)
58112

59113
replace git.apache.org/thrift.git => github.com/apache/thrift v0.12.0

0 commit comments

Comments
 (0)