Skip to content

About

Plone PAS plugin authenticating iMio Keycloak ("Wallonie Connect") SSO users and assigning their roles. Extends pas.plugins.oidc.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

pas.plugins.kimug

A PAS plugin to set roles to imio keycloak users

Kimug is a acronym for "Keycloak IMio User & Group"

Documentation

Full documentation, with architecture and authentication-flow diagrams, is in docs/kimug.md.

Installation

Install pas.plugins.kimug:

Requires uv. This installs Plone 6.2.3 in .venv (use PLONE_VERSION=6.1.6 make install for another version):

make install

Create the Plone site:

make create-site

Test / dev environment

Init dev environment

You have to initialize a certificate with tests/mkcert.sh .

Start dev environment

make docker-start

This command will start a keycloak instance available at https://keycloak.127.0.0.1.nip.io

Tests dev accounts

Realm login e-mail password
master admin admin
imio kimug kimug_at_imio.be kimug
plone plone plone_at_imio.be plone
sso-apps imio-apps-plone_belleville-ac imio-apps_at_kimug.be Kimug123456***

Export keycloak realms

cd tests
docker compose exec keycloak /opt/keycloak/bin/kc.sh export --file /opt/keycloak/data/import/realm-imio.json --realm imio
docker compose exec keycloak /opt/keycloak/bin/kc.sh export --file /opt/keycloak/data/import/realm-plone.json --realm plone
docker compose exec keycloak /opt/keycloak/bin/kc.sh export --file /opt/keycloak/data/import/realm-sso-apps.json --realm sso-apps

Run test

Tests start Keycloak themselves through Docker (pytest-docker).

.venv/bin/pytest tests -s

or only one class

.venv/bin/pytest tests -s -k TestMigration

Through tox, as the CI does (make test-all runs every Plone / Python combination):

make test
uvx --with tox-uv tox -e py312-plone61

Lint

make check

Contribute

License

The project is licensed under GPLv2.

About

Plone PAS plugin authenticating iMio Keycloak ("Wallonie Connect") SSO users and assigning their roles. Extends pas.plugins.oidc.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages