Skip to content

Conversation

@pantierra
Copy link
Contributor

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.

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.

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 2 times, most recently from adab675 to e9a6cea Compare December 16, 2025 19:21
@pantierra pantierra force-pushed the feature/helm-filter-configuration branch from e9a6cea to d37cee3 Compare December 16, 2025 19:22
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