-
Notifications
You must be signed in to change notification settings - Fork 12
Description
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:
- Add some
ifcondition in the current services loop mechanism, to allow disablingingressfor individual services. This is likely a bit hacky. - Finish up Helm Chart Refactoring Proposal: Improving Readability and Maintainabilityย #211 and then be able to configure disabling ingress for just
stac-fastapiin a cleaner manner.
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.