Houkime
4498003aca
refactor(tokens-repository): dissect use_mnemonic_new_device_key()
2022-12-16 13:03:27 +00:00
Houkime
772c0dfc64
refactor(tokens-repository): move use_mnemonic_recovery_key() to abstract class
2022-12-16 13:03:27 +00:00
Houkime
671203e990
refactor(tokens-repository): dissect use_mnemonic_recovery_key()
2022-12-16 13:03:26 +00:00
Houkime
9a49067e53
refactor(tokens-repo): move token refreshing to parent class
2022-12-16 13:03:12 +00:00
Houkime
682cd4ae87
refactor(tokens-repo): move create_token to abstract class
2022-12-16 13:02:55 +00:00
Houkime
572ec75c39
refactor(tokens-repo): rewrite token refresh
...
now it is not json-dependent.
2022-12-16 13:02:43 +00:00
Houkime
27a7c24bc3
refactor(tokens-repo): separate token storing
2022-12-16 13:02:21 +00:00
Houkime
4e60d1d37a
refactor(tokens-repo): move token getters to abstract class
...
Not performance-optimal, but not in critical path either.
100 tokens max irl?
2022-12-16 13:02:05 +00:00
Houkime
ff264ec808
refactor(tokens-repo): simplify getting tokens
...
get_token_by_token_string and get_token_by_name are no longer tied to
json.
2022-12-16 13:01:28 +00:00
def
16e0bd56ce
refactor(repository): Tokens repository JSON backend ( #18 )
...
Co-authored-by: def <dettlaff@riseup.net>
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/18
Co-authored-by: def <dettlaff@riseup.net>
Co-committed-by: def <dettlaff@riseup.net>
2022-12-02 14:19:57 +03:00
Houkime
063dfafc19
Jobs: fix return value of remove_by_uid
...
And add a test for said return value.
2022-11-30 17:06:43 +00:00
Houkime
5c86706f4b
Jobs: fix value access in is_busy()
...
Also added a test for is_busy() that highlighted this bug.
2022-11-30 16:41:20 +00:00
Houkime
14c4ae26ab
explicitly mark helper functions private
...
I thought about making them private class members, but that would get
unreadable and do more harm than good.
2022-11-30 16:22:46 +00:00
Houkime
106a083ca2
jobs: simplify reset
...
Also ups test coverage
2022-11-30 14:47:56 +00:00
Inex Code
57794c9535
style(graphql): Add missing comma
...
\
2022-11-28 15:49:48 +03:00
Houkime
2e9cdf15ab
Autostart a redis instance in nix shell.
...
As a part of test environment, an unprivileged redis server is started on localhost:6379.
Redis connection pool detects when it is run in a development nix shell
and uses this port instead of a production unix socket. This way, redis
tests pass even on computers without redis installed.
2022-11-28 14:38:21 +02:00
Houkime
d6ef01c0c7
Add TTL to storage of finished or failed jobs
...
Defaulting to 10 days.
2022-11-23 16:29:50 +00:00
Houkime
244851c7cc
jobs: remove 'jobs' list, and use 'jobs:' prefix
...
Less complexity, easier to add redis-native TTL
2022-11-23 15:04:39 +00:00
Houkime
5afa2338ca
Migrate Jobs to redis
...
Jobs API shall now use redis to store and retrieve jobs. This will make
it possible to add pubsub for jobs updates. For now it uses blocking api
of redis.
2022-11-23 14:43:06 +00:00
Houkime
f7b7e5a0be
migrate Jobs to redis
2022-11-16 13:54:54 +00:00
Houkime
41e5f89b7b
migrate backblaze settings to new json format
...
And adjust methods and tests
2022-11-02 13:52:33 +00:00
Houkime
a723311b36
reroute system provider query
2022-11-02 13:52:33 +00:00
Houkime
dd15e0ab65
reroute dns provider query
2022-11-02 13:52:33 +00:00
Houkime
9540e26ce1
add digitalocean and backblaze options
2022-11-02 13:52:33 +00:00
Houkime
7d58eb3d92
fix wrong cloudflare field key
2022-11-02 13:52:33 +00:00
Houkime
decb98afe2
add providers.py to the list of migrations
...
Makes providers.py actually run.
2022-11-02 13:52:33 +00:00
Houkime
b0c26b876a
add providers migration
2022-11-02 13:52:33 +00:00
inexcode
19a4ec5377
feat: Add redis pool singleton
2022-10-28 11:24:45 +03:00
inexcode
8cdacb73dd
refactor: Use singleton metaclass for all singleton classes
2022-10-27 18:31:52 +03:00
Inex Code
0a09a338b8
Register migration
2022-09-22 19:41:48 +03:00
Inex Code
7a1e8af8fe
Catch error during binds migration and delete the job if it is stuck during restart
2022-09-22 19:38:59 +03:00
Inex Code
e387e30983
Fix handling of FileNotFoundError during size calculation
2022-09-22 18:34:33 +03:00
Inex Code
582e38452d
Fix Gitea moving
2022-09-19 03:50:43 +03:00
Inex Code
6bbceca917
Fix ownership issue
2022-09-19 03:04:57 +03:00
Inex Code
9a339729b7
Fix Generic service mover success output
2022-09-19 02:57:22 +03:00
Inex Code
a7208c1a91
Fix generic service mover being unable to move
2022-09-19 02:43:06 +03:00
Inex Code
49571b6ef2
Fix generic service mover being unable to move to sda1
2022-09-19 02:32:29 +03:00
Inex Code
9489180363
Fix job deletion
2022-09-09 17:51:41 +03:00
Inex Code
97acae189f
Bump API version
2022-09-09 17:46:58 +03:00
Inex Code
d7cba49c4a
Fix job uid generation
2022-09-09 17:42:40 +03:00
inexcode
32278e9063
Bind to 127.0.0.1 instead of 0.0.0.0
2022-08-26 21:01:14 +04:00
inexcode
4f2332f8a0
Add permission check for deleting job
2022-08-25 22:42:37 +04:00
Inex Code
7935de0fe1
Migrate to FastAPI ( #13 )
...
Co-authored-by: inexcode <inex.code@selfprivacy.org>
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/13
2022-08-25 20:03:56 +03:00
def
206589d5ad
add system nixos tasks
2022-08-01 21:32:20 +02:00
def
337cf29884
Add GraphQJ user and ssh management ( #12 )
...
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/12
Co-authored-by: def <dettlaff@riseup.net>
Co-committed-by: def <dettlaff@riseup.net>
2022-08-01 13:40:40 +03:00
Inex Code
bec99f29ec
Add a jobs singleton
2022-07-30 18:24:21 +03:00
Inex Code
8ea6548710
Fix typing
2022-07-30 18:01:51 +03:00
Inex Code
67c8486c9b
Add more fields to GraphQL storage query
2022-07-30 17:48:33 +03:00
inexcode
1f64a76723
Fix typo
2022-07-26 15:52:28 +03:00
inexcode
e3245cd26a
Add mount volume migration
2022-07-26 15:33:44 +03:00
inexcode
a6fe72608f
Bytes from int to str
2022-07-25 17:17:57 +03:00
inexcode
5532114668
Add volume management
2022-07-25 17:08:31 +03:00
Inex Code
26f9393d95
Implement change system settings
...
Co-authored-by: Detlaff <dettlaff@riseup.net>
2022-07-12 16:24:29 +03:00
Inex Code
e3354c73ef
Change datetime formats, more tests
2022-07-08 18:28:08 +03:00
def
9bd2896db8
fix recovery tests
2022-07-07 15:53:19 +02:00
Inex Code
5711cf66b0
Api fixes
2022-07-05 15:11:41 +03:00
Inex Code
376bf1ef77
Add more tests
2022-07-05 08:14:37 +03:00
Inex Code
503a39f390
API keys graphql tests
2022-06-29 20:39:46 +03:00
Inex Code
45c3e3003d
hhh
2022-06-24 21:18:21 +03:00
Inex Code
80e5550f7d
add basic system getters
2022-06-24 21:14:20 +03:00
Inex Code
c6a3588e33
add CORS
2022-06-24 20:25:49 +03:00
Inex Code
07e723dec8
more precise permission control
2022-06-24 20:12:32 +03:00
Inex Code
517a769e5b
add auth check
2022-06-24 20:08:58 +03:00
Inex Code
e2ac429975
parser
2022-06-24 19:50:30 +03:00
Inex Code
71c70592b2
fixes
2022-06-24 19:35:42 +03:00
Inex Code
6ca723867e
once again
2022-06-24 19:28:58 +03:00
Inex Code
766edc657a
resolve circular import
2022-06-24 19:24:10 +03:00
Inex Code
9b25bc0d53
Add api status resolvers
2022-06-24 19:17:03 +03:00
Inex Code
17b8334c6e
typo
2022-06-24 18:23:09 +03:00
Inex Code
01dea50c1f
tmp allow access to graphql without auth
2022-06-24 18:21:13 +03:00
Inex Code
28db251f1f
rollback the rename
2022-06-24 18:13:54 +03:00
Inex Code
a6ad9aaf90
rename folder
2022-06-24 18:02:40 +03:00
Inex Code
fc971292c2
add __init__.py to resolvers
2022-06-24 17:49:52 +03:00
Inex Code
99beee40d6
Add integration with flask
2022-06-24 16:05:18 +03:00
inexcode
75e3143c82
strawberry init
2022-06-24 15:26:51 +03:00
Inex Code
c30e062210
Fix date formats
2022-05-31 11:46:58 +03:00
Inex Code
401dff23fb
bitwarden_rs -> vaultwarden
2022-05-26 18:40:07 +03:00
Inex Code
1ac5f72433
Fix API to allow returning user list with the master user
2022-05-12 18:55:57 +03:00
Inex Code
36bf1a80bf
Fix username length check
2022-05-02 14:48:55 +03:00
Inex Code
3044557963
Fix formatting
2022-05-02 10:59:04 +03:00
Inex Code
f31b1173a2
add migration to init
2022-04-29 14:27:13 +03:00
Inex Code
ac220c6968
some logging
2022-04-29 14:24:25 +03:00
Inex Code
f2c73853bc
Add migration to selfprivacy nix channel
2022-04-28 16:22:13 +03:00
Inex Code
6cd896f977
Delete rootKeys field instead of adding empty element
2022-03-20 19:48:00 +03:00
Inex Code
4cbb08cb6e
Fix root key deletion to not make system rebuild unpossible
2022-03-20 19:32:31 +03:00
inexcode
50a82a065e
Cover the case when uses is less than 1
2022-02-16 17:10:29 +03:00
inexcode
c22fe9e8bd
Linting
2022-02-16 16:03:38 +03:00
inexcode
f228db5b29
Bump version to 1.2.0
2022-02-16 15:50:12 +03:00
inexcode
2235358827
Auth module coverage and bug fixes
2022-02-16 15:49:10 +03:00
inexcode
98e60abe74
When returning the list of tokens, indicate which one is caller's
2022-02-16 09:40:31 +03:00
Inex Code
2ec9c8a441
Mark field as required in swagger docs
2022-02-02 14:51:48 +02:00
Inex Code
fbb82c87e8
Add new device token deletion endpoint
2022-01-27 14:12:49 +02:00
Inex Code
40501401b4
More auth tests
2022-01-24 22:01:37 +02:00
Inex Code
5140081cdb
Some test and bupfixes
2022-01-18 17:20:47 +02:00
Inex Code
759e90f734
Formatting and fix swagger test
2022-01-17 13:29:54 +02:00
Inex Code
ade7c77754
Fix bugs
2022-01-17 13:28:17 +02:00
Inex Code
fe86382819
Fix migration to run
2022-01-14 09:24:33 +02:00
Inex Code
d7fe7097e6
Remove redundant security strings from swagger
2022-01-14 10:08:41 +03:00
Inex Code
ea696d0f0e
Inital auth work, untested
2022-01-14 08:38:53 +03:00
Inex Code
aa76f87828
Allow user to disable all migrations entirely
2022-01-11 08:57:14 +03:00