1
0
mirror of https://github.com/etesync/server synced 2024-11-19 07:18:08 +00:00
Commit Graph

576 Commits

Author SHA1 Message Date
Tom Hacohen
2deb59e932 Bump version and update changelog. 2024-06-09 11:21:24 -04:00
Tom Hacohen
c9b8f43845 Set default auto field to appease django warning. 2024-06-09 11:15:41 -04:00
Tom Hacohen
f1c072bd0a Fix issue with how we render binary 422 errors
json_encoder assumes it's not binary, but our error messages may include
some binary stuff.
2024-06-08 22:54:02 -04:00
Tom Hacohen
043dc972ae Bump version and update changelog. 2024-06-08 21:52:36 -04:00
Tom Hacohen
8f588af665
Merge PR #184: Upgrade FastAPI and Pydantic to most recent versions 2024-06-08 20:50:42 -04:00
Tom Hacohen
d7075c0169 Mark optional field as optional. 2024-06-08 20:49:13 -04:00
Tom Hacohen
a27ce2f4d0 Also handle 422 as msgpack. 2024-06-08 20:41:01 -04:00
Tom Hacohen
138d99dd7f Update code to adjust to most recent python/fastapi. 2024-06-08 20:27:33 -04:00
Tom Hacohen
0be14a7b0e Fixes for fastapi. 2024-06-08 20:17:02 -04:00
Tom Hacohen
57e676baa1 Adjust to fastapi changes. 2024-06-08 19:52:10 -04:00
Tom Hacohen
b9f2cea951 more 2024-06-08 19:29:56 -04:00
Tom Hacohen
0d9c9f153d Type fix. 2024-06-08 19:29:56 -04:00
Tom Hacohen
49eeeefef5 Make fastapi 0.104 and pydantic 2.0 min requirements 2024-06-08 19:29:56 -04:00
Tom Hacohen
fb9cc701d0 Adjust pydantic code to v2. 2024-06-08 18:10:34 -04:00
Tom Hacohen
0cdab19308 Fix rust complaints. 2024-06-08 18:04:59 -04:00
Tom Hacohen
79d28586c5 Run ruff format. 2024-06-08 17:51:44 -04:00
Tom Hacohen
df0d1596e2 Upgrade dev deps and add ruff. 2024-06-08 17:49:40 -04:00
Tom Hacohen
dae6f17355 Upgrade dependencies. 2024-06-08 17:45:45 -04:00
Tom Hacohen
45d2696e21 Bump version and update changelog. 2024-06-04 08:20:11 -04:00
Tom Hacohen
e6750d7a78
Merge pull request #182 from pyrox0/master
Fix django version specifier
2024-06-03 14:15:37 -04:00
Pyrox
b3e09e77bf
Fix django version specifier
This errors out when building. I've patched this in Nixpkgs, but an
upstream patch is much better for others.
2024-06-03 14:03:31 -04:00
Tom Hacohen
6aa1e299ec Bump version and update changelog. 2024-06-02 21:39:03 -04:00
Tom Hacohen
da613b4700 Bump django to version 4 LTS
Apparently version 3 is EOL.

Fixes #173
2024-06-02 21:37:29 -04:00
Tom Hacohen
d9be3437f5 Bump version and update changelog. 2024-06-02 21:18:26 -04:00
Tom Hacohen
62152ce52b
Merge pull request #147 from Xiretza/settings-env-override
fix(settings): ensure environment variables always override config
2024-06-02 21:13:14 -04:00
Tommi Mäklin
6b66ec16d5 Update pyyaml from 6.0 to 6.0.1. 2023-10-20 09:22:45 -04:00
Tom Hacohen
a54afd5210 Optimize stoken-using functions to only account for current revisions.
No need to account for revisions that are not current when calculating stokens
because those, by definition, are not the latest ones, and therefore won't have
the most recent stokens.

