Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxify GeoServer's WFS to use Layman's authentication #65

Closed
jirik opened this issue Apr 22, 2020 · 1 comment
Closed

Proxify GeoServer's WFS to use Layman's authentication #65

jirik opened this issue Apr 22, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jirik
Copy link
Member

jirik commented Apr 22, 2020

Currently, access to layers through WFS endpoint is controlled by GeoServer's security system, that is not connected to Layman's security system. So currently, access to GeoServer's web services lies outside of the scope of Layman's authentication and authorization mechanisms. This leads to some problems. Typically, if user wants to edit his layer through WFS, the layer must be either editable to all users including anonymous user, or he must authenticate to GeoServer using admin user.

Purpose of this issue is to enable Layman's authentication mechanism also for GeoServer's web services wherever it's necessary. Currently, the only necessary endpoint is WFS, because we do not restrict read access yet and WMS is read-only service. Other web services than WFS and WMS are not used at this time.

We can solve this by putting Geoserver's WFS behind proxy. The proxy will exchange Layman's authentication credentials for Geoserver's HTTP Header Proxy authentication credentials. Furthermore, we need also to make GeoServer aware of Layman's user and access rights of this user. It can be implemented using GeoServer's role system and layer security rules.

Summary of the whole suggested communication:

  • WFS proxy gets user's HTTP request
  • WFS proxy authenticates the user using Layman's authentication
  • if the authenticated user has username
    • WFS proxy check that user with the same username in GeoServer's role system already exists (if not, it's created) and that appropriate layer security rule exists (if not, it's created)
    • the proxy sets Geoserver's HTTP Proxy Header with appropriate username
  • if the authenticated user does not have username or he is anonymous, no Geoserver's HTTP Proxy Header is set
  • the request with new headers is forwarded to GeoServer and the response is returned directly to the user

As Layman's authorization can be changed by sysadmin, it's also necessary to check and adjust GeoServer's role system and layer security rules on every Layman's startup, so that GeoServer reflects Layman's authorization even after the change.

@jirik jirik added the enhancement New feature or request label Apr 22, 2020
@jirik jirik changed the title Proxify GeoServer's WFS to use Layman's authentication also for them Proxify GeoServer's WFS to use Layman's authentication also for it Apr 22, 2020
@jirik jirik changed the title Proxify GeoServer's WFS to use Layman's authentication also for it Proxify GeoServer's WFS to use Layman's authentication Apr 22, 2020
@jirik jirik modified the milestones: WFS proxy E2, WFS proxy E1 Jul 29, 2020
@jirik
Copy link
Member Author

jirik commented Aug 19, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants