From cfc22e3fd8f70902ef9eb082170f4c549b3c66a4 Mon Sep 17 00:00:00 2001 From: SebastienBtr Date: Sat, 14 Nov 2020 16:42:02 +0100 Subject: [PATCH] fix gateway issue --- services/api-gateway/krakend.json | 12 +++++++++++- services/api-gateway/settings/auth.json | 2 +- services/api-gateway/templates/endpoint.tmpl | 4 ++-- services/auth/docker-compose.yaml | 3 +++ services/auth/src/jwk/symmetric.json | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/services/api-gateway/krakend.json b/services/api-gateway/krakend.json index 49c14b3..b265d95 100644 --- a/services/api-gateway/krakend.json +++ b/services/api-gateway/krakend.json @@ -1,6 +1,6 @@ { "version": 2, - "timeout": "3000ms", + "timeout": "20000ms", "cache_ttl": "300s", "extra_config": { "github_com/devopsfaith/krakend-cors": { @@ -21,6 +21,16 @@ ], "max_age": "12h" }, + "github_com/devopsfaith/bloomfilter": { + "N": 10000000, + "P": 0.0000001, + "HashName": "optimal", + "TTL": 1500, + "port": 1234, + "TokenKeys": [ + "jti" + ] + }, "github_com/devopsfaith/krakend-metrics": { "listen_address": ":8090" }, diff --git a/services/api-gateway/settings/auth.json b/services/api-gateway/settings/auth.json index 4e97397..178b778 100644 --- a/services/api-gateway/settings/auth.json +++ b/services/api-gateway/settings/auth.json @@ -11,7 +11,7 @@ "extra_config": { "github.com/devopsfaith/krakend-jose/signer": { "alg": "HS256", - "kid": "micro-express", + "kid": "micro", "keys-to-sign": [ "accessToken" ], diff --git a/services/api-gateway/templates/endpoint.tmpl b/services/api-gateway/templates/endpoint.tmpl index 1078b6b..26399c2 100644 --- a/services/api-gateway/templates/endpoint.tmpl +++ b/services/api-gateway/templates/endpoint.tmpl @@ -9,11 +9,11 @@ "*" ], "extra_config": {{ marshal $el.extra_config }}, - "output_encoding": "no-op", + "output_encoding": "{{ $el.encoding }}", "method": "{{ $el.method }}", "backend": [ { - "encoding": "no-op", + "encoding": "{{ $el.encoding }}", "host": {{ marshal $.hosts }}, "url_pattern": "{{ $el.url_pattern }}", "method": "{{ $el.method }}" diff --git a/services/auth/docker-compose.yaml b/services/auth/docker-compose.yaml index a317d60..1dc240c 100644 --- a/services/auth/docker-compose.yaml +++ b/services/auth/docker-compose.yaml @@ -7,11 +7,14 @@ services: - ./src:/app/src - /app/node_modules networks: + - user_app - app logging: driver: ${LOGGING_DRIVER:-json-file} restart: always networks: + user_app: + external: true app: driver: bridge diff --git a/services/auth/src/jwk/symmetric.json b/services/auth/src/jwk/symmetric.json index 502fbc2..1966ef7 100755 --- a/services/auth/src/jwk/symmetric.json +++ b/services/auth/src/jwk/symmetric.json @@ -3,7 +3,7 @@ { "kty": "oct", "k": "AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow", - "kid": "micro-express", + "kid": "micro", "alg": "HS256" } ]