-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add token authorization for STAC API #142
Comments
A few strategies to consider:
Middleware (at least in the FastAPI/Starlette parlance) is generally not the recommended path forward for FastAPI applications as it does not play well with the generated OpenAPI Spec (as far as I am aware) |
JWT Info for the Current Monty Instance Here's some relevant info about the JWT used in the current Monty setup.
Public Keys (From https://github.com/IFRCGo/go-api)
|
NOTE: This is likely not the best repository for the ticket, but since we don't have a dedicated repository for our
eaopi-k8s
setup currently, am creating the ticket here. We can move it if needed.We need to add an authorization layer for users to access the STAC API, similar to how the current Montandon API does. All requests to the STAC API should require a token, that we need some sort of middleware or so in the FastAPI application to validate.
@thenav56 - could you outline / point to code or a ticket that specifies exactly how the token handling works right now and exactly how the STAC API needs to authenticate the tokens? Right now it's just some JWT token validation, and the user can get the token from GO, correct? Not sure if you also have thoughts around changing that with your recent work on enabling GO to be an OAuth2 provider, but perhaps now we just implement the current token-based authentication.
@geohacker @sunu @emmanuelmathot - in terms of how we add this auth layer to the FastAPI backend, I think the steps would be:
monty-eoapi
deployment - we will need it for the custom authentication code, but also for other configuration, etc. @sunu - we should maybe create a separate ticket for this?stac-fastapi
, or is there a way to configure a custom authentication middleware, etc? Could you flesh out exactly how that would look like? cc @emmanuelmathot@geohacker @sunu @emmanuelmathot - let's figure out what we need to do to enable custom authentication in our
eoapi
setup - I know it's roughly straightforward, but let's just get that setup, and then @thenav56 can probably help with the details of the JWT auth scheme to use, etc. to perform the actual token validation.cc @subinasr
The text was updated successfully, but these errors were encountered: