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

Generic OIDC provider support #10152

Merged
merged 6 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
187 changes: 169 additions & 18 deletions docs/developer-guide/integrations/users/openId.md

Large diffs are not rendered by default.

31 changes: 30 additions & 1 deletion docs/developer-guide/mapstore-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@ This is a list of things to check if you want to update from a previous version
- Optionally check also accessory files like `.eslinrc`, if you want to keep aligned with lint standards.
- Follow the instructions below, in order, from your version to the one you want to update to.

## Migration from 2024.01.00 to 2024.02.00

### Integration with openID Connect

A generic OpenID Connect (OIDC) authentication support has been introduced in MapStore. This feature allows to authenticate users using an OIDC provider, like Keycloak, Okta, Google, Azure, etc.

To provide this functionality, it is necessary to update the project's `geostore-spring-security.xml` file, if the default one is not used.
If you are using the default one, you can skip this step.

Here the changes to apply if needed:

```diff
@@ -24,6 +24,7 @@
<security:custom-filter ref="sessionTokenProcessingFilter" after="FORM_LOGIN_FILTER"/>
<security:custom-filter ref="keycloakFilter" before="BASIC_AUTH_FILTER"/>
<security:custom-filter ref="googleOpenIdFilter" after="BASIC_AUTH_FILTER"/>
+ <security:custom-filter ref="oidcOpenIdFilter" before="OPENID_FILTER"/> <!-- ADD a filter with this ref -->
<security:anonymous />
</security:http>

@@ -52,6 +53,7 @@

<!-- OAuth2 beans -->
<context:annotation-config/>
+ <bean id="oidcSecurityConfiguration" class="it.geosolutions.geostore.services.rest.security.oauth2.openid_connect.OpenIdConnectSecurityConfiguration"/> <!-- add this bean to configure the integration -->

<bean id="googleSecurityConfiguration" class="it.geosolutions.geostore.services.rest.security.oauth2.google.OAuthGoogleSecurityConfiguration"/>
```

offtherailz marked this conversation as resolved.
Show resolved Hide resolved
## Migration from 2023.02.02 to 2024.01.00

### TOC plugin refactor
Expand All @@ -33,7 +62,7 @@ The table of content (TOC) has been refactored with following changes:
- `activateQueryTool` removed property, now the button will be directly added by `FilterLayer` plugin, when available
- `activateDownloadTool` removed property, now the button will be added directly from `LayerDownload` when available
- `activateMetedataTool` removed property, now the button will be added directly from `MetadataInfo` when availables
- `checkPlugins` remove property, now availability of tools rely on the related plugin so this check is not needed anymore
- `checkPlugins` remove property, now availability of tools rely on the related plugin so this check is not needed anymore
- `showFullTitleOnExpand` removed property, the new style allows for seeing the full title inline without duplicating it
- `metadataTemplate` this configuration has been moved to `MetadataInfo` plugin
- `metadataOptions` this configuration has been moved to `MetadataInfo` plugin
Expand Down
7 changes: 6 additions & 1 deletion product/config/db/geostore-spring-security-db.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<security:custom-filter ref="sessionTokenProcessingFilter" after="FORM_LOGIN_FILTER"/>
<security:custom-filter ref="keycloakFilter" before="BASIC_AUTH_FILTER"/>
<security:custom-filter ref="googleOpenIdFilter" after="BASIC_AUTH_FILTER"/>
<security:custom-filter ref="oidcOpenIdFilter" before="OPENID_FILTER"/>
<security:anonymous />
</security:http>

Expand All @@ -50,9 +51,13 @@
<bean id="preauthenticatedAuthenticationProvider" class="it.geosolutions.geostore.services.rest.security.PreAuthenticatedAuthenticationProvider">
</bean>

<!-- OAuth2 beans -->
<context:annotation-config/>
<!-- OAuth2 beans -->

<!-- Generic OIDC -->
<bean id="oidcSecurityConfiguration" class="it.geosolutions.geostore.services.rest.security.oauth2.openid_connect.OpenIdConnectSecurityConfiguration"/>

<!-- Google -->
<bean id="googleSecurityConfiguration" class="it.geosolutions.geostore.services.rest.security.oauth2.google.OAuthGoogleSecurityConfiguration"/>

<!-- Keycloak -->
Expand Down