opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
88 stars 71 forks source link

Hide all internal services behind one url #6279

Open rikukissa opened 11 months ago

rikukissa commented 11 months ago

Benefits:

Services to consider:

We will be leaving all the webapps(login, client, kibana, metabase, minio-console) as is.

These are URLs that we sending to client from countryconfig currently:

  API_GATEWAY_URL: 'http://localhost:7070/'
  CONFIG_API_URL: 'http://localhost:2021'
  LOGIN_URL: 'http://localhost:3020'
  AUTH_URL: 'http://localhost:7070/auth/'
  COUNTRY_CONFIG_URL: 'http://localhost:3040'

As part of this ticket we would like to trim this down to this:

  API_GATEWAY_URL: 'http://localhost:7070/'
  LOGIN_URL: 'http://localhost:3020'

The LOGIN_URL still needs to stay because it's a totally separate webapp. While all the API's will be served from API_GATEWAY_URL

CountryConfig

From clinet/login's perspective, it doesn't need to know whether it's communicating with config or countryconfig microservice. So we will be proxy all relevant countryconfig public endpoints behind /api/config/

Webhooks

Minio

We will be proxying all /api/documents/* endpoints from gateway to the minio service

Client & Gateway

rikukissa commented 5 months ago

Related https://github.com/opencrvs/opencrvs-core/issues/6869

rikukissa commented 5 months ago

Related https://github.com/opencrvs/opencrvs-core/issues/6692

rikukissa commented 4 months ago

This task need to be prioritised as we frequently have mission-critical data exposed from different services. For example, the certificates are available without authorisation.

https://countryconfig.farajaland-qa.opencrvs.org/certificates

rikukissa commented 2 months ago

There's another auth related endpoint exposed. In some places it would also be easier from implementation point of view if we could have as many of these services hidden as we can