General concept
When following the principle of microservices, every service should accomplish a single task - the task it was designed for. This also applies to the Microgateway.
While chapter Cascaded services already gave a high-level overview of how services can and should be protected, this chapter illustrates how the configuration must be organized.
All example configurations outlined below consist of the following parts:
- The end-user who wants to access a web application
- The Microgateway which is protecting the web application(s). It can be split into the configuration parts below:
- The whole Microgateway, including the external files as outlined in Microgateway architecture and interfaces.
- global settings, which are applied to the whole Microgateway.
- apps, which are composed of virtual_host and mapping configurations.
- virtual_host, which defines the listener settings and the connection to the mappings.
- mappings, which define the security and integration settings that are applied to the requests passed to the back-end. If more than one mapping is underneath the virtual_host, the one with the most specific entry_path.value will be used.
- backend, which defines the service the request should be sent to. It is possible to configure more than one backend.hosts. If so, the Microgateway will randomly select a host and ensure session affinity for mappings in sessionful mode.
- The back-end service (web application) itself.
Further information about the defaults and the structure of the configuration can be found in Configuration.