Changelog#

[0.1.0] - Unreleased#

Added#

  • ResourceMapping, which stores the resources of a SCIM model in the records of a SQLAlchemy model, with Attribute, Many and Link. A Link links to one resource, such as a manager, or to several, such as members. A list of Links links to several resource types, such as the users and the groups of a group. A Link can give its entries a type. A Many with a column stores a list of values, such as a list of strings.

  • SqlAlchemyStorage and AsyncSqlAlchemyStorage, which serve the mappings to scim2-server. They filter, sort and page the resources in the database, on one resource type or at the root of the server. They page with startIndex, or with the cursors of RFC 9865, which give stable pages. The asynchronous storage needs the asyncio extra.

  • ResourceMapping.schemas, which publishes the attributes a mapping stores.

  • generate_mappings(), which generates the tables and the mappings of the resource types of a provider. A function of the application decides whether each attribute is stored, and with which column type.

  • Hashed, a column type storing the hash of a value, such as a password.

  • Filters, sorts and uniqueness checks compare strings with the comparison key of the policy of the provider: exactly on SQLite, and approximately on PostgreSQL.

  • A column of type Enum holds the string it stores: the name of the member, or its value with values_callable. Filters and sorts compare this string, also on the native enumerations of PostgreSQL. A string outside the enumeration is refused with invalidValue.

  • A search or a read does not load the collections that attributes and excludedAttributes remove from the response, such as the members of the groups.