Skip to content

feat: Add custom filter logic for stac-auth-proxy#388

Merged
pantierra merged 2 commits intomainfrom
feature/stac-auth-proxy-custom-filters
Jan 16, 2026
Merged

feat: Add custom filter logic for stac-auth-proxy#388
pantierra merged 2 commits intomainfrom
feature/stac-auth-proxy-custom-filters

Conversation

@pantierra
Copy link
Contributor

@pantierra pantierra commented Dec 15, 2025

@pantierra pantierra changed the title Add custom filter logic for stac-auth-proxy feat: Add custom filter logic for stac-auth-proxy Dec 15, 2025
@pantierra pantierra force-pushed the feature/stac-auth-proxy-custom-filters branch from 0bddf9d to 22ae95b Compare December 15, 2025 21:55
@pantierra pantierra requested review from alukach and batpad December 15, 2025 22:03
@pantierra
Copy link
Contributor Author

pantierra commented Dec 15, 2025

This requires stac-auth-proxy to support extraVolumes and extraVolumeMounts: developmentseed/stac-auth-proxy#114

@pantierra
Copy link
Contributor Author

#386 should fix the failing tests.

@pantierra pantierra force-pushed the feature/stac-auth-proxy-custom-filters branch from 935b994 to 1b7e70b Compare December 16, 2025 15:11
@pantierra
Copy link
Contributor Author

I think a lot of the stuff should flow upstream: developmentseed/stac-auth-proxy#118
And then we can simplify this PR and make it nicer for the users.

@pantierra pantierra force-pushed the feature/stac-auth-proxy-custom-filters branch 2 times, most recently from daf0427 to ea0e1ae Compare December 19, 2025 13:04
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
@pantierra pantierra force-pushed the feature/stac-auth-proxy-custom-filters branch 2 times, most recently from 87f0c45 to 6346e1a Compare January 14, 2026 11:43
@pantierra pantierra marked this pull request as ready for review January 14, 2026 11:44
@pantierra
Copy link
Contributor Author

After implementing it upstream and adapting here to the new helm chart options, I ran into an important limitation: Files outside of a Helm application subchart, including those of the parent, cannot be accessed. This means we can't inject the custom_filters.py without the workaround (mounts and configMap) we were already using.

So i cleaned it up, added a few tests and this is ready for review.

@pantierra pantierra force-pushed the feature/stac-auth-proxy-custom-filters branch 2 times, most recently from e3d7f96 to e2996aa Compare January 14, 2026 11:48
@pantierra pantierra force-pushed the main branch 7 times, most recently from 6f0a6fe to 25dc65d Compare January 14, 2026 15:55

# Path to custom filters file (relative to chart root)
# When extraVolumes is configured, a ConfigMap will be created from this file
# customFiltersFile: "data/stac-auth-proxy/custom_filters.py"
Copy link
Member

Choose a reason for hiding this comment

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

So to make custom filters work I need to:

  • Define the customFiltersFile
  • Define extraVolumes as specified in the commented out bits
  • Define extraVolumeMounts as shown in the commented out example

Is that roughly accurate? Can we make that a bit more explicit in the docs, that you need to specify customFiltersFile and ALSO specify the extraVolumes and extraVolumeMounts for it to actually work?

I can see that this is slightly awkward for good reason, but I think we could some-how be a little bit clearer in the comments here - does that make sense?

If I'm misunderstanding and you don't actually need extraVolumes and extraVolumeMounts, then ignore this comment :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right, we need all three things.

And you are also right that this should be much better documented. I went over the documentation and tried to make things much clearer.

@pantierra pantierra force-pushed the feature/stac-auth-proxy-custom-filters branch from e2996aa to 4b37dc4 Compare January 16, 2026 13:08
@pantierra pantierra requested a review from batpad January 16, 2026 14:35
@pantierra pantierra force-pushed the feature/stac-auth-proxy-custom-filters branch from 741e345 to df55e35 Compare January 16, 2026 14:41
@pantierra pantierra merged commit 019204e into main Jan 16, 2026
4 checks passed
@pantierra pantierra deleted the feature/stac-auth-proxy-custom-filters branch January 16, 2026 15:09
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.

Custom authorization logic

3 participants