Skip to content

Allow ingress configuration to support running stac-fastapi behind stac-auth-proxyย #213

@batpad

Description

@batpad

Context

To handle authorization on the IFRC Montandon project, we want to use stac-auth-proxy. We would use the stac-auth-proxy helm chart to deploy stac-auth-proxy into the same namespace on a cluster as eoapi-k8s. Side-note: In the future, we could think of making this an optional dependency to eoapi-k8s, but for now, we can think of it as a separate install.

Stac-auth-proxy would have external facing ingress, that handles authenticating users, and if the user is authenticated / has permissions to access the requested resource, proxy the request to stac-fastapi. It would be important for stac-fastapi to NOT have external facing ingress, and stac-auth-proxy to proxy to stac-fastapi on the internal cluster network.

Implementation

I imagine the way to do this would be to disable external ingress on the stac-fastapi service in eoapi-k8s, and then pass in the internal service name to stac-auth-proxy to access stac-fastapi over the internal cluster network.

Currently, this would be a bit awkward to do because of the "looping" through services - i.e. it seems not possible to disable ingress for only stac-fastapi, but continue to have external facing ingress for other eoapi-k8s services.

This seems like it should be a lot easier once we split up configuration per-service as per #211

Next Steps

Since we do need this a bit urgently for the IFRC deploy, am wondering what the best next steps are. I think there are a couple options:

Me and @alukach have tested that stac-auth-proxy otherwise works well - I think this is potentially a straightforward way to handle user authentication, and with the stac-auth-proxy helm chart, can hopefully be a pretty easy addition to eoapi-k8s for those who want authentication but don't want to mess with custom middleware on the stac-fastapi application.

cc @pantierra @emmanuelmathot @sunu - would be great to get some thoughts here - am happy to help with #211 if that seems like the cleanest way forward, or if it seems like there's a good intermediary solution to disable ingress for stac-fastapi, can work on testing this integration a bit sooner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions