georchestra / georchestra-gateway

GNU General Public License v3.0
0 stars 6 forks source link

Make all requests having a `?login` param to be authenticated #32

Closed jahow closed 1 year ago

jahow commented 1 year ago

This implements an exchange matcher in the gateway instead of relying on a route like it is done currently here:

https://github.com/georchestra/datadir/blob/1862f7fe3f250cf99f402513806ffbd7d1984c60/gateway/routes.yaml#L14-L20

The advantage of this approach is that relying on a route will not trigger a redirection after the login form.

Not yet tested in the docker composition

emmdurin commented 1 year ago

It seems to work correctly in docker composition georchestra/docker, but it need to be tested with datahub as we noticed that datahub may intercept the ?login parameter (may be just an integration issue in our specific instance of datahub instead of a datahub code issue).

jahow commented 1 year ago

Thanks, I'll look into the datahub issue

jeanmi151 commented 1 year ago

I think it doesn't need java modification for this to work, maybe just datadir config

jahow commented 1 year ago

I think it doesn't need java modification for this to work, maybe just datadir config

I couldn't get the full login workflow to work (including redirection to original location) with only the YAML configuration, but it should be possible with custom predicates/filters.

jahow commented 1 year ago

I'm going to merge this, we can iterate on it later on if anything else arises