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

optional-components/stac-public-access: add public write permission for POST /stac/search request #405

Merged
merged 3 commits into from
Nov 30, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ component/geoserver:
component/jupyterhub:
- birdhouse/**/jupyterhub/**/*

component/STAC:
- birdhouse/**/*stac*/**/*

feature/WPS:
- birdhouse/**/finch/**/*
- birdhouse/**/flyingpigeon/**/*
Expand Down
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
------------------------------------------------------------------------------------------------------------------

[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
- `optional-components/stac-public-access`: add public write permission for `POST /stac/search` request.

Since [`pystac_client`](https://github.com/stac-utils/pystac-client), a common interface to interact with STAC API,
employs `POST` method by default to perform search, the missing permission caused an unexpected error for users that
are not aware of the specific permission control of Magpie. Since nothing is created by that endpoint, but rather,
the POST'ed body employs the convenient JSON format to provide search criteria, it is safe to set this permission
when the STAC service was configured to be publicly searchable.

[1.38.0](https://github.com/bird-house/birdhouse-deploy/tree/1.38.0) (2023-11-21)
------------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ permissions:
permission: read
group: anonymous
action: create

# search can be performed by GET query-string or POST JSON search body
# in both cases, nothing is 'written' or 'created' unlike most common POST requests
# it is sensible to enable it, since 'pystac_client.Client.open' uses POST by default
- service: stac
resource: /stac/search
permission: write-match
group: anonymous
action: create

- service: stac
resource: /stac
permission: write
Expand Down
Loading