Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Need help with implementing "personalized" stac catalogues... #253

Closed
@parabelboi

Description

@parabelboi

Hi @ALL,

I need some (high-level) advise on how to implement "personalized" stac catalogues with stac-fastapi-pgstac:

Requirement:
Each user has it's own isolated catalog (with enabled transactions extension).
The user should be extracted from a jwt token, that is provided by some authentication server (keycloak).

As the number of users is limited (i.e. less than 100), I'd say that each user could have it's own database.
One could setup one stac-fastapi-pgstac container per user and have an authentication proxy that dispatches to the per-user instances.
But that would multiply the database overhead per user (stored procedures, db-migration efforts etc).
And it would only work for a static set of users.

I assume the "correct" solution would be to extend the BasicCrudClient and implement it to "just" dispatch everything to dynamically instantiated (per-user) StacApi instances. This would at least allow to initialize the DB whenever a user is logging in for the first time.

Since I am new to python/fastapi/stac, I need some advice on how to solve this...

Many thanks,
parabelboi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions