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 4 times, most recently from 33887cc to cdf7bea Compare December 18, 2025 15:40
@pantierra pantierra force-pushed the feature/helm-filter-configuration branch 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
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