Skip to content

Commit

Permalink
update gateway config
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienBtr committed Nov 7, 2020
1 parent b380342 commit 03647dc
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 12 deletions.
17 changes: 5 additions & 12 deletions services/api-gateway/krakend.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,10 @@
}
},
"endpoints": [
{
{ template "endpoint.tmpl" .article
}
},
{
{ template "endpoint.tmpl" .cart
}
},
{
{ template "endpoint.tmpl" .documentation
}
}
{{ template "endpoint.tmpl" .auth }},
{{ template "endpoint.tmpl" .user }},
{{ template "endpoint.tmpl" .article }},
{{ template "endpoint.tmpl" .cart}},
{{ template "endpoint.tmpl" .documentation}}
]
}
31 changes: 31 additions & 0 deletions services/api-gateway/settings/auth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"hosts": [
"http://auth_app_1:3500"
],
"endpoints": [
{
"endpoint": "/auth/login",
"method": "POST",
"url_pattern": "/auth/login",
"encoding": "json",
"extra_config": {
"github.com/devopsfaith/krakend-jose/signer": {
"alg": "HS256",
"kid": "micro-express",
"keys-to-sign": [
"accessToken"
],
"jwk-url": "http://auth_app_1:3500/symmetric.json",
"disable_jwk_security": true
}
}
},
{
"endpoint": "/auth/sign-up",
"method": "PUT",
"url_pattern": "/auth/sign-up",
"encoding": "no-op",
"extra_config": {}
}
]
}
76 changes: 76 additions & 0 deletions services/api-gateway/settings/user.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"hosts": [
"http://user_app_1:3500"
],
"endpoints": [
{
"endpoint": "/users",
"method": "GET",
"url_pattern": "/users",
"encoding": "no-op",
"extra_config": {
"github.com/devopsfaith/krakend-jose/validator": {
"alg": "HS256",
"jwk-url": "http://auth_app_1:3500/symmetric.json",
"disable_jwk_security": true
}
}
},
{
"endpoint": "/users/{id}",
"method": "GET",
"url_pattern": "/users/{id}",
"encoding": "no-op",
"extra_config": {
"github.com/devopsfaith/krakend-jose/validator": {
"alg": "HS256",
"jwk-url": "http://auth_app_1:3500/symmetric.json",
"disable_jwk_security": true
}
}
},
{
"endpoint": "/users/{id}",
"method": "PUT",
"url_pattern": "/users/{id}",
"encoding": "no-op",
"extra_config": {
"github.com/devopsfaith/krakend-jose/validator": {
"alg": "HS256",
"jwk-url": "http://auth_app_1:3500/symmetric.json",
"disable_jwk_security": true
}
}
},
{
"endpoint": "/users/{id}",
"method": "DELETE",
"url_pattern": "/users/{id}",
"encoding": "no-op",
"extra_config": {
"github.com/devopsfaith/krakend-jose/validator": {
"alg": "HS256",
"roles_key": "roles",
"roles": [
"manager"
],
"jwk-url": "http://auth_app_1:3500/symmetric.json",
"disable_jwk_security": true
}
}
},
{
"endpoint": "/users/{id}/password",
"method": "PUT",
"url_pattern": "/users/{id}/password",
"encoding": "no-op",
"extra_config": {
"github.com/devopsfaith/krakend-jose/validator": {
"alg": "HS256",
"jwk-url": "http://auth_app_1:3500/symmetric.json",
"disable_jwk_security": true
}
}
}
]
}

0 comments on commit 03647dc

Please sign in to comment.