cambridge-cares / TheWorldAvatar

A knowledge-graph-based digital twin of the world.
https://theworldavatar.io/
MIT License
84 stars 25 forks source link

Dev-op-serverside-authorisation #1298

Closed Ushcode closed 1 month ago

Ushcode commented 1 month ago

This PR would add server side authentication to any viz app - configurable via environment variables in node or docker.

The functionality allows specifying a list of pages that require a user to be logged in. It also allows specifying a second list, and a role which the user must have to access these extra protected pages.

The documentation should explain how to do this.

There is also config committed for a keycloak dev server for development purposes. In production, a client should get its own keycloak server, or there will be a dedicated TWA login to point to.