Commit Graph

87 Commits

Author SHA1 Message Date
Valentin Tolmer 2c54ad895d chore: clippy 2023-12-15 23:37:25 +01:00
Valentin Tolmer 272c84c574 server: make attributes names, group names and emails case insensitive
In addition, group names and emails keep their casing
2023-12-15 23:21:22 +01:00
Valentin Tolmer 829c3f2bb1 server: Prevent regular users from modifying non-editable attributes 2023-11-05 16:06:45 +01:00
Valentin Tolmer c6ecf8d58a server: Add graphql support for setting attributes 2023-10-22 16:34:15 +02:00
Valentin Tolmer 439fde434b server: Add graphql support for creating/deleting attributes 2023-10-04 02:07:04 +02:00
Valentin Tolmer 2a5fd01439 server: add support for creating a group with attributes 2023-09-29 02:31:20 +02:00
Valentin Tolmer 2c398d0e8e server: Add domain support for creating/deleting attributes 2023-09-29 02:31:20 +02:00
Valentin Tolmer 93e9985a81 server: rename SchemaBackendHandler -> ReadSchemaBackendHandler 2023-09-29 02:31:20 +02:00
Valentin Tolmer 3fadfb1944 server: add support for creating a user with attributes 2023-09-25 01:57:24 +02:00
Valentin Tolmer 81204dcee5 server: add support for updating user attributes 2023-09-25 01:57:24 +02:00
Valentin Tolmer 39a75b2c35 server: read custom attributes from LDAP 2023-09-15 15:26:18 +02:00
Valentin Tolmer 034794d58d server: return user-defined attributes for groups in graphql
Part of #67
2023-09-14 13:02:45 +02:00
Valentin Tolmer b54bf3c4d5 server: clean up database-mapped types 2023-09-11 17:09:49 +02:00
Valentin Tolmer 582abba793 server: clean up user query
With the new find_with_linked from sea_orm
2023-09-11 17:09:49 +02:00
Valentin Tolmer 94da42ffb9 server: small cleanup 2023-09-11 17:09:49 +02:00
Valentin Tolmer 08d3aef177 server: Update sea-orm, strum 2023-09-11 17:09:49 +02:00
Valentin Tolmer 134796aa9f server: Switch tests to pretty_assertions 2023-09-10 22:29:32 +02:00
Valentin Tolmer 1598f096e9 server: Upgrade ldap3_proto 2023-09-10 22:29:32 +02:00
Valentin Tolmer 99ed6eface server: Update tracing-forest and take advantage of the span fields 2023-09-10 22:29:32 +02:00
Valentin Tolmer d9f4adcb0e ldap: Add support for modifying the password with a modify operation 2023-07-29 12:39:23 +02:00
Valentin Tolmer e5bc06a617 graphql: sort the groups before returning them 2023-07-29 11:27:50 +02:00
Valentin Tolmer 31a8ba24a0 server,graphql: Add a GraphQL method to get the schema 2023-07-10 17:18:33 +02:00
Valentin Tolmer 9e1b58d033 server,ldap: add encoding for lists and integers 2023-07-10 17:18:33 +02:00
Valentin Tolmer 3140af63de server: Use schema to populate attributes 2023-06-29 11:11:20 +02:00
Valentin Tolmer 829ebf59f7 server: Add SchemaBackendHandler trait 2023-06-29 11:11:20 +02:00
Valentin Tolmer 70146e0b70 server: prepare DB schema for user attributes
First step of #67.
2023-06-14 23:20:37 +02:00
Valentin Tolmer d1d5d38b32 server: fix incorrect logging 2023-04-14 17:02:00 +02:00
Valentin Tolmer e5ce98c874 server: Improve the error message in case of duplicate emails 2023-04-14 17:02:00 +02:00
Valentin Tolmer 4e85a4718f server: enforce email and uuid unicity 2023-04-13 17:51:49 +02:00
Valentin Tolmer a07f7ac389 server: ensure first/last name nullable, make avatar long blob in DB
Fixes #474, #486.
2023-03-20 23:42:47 +01:00
Valentin Tolmer 46b8f2a8a5 server: return groups in memberof by cn instead of uid
Fixes #468.
2023-03-20 22:10:38 +01:00
Valentin Tolmer 28607c4744 server: update various dependencies 2023-03-02 10:51:38 +01:00
Valentin Tolmer c9997d4c17 server: statically enforce access control 2023-03-01 11:28:04 +01:00
Valentin Tolmer 1ce239103c server: removed dbg 2023-02-13 16:14:52 +01:00
Valentin Tolmer 81036943c2 server: Add support for SubString ldap filter 2023-02-13 16:10:14 +01:00
Valentin Tolmer 21e51c3d38 server: Add support for LdapCompare op 2023-02-13 12:59:53 +01:00
Valentin Tolmer d04305433f server: use the new into_tuple from sea_orm 2023-02-10 12:57:38 +01:00
Valentin Tolmer 63cbf30dd7 server: upgrade sea-orm to 0.11 2023-02-10 12:57:38 +01:00
Valentin Tolmer 96eb17a963 server: fix clippy warning
The clippy::uninlined_format_args warning in 1.67 was downgraded to
pedantic in 1.67.1 due to lack of support in rust-analyzer, so we're not
updating that one yet.
2023-02-10 12:03:23 +01:00
Valentin Tolmer 8f2c5b397c server: allow NULL for display_name
Fixes #387.
2023-02-10 11:19:22 +01:00
Valentin Tolmer 9018e6fa34 server, refactor: Add a conversion from bool for the filters 2023-01-17 15:09:06 +01:00
Luca Tagliavini 807fd10d13 server: Add support for DN filters 2023-01-17 14:21:57 +01:00
Valentin Tolmer 955a559c21 clippy: fix warning 2023-01-13 15:50:03 +01:00
Valentin Tolmer e458aca3e3 db: Change the DB storage type to NaiveDateTime
The entire internals of the server now work using only NaiveDateTime,
since we know they are all UTC. At the fringes (LDAP, GraphQL, JWT
tokens) we convert back into UTC to make sure we have a clear API.

This allows us to be compatible with Postgres (which doesn't support
DateTime<UTC>, only NaiveDateTime).

This change is backwards compatible since in SQlite with
Sea-query/Sea-ORM, the UTC datetimes are stored without a timezone, as
simple strings. It's the same format as NaiveDateTime.

Fixes #87.
2023-01-13 15:50:03 +01:00
Valentin Tolmer 692bbb00f1 db: Change the version number from u8 to i16
This is the smallest integer compatible with all of MySQL, Postgres and
SQlite.

This is a backwards-compatible change for SQlite since both are
represented as "integer", and all u8 values can be represented as i16.
2023-01-13 15:50:03 +01:00
Valentin Tolmer 665e525f0a server: fix user password setting
It used to try to set all user IDs to the same, which would fail if
there is more than 1 user.
2022-11-30 08:38:21 +01:00
Valentin Tolmer 09a0522e2d server: move domain types to a separate file 2022-11-25 15:35:48 +01:00
Valentin Tolmer e89b1538af server,app: migrate to sea-orm 2022-11-25 15:35:48 +01:00
Valentin Tolmer 234cb70b97 server: fix handling of present filters
If the filter name was not in the list of attributes to return, it
wouldn't be counted as a valid attribute, meaning that the aliases of
attributes were not recognized.

Fixes #351
2022-10-26 09:29:02 +02:00
Valentin Tolmer 27144ee37e server: Add support for creating a user through LDAP 2022-10-20 10:09:17 +02:00