Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/openfoodfacts/openfoodfacts-auth

Building an SSO platform for @openfoodfacts with @keycloak
https://github.com/openfoodfacts/openfoodfacts-auth

openfoodfacts sso

Last synced: 3 days ago
JSON representation

Building an SSO platform for @openfoodfacts with @keycloak

Awesome Lists containing this project

README

        

# Open Food Facts Auth

This Project provides authentication services for Open Food Facts using Keycloak, backed by a PostgreSQL database.

# Running Keycloak standalne

First, run `make build` to create the realm.json file with variables substituted. It seems that the standalone import for keycloak does not interpolate variables https://github.com/keycloak/keycloak/issues/12069

Then use `docker compose up -d --build` to build and run the container.

To see how a user logs in you can navigate to: http://auth.openfoodfacts.localhost:5600/realms/open-products-facts/account/#/

# Tests

We use Playwright to test the Keycloak user interface and styling. We recommend using the "Playwright Test for VSCode" plugin.

# Applying Keycloak Updates

The Keycloak version to be used is specified in the .env file. However, in addition to updating this there are a number of other steps that need to be completed:

## Refresh Themes

We keep a copy of the Keycloak themes in Git so that we can see what has changed between versions. Run `make refresh_themes` to refresh this copy (stored in the `theme` folder).

## Refresh Overridden Templates

We have overridden a small number of standard Keycloak templates where needed. Make sure you refresh these templates from the original Keycloak ones if they have changed and re-apply our overrides if they are still needed. All templates containing overrides will contain a comment like:

```