Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Dec 2, 2024
1 parent 4b32d7d commit 2c1f5ee
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/gatewify-an-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

![gateway](https://github.com/georchestra/georchestra-gateway/actions/workflows/docker.yml/badge.svg)

The gateway belongs to geOrchestra core, since it is the component which :
The gateway belongs to geOrchestra core, since it is the component which:

* handles user sessions
* routes requests to webapps

The behavior is controlled by the files from the `<datadir_root>/security-proxy` folder, which can be found [here](https://github.com/georchestra/datadir/tree/master/security-proxy)
The behavior is controlled by the files from the `<datadir_root>/gateway` folder, which can be found [here](https://github.com/georchestra/datadir/tree/master/security-proxy)

## How-to integrate a new application in geOrchestra ?

The goal here is to benefit from the [SSO](https://en.wikipedia.org/wiki/Single_sign-on) feature for the new application without having to use an external application.
The goal here is to benefit from the [SSO](https://en.wikipedia.org/wiki/Single_sign-on) feature for the new application without having to use an external authentication process.

### Gateway configuration

Expand Down Expand Up @@ -87,7 +87,7 @@ georchestra:

As you can see above, the `newappfrontend` service has a header section, which is used to override the default headers that will be sent to the frontend application.

In `gateway.yaml` as the start of the file, you can modify the default headers sent to apps :
In `gateway.yaml` as the start of the file, you can modify the default headers sent to apps:

```yaml
georchestra:
Expand Down Expand Up @@ -117,8 +117,13 @@ Several other user properties are also provided as headers:
* `sec-lastname` is the second name (LDAP `sn`)
* `sec-tel` is the user phone number (LDAP `telephoneNumber`)

* `sec-json-user` is a json representation of the user object.
* `sec-json-organization` is a json representation of the organization object.

You can find full configuration in [HeaderMappings.java](https://github.com/georchestra/georchestra-gateway/blob/main/gateway/src/main/java/org/georchestra/gateway/model/HeaderMappings.java) file. You just need to rename fields from camelCase (in java file) to kebab-case (in yaml file).

See [here](./custom_filters.adoc#addsecheadersgatewayfilter) for technical details.

The application handles requests appropriately thanks to the headers received.
Some applications will require a direct connection to the LDAP (where users, roles and organisations objects are stored), for instance to list all organisations.

Expand Down

0 comments on commit 2c1f5ee

Please sign in to comment.