-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation for gateway configuration files
- Loading branch information
Showing
1 changed file
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
This folder contains configuration files and custom templates for geOrchestra Gateway. | ||
|
||
## Documentation | ||
|
||
Documentation can be found in [docs directory at root of georchestra-gateway](https://github.com/georchestra/georchestra-gateway/blob/ui_customization_doc/docs) repository. | ||
|
||
## List of configuration files | ||
|
||
#### `application.yaml` | ||
|
||
Contains filters applicable to all transfers through the gateway, and general Spring settings. | ||
|
||
#### `gateway.conf` | ||
|
||
Contains access rules for all services available through the gateway. | ||
|
||
Please see https://github.com/georchestra/georchestra-gateway/blob/main/docs/access-rules.adoc | ||
|
||
#### `roles-mappings.yaml` | ||
|
||
Allow to map roles returned by authentication providers to standardized geOrchestra roles. | ||
|
||
Please see https://github.com/georchestra/georchestra-gateway/blob/main/docs/roles-mappings.adoc | ||
|
||
#### `routes.yaml` | ||
|
||
Contains list of routes for redirection to the correct service URL based on criterias (typically URL patterns but other criterias exists). | ||
Also allows to apply additional filters on this route. | ||
|
||
#### `security.yaml` | ||
|
||
Contains all settings about authentication. Please see the following documents : | ||
OAuth2 : https://github.com/georchestra/georchestra-gateway/blob/main/docs/authzn.adoc | ||
Pre-authentication : https://github.com/georchestra/georchestra-gateway/blob/main/docs/pre-authentication.adoc | ||
|
||
## Templates | ||
|
||
If needed, default pages can be overriden by custom templates. This includes login, logout page, and error pages. Only existing templates will override default ones. | ||
|
||
Please see https://github.com/georchestra/georchestra-gateway/blob/main/docs/ui-customization.adoc | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
All templates are typically kept into a `templates` sub-directory, but this can be changed. In all cases, this sub-directory shall be specified in gateway configuration file `application.yaml` as below : | ||
``` | ||
spring: | ||
thymeleaf: | ||
prefix: file:${georchestra.datadir}/gateway/templates/ | ||
cache: false | ||
``` | ||
|
||
Template directory content is shown below. | ||
|
||
#### `login.html` file | ||
|
||
This contains custom login page. | ||
|
||
#### `logout.html` file | ||
|
||
This contains custom logout confirmation page. | ||
|
||
#### `error` sub-directory | ||
|
||
This directory can contain with custom templates for handling 4xx and 5xx HTTP errors. Just create a template file that has the name of error to handle (like `404.html`). | ||
|
||
#### `messages` sub-directory | ||
|
||
This directory can contain translation files for captions used in custom templates. File naming consists of a base name followed by an underscore and a language code, then the `.properties` extension. For example `basename_fr.properties` will be used for French translations. English translation can be left without underscore and language code as `basename.properties`. | ||
|
||
In-file format is `key = value` lines, and expected encoding is UTF-8. | ||
|
||
This sub-directory and the basename shall be specified in gateway configuration file `application.yaml`, by concatenation of the both as below : | ||
``` | ||
spring: | ||
messages | ||
basename: file:${georchestra.datadir}/gateway/templates/messages/basename | ||
``` | ||
|
||
|
||
#### `static` sub-directory | ||
|
||
This directory can contain all needed static files for custom templates, such as images, CSS files, JS files... This sub-directory shall be specified in gateway configuration file `application.yaml` as below : | ||
``` | ||
spring: | ||
web: | ||
resources: | ||
static-locations: file:${georchestra.datadir}/gateway/templates/static/ | ||
``` | ||
|
||
The path where they will be made available to the HTTP client has also to be specified in same location as below. Be aware not to collide with gateway routes when choosing this path. | ||
``` | ||
spring: | ||
webflux: | ||
static-path-pattern: /path/to/static/** | ||
``` |