geonetwork / geonetwork-microservices

GNU General Public License v2.0
13 stars 18 forks source link

API gateway service #10

Closed groldan closed 3 years ago

groldan commented 4 years ago

Create an api gateway service and set up initial routes to internal services https://spring.io/projects/spring-cloud-gateway

fxprunayre commented 4 years ago

Relates to https://github.com/geonetwork/geonetwork-microservices/blob/main/modules/services/routing/src/main/java/org/fao/geonet/routing/GnRoutingApp.java

We can have a route which forward to GN4 and then new API provided by microservices. Once a microservice replace GN4 API, the routing can take care of the redirection. As a first example, the search service can now be replaced by the search service.

Question: The gateway can take care of forwarding authentication to the GN4 app?

groldan commented 4 years ago

Question: The gateway can take care of forwarding authentication to the GN4 app?

It can. I haven't done it, but here's a blog post about how to: https://spring.io/blog/2019/08/16/securing-services-with-spring-cloud-gateway