developmentseed / eoAPI

[Active Development] Earth Observation API (Metadata, Raster and Vector services)
https://eoapi.dev
MIT License
191 stars 20 forks source link

Demo: Keycloak RBAC #183

Open alukach opened 3 months ago

alukach commented 3 months ago

What I am changing

This PR provides an example of implementing RBAC via KeyCloak.

How I did it

...

How you can test it

The intention is for the demo to run in a complete state with the following command:

COMPOSE_FILE=docker-compose.custom.yml COMPOSE_PROFILES=gunicorn,keycloak docker compose up
  1. Access http://localhost:8081/docs and login with alice:alice. You should be able to edit collections/items.
  2. Log Alice out at http://localhost:8080/admin/master/console/#/eoapi/clients/bd7dbeb9-7d8d-4177-87f4-2f8360bcdbdb/sessions (Keycloak credentials: admin:admin)
  3. Access http://localhost:8081/docs and login with bob:bob. You should not be able to edit collections/items.