installing.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. Installing an OAuth2 Protocol
  2. -----------------------------
  3. This module allows GeoServer to authenticate against the `OAuth2 Protocol <https://tools.ietf.org/html/rfc6749>`_.
  4. In order to let the module work, it is mandatory to setup and configure an ``oauth2-xxxx-extension``:
  5. * :download_community:`sec-oauth2-google`
  6. * :download_community:`sec-oauth2-geonode`
  7. * :download_community:`sec-oauth2-github`
  8. * :download_community:`sec-oauth2-openid-connect`
  9. Each ZIP files contains the oauth2-core extension, and the jars and the jars for the provider.
  10. The first one contains the necessary dependencies of the OAuth2 core module. This module contains the
  11. GeoServer security filter, the base classes for the OAuth2 Token services and the GeoServer GUI panel.
  12. The second one provides the OAuth2 implementation for each provider. Since in almost all cases the only difference
  13. between OAuth2 Providers are the endpoint URIs and the client connection information (not only the keys -
  14. public and secret - but also the user profile representations).
  15. In order to allow GeoServer to connect to a specific OAuth2 provider it is sufficient to install the OAuth2 Core module
  16. plugin (and correctly configure the parameters through the GeoServer GUI - see next section for the details) and the
  17. concrete implementation of the OAuth2 REST token template and resource details.
  18. Currently this module is shipped with a sample extension for Google OAuth2 Provider. This is a particular case since the
  19. Google JWT response is not standard and therefore we had to define and inject also a ``GoogleUserAuthenticationConverter`` taking
  20. the Google REST response against a valid ``access_token`` and converting it to an OAuth2 standard one.
  21. Other than this the most interesting part is the implementation of the base class ``GeoServerOAuth2SecurityConfiguration``.
  22. The latter contains the Google implementation of the ``OAuth2RestTemplate``.
  23. In the next section we will see how to install and configure the OAuth2 security filter on GeoServer authenticating against
  24. Google OAuth2 Provider.