Skip to main content

Provisioning

The feeder module brings data from external sources, such as a student information system or a human resources system, into the directory, and keeps it synchronized.

What it is used for​

UseDetail
SynchronizationMembers, classes and groups are kept up to date and consistent with the administrative data of the organization
Several sourcesData from heterogeneous systems is unified in one directory
Automatic updatesImports run at regular intervals, with no manual work
Events and notificationsChanges in the data, such as a new learner, can trigger events on the platform
Transformation and cleaningData is normalized and validated before it is loaded: date formats, required fields, common errors

How it works​

  1. Collect. The feeder reads data from the source through an API, files or a database.
  2. Transform. It applies the transformation rules that convert the data to the directory model.
  3. Load. The transformed data is written to the directory.
  4. Monitor. Each run is logged and reported, for follow-up and troubleshooting.

Sources​

SourceMode
File-based feed from an information systemPeriodic import of files dropped in the import directory
CSV filesImport started by an administrator
SCIM events from an identity management systemReal time
Manual creationAccounts created in the administration console

Each record keeps the name of its source.

Settings​

SettingDescriptionDefault
openent.feeder.import-filesDirectory the feeder imports files fromA subdirectory of /open-ent/data

Event-based provisioning with SCIM​

Besides file-based sources, the feeder can be fed continuously by an external identity management system, with open standards:

  • SCIM 2.0 (RFC 7643 and RFC 7644) describes identity resources: users, groups, organizations and role assignments;
  • Security Event Tokens (RFC 8417) carry signed events, such as created, changed or deleted, as JSON Web Tokens.

Flow​

The endpoint POST /directory/scim/events, with the content type application/secevent+jwt, is public, since it serves machine-to-machine traffic, and protected by signature verification (RS256, RS384 or RS512): it answers 202 when the event is accepted and 401 when the signature is invalid. In production, also restrict it at the reverse proxy, by IP allow list or mutual TLS.

Mapping​

SCIM resource or eventEffect in the directory
Organization (create)An organization
User (create)A member, with a login, an activation code and a profile
Group (create)A class when tw.type is "class", otherwise a functional group
RoleAssignment (user to organization, group to organization, user to group)Attachments to an organization, a class or a group
patch (replace or add)Update of attributes: display name, e-mail, activation
activate, deactivateAccount enabled or blocked
deleteDeletion, with cleanup of the related attachments
  • Provisioned data carries the source "SCIM", which isolates it from data that came from files or was created by hand.
  • Writes are idempotent: an upsert by identifier, so replaying an event creates no duplicate.
  • A provisioned member is a full account, with a login and an activation code. Once activated, it signs in like any other.

Implementation​

PartLocation
Translation from SCIM to the directoryorg.entcore.feeder.scim.ScimFeeder, attached to the entcore.feeder bus address with the action scim-event
Endpoint and signature verificationcontrollers.ScimController and scim.ScimJwtVerifier in the directory module
TestsScimFeederTest, with a Neo4j test container: creation, idempotence, deletion, activation and deactivation, patch, classes and attachments
ConfigurationThe address of the sender's key set, in the scim-jwks-url property of the directory module

Provisioning and authentication are two separate subjects. Single sign-on is configured on its own; see Security. The exact mapping of profiles and the end of life of accounts depend on the identity management system in use.