Skip to content

Conversation

@pantierra
Copy link
Contributor

@pantierra pantierra commented Dec 16, 2025

This PR adds the following authorization options to the helm chart:

stac-auth-proxy:
  enabled: true

  authorization:
  
    route:
      # mode: "default" (default, DEFAULT_PUBLIC), "custom", "private", "disabled"
      mode: "default"
     
      # Custom endpoint configurations (only used when mode: "custom")
      publicEndpoints: {}
        # Example:
        # "^/collections$": ["GET"]
        # "^/search$": ["GET", "POST"]
      privateEndpoints: {}
        # Example:
        # "^/collections$": [["POST", "collection:create"]]
        # "^/collections/([^/]+)/items$": [["POST", "item:create"]]
    
    record:
      # mode: "disabled" (default), "custom", "opa"
      mode: "disabled"
    
      # Custom filters configurations (only used when mode: "custom")
      custom:
        filtersFile: "data/custom_filters.py"
        
      # OPA configuration (only used when mode: "opa")
      opa:
        url: "http://opa:8181/"
        policy: "stac/items/allow"

Manual configuration via environment variables and manual mount of filter files is still possible.

Moved kubernetes documentation into it's own file and added documentation for the auth options provided by the helm charts with this PR.

The PR requires #114 and #117.

I open this as a draft, as I expect us to have a few iterations and conversations about this.

@@ -0,0 +1,150 @@
# Authorization configuration guide
Copy link
Member

Choose a reason for hiding this comment

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

Should we push this into the docs directory to publish at developmentseed.org/stac-auth-proxy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be a bit out of context. We could move it into the docs but frame it as helm/kubernetes setup and include this.

Copy link
Member

Choose a reason for hiding this comment

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

Aside from the repo, is there anywhere else that this information would be surfaced?

I'd ideally like for people to be able to think about this tool as a packaged product rather than just a codebase, hence my view that docs should be available outside of the repo

Copy link
Member

Choose a reason for hiding this comment

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

Aside from the repo, is there anywhere else that this information would be surfaced?

I'd ideally like for people to be able to think about this tool as a packaged product rather than just a codebase, hence my view that docs should be available outside of the repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to move it to the docs. Perhaps good to bring in #117 first? After that I can combine README and AUTHORIZATION into one file in the docs.

Copy link
Contributor Author

@pantierra pantierra Dec 18, 2025

Choose a reason for hiding this comment

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

I wasn't aware of the deployment.md, now that I found it, #117 is not a prerequisite anymore.

  • Moved the kubernetes information from docs/user-guides/deployment.md to docs/user-guides/kubernetes.md
  • Moved the content of AUTHORIZATION.md into the docs folder's kubernetes.md

helm/values.yaml Outdated
mode: "default"

# Custom endpoint configurations (only used when mode: "custom")
publicEndpoints: {}
Copy link
Member

Choose a reason for hiding this comment

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

Will this (and the privateEndpoints) override the defaults established within the stac auth proxy's configuration?

Copy link
Contributor Author

@pantierra pantierra Dec 16, 2025

Choose a reason for hiding this comment

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

These would just set an env variable with the contents specified here. So, to my understanding, yes, if these are set, they will override them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clarified a bit better in the comments.

@pantierra pantierra force-pushed the feature/helm-filter-configuration branch 5 times, most recently from cdf7bea to ad51501 Compare December 19, 2025 15:22
@pantierra pantierra marked this pull request as ready for review December 19, 2025 15:23
@pantierra pantierra requested a review from alukach December 19, 2025 15:23
Copy link
Member

@alukach alukach left a comment

Choose a reason for hiding this comment

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

Okay, let's give this a go. I am still a bit skeptical that this detailed config is superior to just raw environment variables but am going to assume that it's a K8s thing and go with that

@pantierra pantierra merged commit cfae34b into main Jan 13, 2026
4 checks passed
@pantierra pantierra deleted the feature/helm-filter-configuration branch January 13, 2026 09:42
This was referenced Jan 13, 2026
alukach pushed a commit that referenced this pull request Jan 14, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.11.1](v0.11.0...v0.11.1)
(2026-01-13)


### Features

* Add helm chart auth options.
([#118](#118))
([cfae34b](cfae34b))
* Add helm README.md and unit tests
([#117](#117))
([74a1bc8](74a1bc8))


### Bug Fixes

* Enhance type safety in middleware and utility functions
([#122](#122))
([52cdd0e](52cdd0e))
* Helm chart and app version mismatch.
([#120](#120))
([7998675](7998675))
* Make docker image to run as non-root.
([#116](#116))
([35e06f3](35e06f3))
* Skip CQL2 filter build for OPTIONS requests
([#123](#123))
([6ee043e](6ee043e)),
closes
[#110](#110)


### Documentation

* temporarily disable starlette docstrings
([c4fd9e0](c4fd9e0))


### Miscellaneous Chores

* release 0.11.1
([976dfab](976dfab))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: ds-release-bot[bot] <116609932+ds-release-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants