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

Accesstokens #1

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open

Accesstokens #1

wants to merge 79 commits into from

Conversation

davidblasby
Copy link
Owner

@davidblasby davidblasby commented Jul 27, 2022

This PR is improving the support for Bearer Tokens. See the updated GS OpenID documentation for setup and usage.

Summary: attach an Access Token to your HTTP requests - useful for automated (i.e. desktop/remote web) access of the REST api.

There was already some partial support for Bearer tokens. This PR improves it.

  1. There is now better token validation (see GS doc + OIDC specification). This improves security.
  2. Since you cannot use ID Tokens with attached access tokens, I added two new ways to get user groups:
    a) from the "userinfo" endpoint (recommended for KeyCloak)
    b) from the MS Graph API (only for MS Azure AD)
  3. There is a configuration on the OIDC web page to turn on/off bearer tokens
  4. I added some minor validation to the OIDC web page
  5. Added a few test cases
  6. Updated documentation for Attached Bearer Tokens
  7. Tested with Keycloak and Azure AD
  8. I attach the "userinfo" results to the incomming request (in the same manner as the ID/Access tokens + other spring stuff)
  9. I attach a flag to the incomming request indicating if the authentication is BEARER or USER (in the same manner as the ID/Access tokens + other spring stuff)

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • [n/a] The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

fernandor777 and others added 30 commits July 29, 2022 10:51
* [GEOS-10591] XML view params format implementation

* Update doc/en/user/source/data/database/sqlview.rst

Co-authored-by: Andrea Aime <[email protected]>

* Update doc/en/user/source/data/database/sqlview.rst

Co-authored-by: Andrea Aime <[email protected]>

* Update doc/en/user/source/data/database/sqlview.rst

Co-authored-by: Andrea Aime <[email protected]>

* [GEOS-10591] review fixes

* Fix case insensitive viewParamsFormat handling

Co-authored-by: Andrea Aime <[email protected]>
)

* [GEOS-10569] Features API support sortby query parameter

* [GEOS-10569] Fix format violations

* [GEOS-10569] Replace List.of with ImmutableList.copyOf
Documentation on Adding an external WMTS & Configuring external WMTS layers via REST for this reference
https://docs.geoserver.org/stable/en/user/data/cascaded/wmts.html
Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](pgjdbc/pgjdbc@REL42.3.3...REL42.4.1)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
rm python & java section on the REST documentation
removed python & java admonition
Update documentation on WMTS Store & WMTS Layer
The workspace wide templates are stored in the same 'workspaces' folder as the layer specific templates.
[GEOS-10620] Update oshi to 6.2.2 to support Apple M2 CPU
* Fixing minor documentation issues

Fixing minor grammar, usage, and typos in the documentationl. Also,
rephrased a couple of areas for improved clarity.

* Update doc/en/user/source/tutorials/GetFeatureInfo/raster.rst

Co-authored-by: Brad Hards <[email protected]>
[GEOS-10615] Fix KML placemark template path in documentation
Using "geoserver_dir" to match docker structure.
…ver#6107)

* update docker container documentation

* minor changes

* update to jody's comments

* adding extensions

Co-authored-by: david.blasby <[email protected]>
…d (broken) plural endpoints to (working) singular
@@ -0,0 +1,133 @@
package org.geoserver.security.oauth2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

header needed

bradh and others added 28 commits September 9, 2022 08:44
…n lead to OOM (geoserver#6124)

* Fixed concurrency issue in setLayer that can lead to out of memory issues when iterating trough the available styles

* Fixed NPE in clone()

* Added unit-test that covers concurrent modification scenario

* Fixed class formatting

* Code changes to comply with code-style and PMD checks

* Added missing copyright header

Co-authored-by: Andrea Aime <[email protected]>
[GEOS-10636] (proxied) Login is broken after upgrade to 2.22-M0 and 2.21.1
[GEOS-10654] app-schema GetFeature numberMatched fails with ID filter:…
The method arguments were in the wrong order.
…nect-core/src/main/java/org/geoserver/security/oauth2/MSGraphRolesResolver.java

Co-authored-by: Jody Garnett <[email protected]>
…nect-core/src/main/java/org/geoserver/security/oauth2/OpenIdConnectAuthenticationFilter.java

Co-authored-by: Jody Garnett <[email protected]>
…nect-core/src/main/java/org/geoserver/security/oauth2/OpenIdConnectAuthenticationProvider.java

Co-authored-by: Jody Garnett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.