feat: CQL2 filtering via STAC Auth Proxy#144
Open
alukach wants to merge 8 commits intoIFRCGo:developfrom
Open
Conversation
Contributor
|
cc @emmanuelmathot - I think will be good for us to go through and this and firm up the best way to integrate. Thanks so much @alukach ! This looks great and just what we need. |
Contributor
|
@sunu I need your help to see how best we should mount this custom filter classes file, and to give this approach a review. |
pantierra
added a commit
to developmentseed/stac-auth-proxy
that referenced
this pull request
Dec 19, 2025
…olumeMounts. (#114) Allows mounting custom filters in a kubernetes setup. Precondition for developmentseed/eoapi-k8s#388 Related: EOEPCA/resource-discovery#198 and IFRCGo/go-deploy#144
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds out CQL2 filters for usage by the STAC Auth Proxy when handling requests for STAC Collections or STAC Items.
The logic is currently written as follows:
privateattribute or withprivate: falseand collections that are referenced by ID within thecollectionsclaim of their JWT access token. These users will be able to view items from collections following this same logic. For the items endpoints, we cache the IDs of the public collections for 30 seconds.superuserclaim (update: with a value of"true") in their JWT access token will be able to view all collections and items.Note that we pay no attention to the value of thesuperuserclaim, we only care that something is set on the JWT under that claim.These filters are written in
applications/argocd/staging/applications/montandon-eoapi/stac-auth-proxy/montandon_filters.pyand mounted to/app/src/stac_auth_proxy/montandon_filters.pywithin the STAC Auth Proxy container, allowing them to be referenced as theCOLLECTIONS_FILTER_CLS=stac_auth_proxy.montandon_filters:CollectionsFilter1 andITEMS_FILTER_CLS=stac_auth_proxy.montandon_filters:ItemsFilter2 within the runtime.Footnotes
https://developmentseed.org/stac-auth-proxy/user-guide/configuration/#collections_filter_cls ↩
https://developmentseed.org/stac-auth-proxy/user-guide/configuration/#items_filter_cls ↩