-
Notifications
You must be signed in to change notification settings - Fork 1
Description
There's probably a better place for this ticket, but dropping here for now, as a follow-up to #98 -
We now have stac-auth-proxy setup, using GO as the OIDC provider, configured here: https://github.com/IFRCGo/go-deploy/blob/develop/applications/argocd/production/applications/montandon-eoapi.yaml#L113
Currently, stac-auth-proxy functions as a network proxy, validates the token, and if a person has a token, grants access, and if not, returns Unauthorized - i.e. a user either has access or not.
Now, for various use-cases, we need to have an idea of "Private" collections - i.e. some collections that are accessible (read) to a subset of users. We have full control over adding metadata to the STAC collections, as well as what goes into the JWT token, so we need to figure out the best way to:
- Add metadata to the STAC collections to indicate that they are "private", and have a way to associate users with these collections.
- Add metadata to the JWT token generated by GO, which indicates which collections a user has access to - this could be as simple as an array of collection IDs, but we can figure out the schema based on a better understanding of the use-case and implementation.
- Implement collection filters in
stac-auth-proxythat filter available collections for a user based on metadata in the JWT token for the user.
In terms of implementation, I think there probably a few different possible approaches on how we configure the custom filtering in stac-auth-proxy - whether this can some-how be added as configuration, or we need to create a custom run-time for stac-auth-proxy including the filters OR a custom run-time for stac-fastapi, including stac-auth-proxy as Middleware and not as a network proxy. There's probably things that I'm missing, so will be good to discuss and figure out how best to approach this.