Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

API Gateway Configuration

Davide Di Ruscio edited this page Mar 21, 2018 · 1 revision

When to use this guideline ?

This guideline present how to configure the CROSSMINER Gateway in order to integrate a new remote REST API.

Context

The CROSSMINER Gateway can be configured by the intermediary of an external property file (application.properties) to place in the execution directory of the CROSSMINER Gateway component. This file allow to configure the routing of requests send to the gateway an some security parameters.

Routing : Service Configuration

To reference a new remote REST API in the gateway, you have to add 2 new properties in the application.properties configuration file : the relative path of services which will be integrated to this route and the redirection URL.All requests sent to the gateway which start by this relatice path will be redirected to the output url after the authentication process.

Examples :

The request http://85.36.10.13:8080/administration/project/create will be redirected to http://85.36.10.12:8082/administration/project/create

id : zuul.routes.**servicename**.path default : NA
Relative path of the incoming service which will be redirected. Example : /test1/**
id : zuul.routes.**servicename**.url default : NA
Redirection URL of the route. Example : http://127.0.0.1:8082/test1

Configuration file example

# Rooting Configuration : Test1 Service
zuul.routes.test1.path=/test1/**
zuul.routes.test1.url=http://127.0.0.1:8082/test1

# Rooting Configuration : Test2 Service
zuul.routes.test2.path=/test2/**
zuul.routes.test2.url=http://127.0.0.1:8083/test2

Comments

More information about API Gateway configuration : API Gateway Component