This becomes a problem when collections have many associated revisions.
2023-08-15 20:21:23 -04:00
Alejandro
4293acb3a3 fix: Python files 2023-07-24 22:06:22 -04:00
LuPa
55d3fb7e8e Update README.md
Add static files creation
2023-02-17 07:23:19 -08:00
Tom Hacohen
9aaea7b6a7
README: add Kanaye to contributors. 2022-12-12 01:33:41 +02:00
Tom Hacohen
0bd40807ba Bump version and update changelog. 2022-12-09 09:03:08 -05:00
Tom Hacohen
d843d580eb
Merge pull request #159 from victor-rds/py3.11
Update dependencies for Python 3.11
2022-12-07 16:43:41 -05:00
Victor R. Santos
a48f37c0c9
Update testserver base image
Use Python 3.11.0-alpine image to test the up-to-date dependencies.
2022-12-07 15:49:15 -03:00
Victor R. Santos
f9645917d7
Update dependencies for Python 3.11
Fix `httptools` and `uvloop` failing to build using on Python 3.11
Updated all other dependencies.
2022-12-07 15:30:27 -03:00
Tom Hacohen
4bf81f49ad Bump version and update changelog. 2022-10-04 12:31:38 -04:00
Tom Hacohen
c61dd86a8c
Merge: Replace aioredis with redis-py (#151) 2022-09-04 13:59:50 -04:00
Tom Hacohen
8c6d04e8d3 Replace aioredis with redis-py
aioredis has been merged into redis-py and will no longer be maintained
as a separate project.
2022-09-04 19:57:27 +02:00
Xiretza
c4475535ea fix(settings): ensure environment variables always override config
DJANGO_STATIC_ROOT is required in order to run `collectstatic` in
a packaging environment - manually specifying it as an environment
variable should always override any config files that may exist.
2022-07-21 12:37:43 +02:00
Tom Hacohen
2f1f95fea9 Optimize how we fetch the latest (current) revision
The way were were doing it was implicitly sorting the query items and it
was causing millions of items to be sorted (even though the result should
only have one) making it slow.

By switching away from `get()` and `first()` we are telling django to
not try to sort.
2022-06-19 22:25:49 +03:00
Tom Hacohen
5f455e55b5 Bump version and update changelog. 2022-06-13 14:02:48 +03:00
Tom Hacohen
709a607d47 Update Django dependency. 2022-06-13 14:01:15 +03:00
Tom Hacohen
0563c6880a Bump version and update changelog. 2022-06-13 13:59:06 +03:00
Xiretza
cb790734e5 feat(config): add LDAP example 2022-06-13 13:54:46 +03:00
PapaTutuWawa
fac36aae11
Implement checking the username against LDAP (#64)
This commit adds code to allow users that prefer to do user management
via LDAP to do so. Since Etebase does not store the password (proof) in
a LDAP compatible fashion, we compromise and instead two checks: One while
registering an account to see if the username is the LDAP directory and
one whenever the API is accessed. To prevent too many LDAP requests, the
result of the request is cached for an configurable amount of hours.

Make sure you have python-ldap installed and can successfully import
ldap. Then, if you use the easy config, add the following to your
config:

```
; [...]
; Regular etesync configuration

[ldap]
bind_dn = <Your LDAP "user" to bind as. See Note 1>
bind_pw = <The password to authenticate as your bind user>
; Or if you have the password in a file:
; bind_pw_file = /path/to/the/file.txt
server = <The URL to your LDAP server>
search_base = <Your search base>
filter = <Your LDAP filter query. See Note 2>
; In case a cache TTL of 1 hour is too short for you, set `cache_ttl` to
the preferred
; amount of hours a cache entry should be viewed as valid:
; cache_ttl = 5
```

With this config, I am able to make the EteSync server check with my
LDAP server if a user should be able to login or register.
Note that if a user is allowed to login or register, the password of the
LDAP user will be ignored. This LDAP patch is nothing more than an
additional check before the actual authentication.

A successful LDAP check will be cached, if not configured (correctly),
for one hour, after which the LDAP query will be performed again.

Note 1: This commit only works with a bind user
Note 2: The query must be specified. If an LDAP query returns more than
one or no result, then the authentication fails. If your query needs to
include the username that currently tries to perform a login or
registration, you can use %%s, which will be subsituted for the used
username.
2022-06-13 13:29:43 +03:00
Tom Hacohen
3a4da142dc Fix import of sendfile backend due to python package changes.
Broke in c7d1de31a1.
2022-06-04 18:05:13 +03:00
Xiretza
79cef79c52
fix(testserver): store database in /data partition (#142)
This allows testing version migrations by simply mounting the volume into
a container with a different image.
2022-05-27 14:49:07 +03:00
Tom Hacohen
c7d1de31a1
Merge: Create python package #140
This is quite a big one, so it probably makes sense to review it commit-by-commit (there shouldn't be any overlap).

Summarized:
- The `etebase_fastapi` module was moved to `etebase_server.fastapi`
- The `myauth` module was moved to `etebase_server.myauth`
- The `django_etebase` module was moved to `etebase_server.django`
- The `templates/` directory was moved into `etebase_server/`
- A `setup.py` was added to allow packaging the `etebase_server` module as a python package.
2022-05-16 22:02:02 +03:00
Xiretza
aac27e6a43 feat: create python package 2022-05-09 17:41:16 +02:00
Xiretza
791de952f4 fix: move template directory into source directory
This is in preparation for creating a python package.
2022-05-09 17:41:16 +02:00
Xiretza
ada5181a7e fix: move django_etebase module from toplevel to under etebase_server
This is in preparation for creating a python package, which should only
occupy the "etebase_server" name in the global module namespace.
2022-05-09 17:41:16 +02:00