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
| Use | Detail |
|---|---|
| Synchronization | Members, classes and groups are kept up to date and consistent with the administrative data of the organization |
| Several sources | Data from heterogeneous systems is unified in one directory |
| Automatic updates | Imports run at regular intervals, with no manual work |
| Events and notifications | Changes in the data, such as a new learner, can trigger events on the platform |
| Transformation and cleaning | Data is normalized and validated before it is loaded: date formats, required fields, common errors |
How it works
- Collect. The feeder reads data from the source through an API, files or a database.
- Transform. It applies the transformation rules that convert the data to the directory model.
- Load. The transformed data is written to the directory.
- Monitor. Each run is logged and reported, for follow-up and troubleshooting.
Sources
| Source | Mode |
|---|---|
| File-based feed from an information system | Periodic import of files dropped in the import directory |
| CSV files | Import started by an administrator |
| SCIM events from an identity management system | Real time |
| Manual creation | Accounts created in the administration console |
Each record keeps the name of its source.
Settings
| Setting | Description | Default |
|---|---|---|
openent.feeder.import-files | Directory the feeder imports files from | A 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 event | Effect 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, deactivate | Account enabled or blocked |
delete | Deletion, 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
| Part | Location |
|---|---|
| Translation from SCIM to the directory | org.entcore.feeder.scim.ScimFeeder, attached to the entcore.feeder bus address with the action scim-event |
| Endpoint and signature verification | controllers.ScimController and scim.ScimJwtVerifier in the directory module |
| Tests | ScimFeederTest, with a Neo4j test container: creation, idempotence, deletion, activation and deactivation, patch, classes and attachments |
| Configuration | The 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.