Skip to main content

keycloak plugin for Tutor

Local Keycloak IdP for developing Open edX SAML SSO without a real IdP. Development only: adds a keycloak service to tutor dev, never to tutor local.

What you get

  • Keycloak container, auto-imported realm (default openedx) with a SAML client for the LMS.

  • SAML attributes released: firstName, lastName, email, username, attr_user_permanent_id (attr_user_permanent_id is the Keycloak user ID, so self-registered users work too).

  • Test user (default testuser / tutor config printvalue KEYCLOAK_TEST_PASSWORD).

  • keycloak-setup do-command (dev only) creating the SAML SP config + keycloak IdP provider (attribute mapping included) and pulling IdP metadata.

Installation

pip install tutor-contrib-keycloak

Usage

tutor plugins enable keycloak
tutor config save
tutor dev launch
tutor dev do keycloak-setup   # SAML provider in the LMS; needs Keycloak up

Then:

*.local.openedx.io resolves to 127.0.0.1; the compose network alias makes the same hostname work from inside the LMS container (needed to fetch IdP metadata).

Settings (tutor config save --set KEYCLOAK_X=...)

KEYCLOAK_DOCKER_IMAGE

quay.io/keycloak/keycloak:26.4

KEYCLOAK_HOST / KEYCLOAK_PORT

auth.{{ LMS_HOST }} / 8080

KEYCLOAK_REALM

openedx

KEYCLOAK_SP_ENTITY_ID

openedx

KEYCLOAK_REGISTRATION_ALLOWED

true

KEYCLOAK_ADMIN_USER / _PASSWORD

admin / generated

KEYCLOAK_TEST_USER / _PASSWORD

testuser / tutor config printvalue KEYCLOAK_TEST_PASSWORD

KEYCLOAK_USERNAME_ATTR

username

KEYCLOAK_PERMANENT_ID_ATTR

attr_user_permanent_id

Notes

  • KEYCLOAK_REGISTRATION_ALLOWED shows a “Register” link on the Keycloak login page.

  • Permanent ID: the LMS links an IdP identity to an account by this value. If the IdP sends no such attribute the login fails (Invalid value for parameter attr_user_permanent_id). Set KEYCLOAK_PERMANENT_ID_ATTR to an empty string to let the LMS fall back to the uid OID attribute, then the SAML NameID (this client uses NameID format username, so a renamed user would look like a new person; persistent is safer). Re-run tutor dev do keycloak-setup after changing it.

License

This software is licensed under the terms of the AGPLv3.

Metadata

Release files for tutor-contrib-keycloak 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tutor-contrib-keycloak 1.0.0
File Size Uploaded
tutor_contrib_keycloak-1.0.0.tar.gz 19.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tutor-contrib-keycloak 1.0.0
File Interpreter ABI Platform
tutor_contrib_keycloak-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.7 kB

Release files / tutor_contrib_keycloak-1.0.0.tar.gz

Download URL tutor_contrib_keycloak-1.0.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6f855585aaca281bac3e506461b576507592b8ae1791efcf58be3472060840ba
BLAKE2b-256 checksum
How to use checksums
3e3bbc6821053dc94f86171da1dcd35c554232bfde90604530f90aaea9181639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / tutor_contrib_keycloak-1.0.0-py3-none-any.whl

Download URL tutor_contrib_keycloak-1.0.0-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aac35145f939eb9ed988ffdc8207e1ba04c6a11d1d9ee8b06ee67502dc5adc17
BLAKE2b-256 checksum
How to use checksums
885a55e2437d5e3352a7707a815e5038114bf0dae92f6be9ab289224f4573562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page