Tree Gateway - Groups
Tree Gateway allow you to create groups of endpoints and configure any of its features to be applied only to
one or more groups.
Blocking or Allowing Groups
Group Example
---
name: MyGrouppedAPI
version: 1.0.0
path: group/
group:
- id: Allowed
description: Specify a group of endpoints that will be allowed to be called
member:
- path:
- /allowed/**/*
method:
- GET
proxy:
target:
host: http://httpbin.org
allow:
- Allowed
This sample will make tree gateway to return 404 to all requests that does not match the 'Allowed' group rules.
The Allowed group includes only GET requestes to enpoints which path matches the glob pattern '/allowed/**/*'
Complex conditions
Complex Conditions
---
name: MyBasicAuthenticatedAPI
version: 1.0.0
path: grouptest/
group:
- id: secureGroup
description: All routes that need to be authenticated
member:
- path:
- '!**/auth && !**/set-new-password && !**/ask-new-password-code'
proxy:
target:
host: http://httpbin.org
authentication:
strategy:
name: jwt
options:
extractFrom:
authHeader: Bearer
secretOrKey: secret
group: secureGroup
This sample wil configure the same authentication as we show in the JWT example, but
applying it only to certain group of URIs.
All API requests will be authenticated, except by those which matches the pattern specified.
Example of URI that will not be authenticated:
curl http://gateway.address.com/grouptest/test/auth.