Commit Graph

56 Commits

Author SHA1 Message Date
msramalho
a648b90406 simplifies Bearer keys to a single one 2024-02-21 13:52:35 +00:00
Lilia Kai
61a5d9a8d7 Remove basic auth and rename methods
All our clients are now using bearer auth so we can remove basic.

Also renamed methods to be more distinct about the differences between
them. Everything goes through bearer auth but in some cases we are
authenticating a user and other times it's either a server or a
particular api key.
2024-02-14 08:29:54 -10:00
Lilia Kai
5258da65a5 Instrument exceptions by type 2024-01-08 16:45:25 +01:00
msramalho
23beab0eb8 logging correct emails in sheet_service endpoint 2023-12-17 23:55:26 +00:00
msramalho
496a3651e5 detecting already inserted entries 2023-12-13 14:59:51 +00:00
msramalho
74f93ef856 catch cached inserts 2023-12-13 14:28:28 +00:00
msramalho
50417481f4 dep updated 2023-12-13 14:16:15 +00:00
msramalho
7dd0503d90 slight /metrics improvement 2023-12-13 13:46:53 +00:00
msramalho
b92b8e3f8a auto-archiver dep update 2023-12-13 11:51:23 +00:00
Miguel Sozinho Ramalho
1b7e6602db Merge pull request #33 from bellingcat/allow-query-before-archive 2023-12-13 10:30:36 +00:00
msramalho
3d4d7979a5 fixes data leak 2023-12-12 22:24:36 +00:00
msramalho
bb4ac31c12 version updated 2023-12-12 19:17:24 +00:00
Lilia Kai
76c99af48b Remove static file endpoint 2023-12-11 13:43:44 +01:00
msramalho
7ed54c18d7 fixing sql non-null constaint 2023-10-25 14:51:41 +01:00
msramalho
e3c128c4fd adds access control to new endpoint 2023-10-17 16:08:35 +01:00
Lilia Kai
d8bb637532 Add db task endpoint 2023-10-16 14:53:08 +02:00
Miguel Sozinho Ramalho
d99ddea9a9 Merge pull request #13 from bellingcat/get_status 2023-09-22 10:30:29 +01:00
msramalho
c6cd027e13 allows search to happen with API_TOKEN 2023-09-20 11:30:57 +01:00
Lilia Kai
f20dd05928 Refactor get_status and create_archive_task error handling
Raise exceptions instead of returning error messages from the worker in
create_arvive_task. This ensures consistency in how the errors are
presented on the task result: the Exception will be the result instead
of *maybe* being wrapped in an object like {error: Exception}.

This lets us simplify error handling in get_status so we have only one
try/except block where the error can be returned to the client.
2023-09-20 11:43:55 +02:00
Lilia Kai
1b39f2c291 Rename variables in get_status
There are no logic changes in this commit, just renamed variables so
that fewer things are called "result" which seemed confusing.

Instead of result.result = task_result.result,
we can say response.result = task.result
2023-09-20 11:01:00 +02:00
Lilia Kai
91762f58b7 Add option to serve local archive files
Set an environment variable in the docker compose file, then reference
that variable in main.py to mount the local archive so that the links
generated by auto-archiver will work correctly. Fixes #8
2023-09-05 16:10:37 +02:00
msramalho
ce1599b160 wacz working in docker 2023-08-24 17:44:37 +01:00
msramalho
75b42c0f33 filter by date archived before/after 2023-08-18 16:15:06 +01:00
msramalho
4741638c33 wacz working withing docker 2023-07-28 16:01:45 +01:00
msramalho
8c6ff8cb91 version bump 2023-07-11 15:44:13 +01:00
msramalho
344cc8d2bd fix: group permissions 2023-07-11 15:42:44 +01:00
Logan Williams
46c487be5d Restore sheet_service endpoint 2023-06-06 18:44:45 +00:00
msramalho
88be84127a adds /metrics 2023-05-26 13:15:36 +01:00
msramalho
7248e36309 method rename 2023-05-26 11:17:16 +01:00
msramalho
66e81d48eb feat: process thumbnails and insert missing users 2023-05-25 11:50:38 +01:00
msramalho
d79fe0a27c feat: submit-url endpoint ready 2023-05-24 19:05:44 +01:00
msramalho
9062420244 feat: /sheet endpoint and new security protocol 2023-05-23 20:20:28 +01:00
msramalho
df1064cfeb fix bearer 2023-05-19 14:16:02 +01:00
msramalho
36ede720cb sheet processing implemented 2023-05-19 13:50:26 +01:00
msramalho
d6aaaf1e12 WIP: code working, dependency conflict 2023-05-18 18:36:33 +01:00
msramalho
3a040a3fcd user-groups explained 2023-04-26 23:48:28 +01:00
msramalho
4119387feb new api mvp 2023-04-26 23:40:42 +01:00
msramalho
6c8283f517 WIP introduces new DB model for users,groups,tags 2023-04-13 16:18:54 +01:00
msramalho
a400443dc0 task retries 2023-03-10 11:00:02 +00:00
msramalho
0c067719a5 improves logging 2023-03-09 11:30:59 +00:00
msramalho
42b98b7c40 BEARER 2023-03-07 23:24:39 +00:00
msramalho
a02223d059 lower case emails all the way 2023-03-06 15:06:17 +00:00
msramalho
f4d843a607 secure auth 2023-02-28 10:25:37 +01:00
msramalho
f724694258 cleanup 2023-02-27 15:50:37 +01:00
msramalho
56c18dd96b added database migrations + soft delete 2023-02-27 13:12:22 +01:00
msramalho
39da4e4eb7 0.1.5 2023-02-27 12:00:38 +01:00
msramalho
707a786530 version update 2023-02-27 10:17:40 +01:00
msramalho
7d5e8de892 delete op 2023-02-26 21:24:54 +01:00
msramalho
3ef4787313 API updates 2023-02-26 20:22:20 +01:00
msramalho
a00f3ff8d7 redis password and CORS 2023-02-25 14:54:41 +01:00