Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/openfoodfacts/openfoodfacts-auth
- Owner: openfoodfacts
- License: apache-2.0
- Created: 2024-03-04T20:18:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T10:55:30.000Z (17 days ago)
- Last Synced: 2024-10-29T11:39:20.765Z (17 days ago)
- Topics: openfoodfacts, sso
- Language: FreeMarker
- Homepage: https://auth.openfoodfacts.org
- Size: 17.1 MB
- Stars: 0
- Watchers: 22
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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:
```