Commit Graph

297 Commits

Author SHA1 Message Date
Maxime Alves LIRMM 904783b134 [deps] 2021-05-28 22:30:39 +02:00
Maxime Alves LIRMM e0b06f51d5 [acl decorator] when check flag is activated, returns a 200 status code with empty body if no acl has passed
check function should always return 200. If we don't do this, we can't see the difference between a "refused" call and a "refused" check
2021-05-28 22:23:20 +02:00
Maxime Alves LIRMM 8ca94ab7ed [acl decorator] possibility to decorate functions with "@route_acl_decorator" 2021-05-28 22:22:05 +02:00
Maxime Alves LIRMM e4e04c6ac1 [JWTmw] add CheckUser to be used when using the "check" flag. Add "user_id" query param to check access of a specific user to a route 2021-05-28 22:18:58 +02:00
Maxime Alves LIRMM 0e5a8ede9d [test] test of lib.acl 2021-05-28 22:13:48 +02:00
Maxime Alves LIRMM a0c41d7d78 [tests] jwt, use of TestClient instead of requests 2021-05-28 22:12:53 +02:00
Maxime Alves LIRMM a82fd6def0 [acl] ajout de l'acl private (test purposes) 2021-05-28 22:02:35 +02:00
Maxime Alves LIRMM 9a9bc16bbc [tests] déplacement des fixtures jwt dans conftest 2021-05-28 21:54:45 +02:00
Maxime Alves LIRMM ea1f54cb82 [tests] JWTmw - flags check et user_id 2021-05-28 12:41:23 +02:00
Maxime Alves LIRMM 3c6713b5e2 [tests] add JWTMw test for query without tokens (must return Unauth user) 2021-05-28 12:27:35 +02:00
Maxime Alves LIRMM c7e29e399b [tests] use "isinstance" instead of "type" 2021-05-28 12:26:51 +02:00
Maxime Alves LIRMM 89a5f3aa52 [tests] nettoyage test jwt 2021-05-28 12:26:27 +02:00
Maxime Alves LIRMM@home 933f456c86 Montage des routes uniquement si les variables DOMAINDICt et SECREt sont présentes 2021-04-27 08:26:48 +02:00
Maxime Alves LIRMM@home 5276833afe [lib/domain] ajout du dossier courant dans le path pour import de librairies dans le dossier du projet 2021-04-24 23:54:18 +02:00
Maxime Alves LIRMM@home 10b1960f4e nettoyage / commentaires / renommage de variables - JWTUser.id deviens JWTUser.identity 2021-04-24 08:56:18 +02:00
Maxime Alves LIRMM@home a2fb70f84b DomainMiddleware ne vérifie plus les domaines non concernés par la première partie du path (optimisation vitesse) 2021-04-23 12:51:51 +02:00
Maxime Alves LIRMM@home 795ca3dcc0 [decorator] ajout du décorateur "args_check" pour automatiser la vérification des args requis/optionels 2021-04-22 23:36:34 +02:00
Maxime Alves LIRMM@home 5b67d938e2 Ajout du timing middleware pour le mode debug 2021-04-22 22:33:02 +02:00
Maxime Alves LIRMM@home 89ec439d3e ajout du header x-args-required et x-args-optional 2021-04-22 22:06:27 +02:00
Maxime Alves LIRMM@home b5ef4a12d1 Ajout du header http "x-acl" qui renseigne l'acl qui a passé dans une requête 2021-04-22 22:04:21 +02:00
Maxime Alves LIRMM@home 4eb23fd189 Ajout de l'option "check" permettant de connaître l'acl qui passe 2021-04-22 17:30:21 +02:00
Maxime Alves LIRMM@home e1c3d61207 Rajout de l'argument "doc" sur la route /halfapi/acls 2021-04-22 11:45:12 +02:00
Maxime Alves LIRMM@home cd0df35496 [tests][lib/responses] format des dates ORJSON + update deps (fix bug dates) 2021-03-12 19:02:23 +01:00
Maxime Alves LIRMM@home 607a288e28 [debug] ajout des routes /error/{code:str} et /exception 2021-03-12 18:59:30 +01:00
Maxime Alves LIRMM@home a3d546905c [update] fixage des versions des dépendances, fixage de python >= 3.7 2021-01-26 01:04:05 +01:00
Maxime Alves LIRMM@home fecdaa29e5 [update] mise à jour du Pipfile.lock et de jwt_middleware
Upgrade de toutes les dépendances
Suppression de la dépendance à jwt
Tests : ok
2021-01-26 00:58:59 +01:00
Joël Maïzi f36a2d8e06 [ORJSONResponse] Handle sets. 2021-01-25 10:44:07 +01:00
Maxime Alves LIRMM@home 54e215b6ff [test][nf] added basic test methods for orjsonresponse 2021-01-23 09:31:35 +01:00
Joël Maïzi a5300962ad [responses] cast set to list. 2021-01-23 08:49:07 +01:00
Maxime Alves LIRMM d21ee175e9 [responses] cast special types in ORJSONResponse 2021-01-14 10:55:02 +01:00
Maxime Alves LIRMM@home f8e546007c [conf] lower loglevel string 2020-12-04 18:12:42 +01:00
Maxime Alves LIRMM@home 8d414f2bdd [config] ajout de l'option LOGLEVEL (info|debug|warning...) 2020-12-04 10:13:54 +01:00
Maxime Alves LIRMM@home e61dd7eeaa [logs] change level de certains messages 2020-12-03 18:49:37 +01:00
Maxime Alves LIRMM@home f4ba64f186 [debug] added /halfapi/log as a debug route that generates all type of logs 2020-11-12 17:56:05 +01:00
Maxime Alves LIRMM@home d4a6bb1a04 [domainMW] set "acl_pass" variable into scope 2020-11-09 21:27:23 +01:00
Maxime Alves LIRMM@home 5d4b8d38b4 0.3.1 2020-11-09 21:26:31 +01:00
Maxime Alves LIRMM@home 9516eaa6d7 RAISES when a router import fails - test your domains routers FFS 2020-11-04 17:02:19 +01:00
Maxime Alves LIRMM@home 56657036e4 Added logging for acls 2020-11-04 13:32:33 +01:00
Maxime Alves LIRMM@home 73d49031a7 handle configuration when domain does not exist 2020-11-04 12:31:11 +01:00
Maxime Alves LIRMM@home 4782764059 add request.scope['config'] when there is a section with the domains name in the project's configuration 2020-11-04 05:01:26 +01:00
Maxime Alves LIRMM@home 61aec6871a [release][v0.3.0] Updated version to 0.3.0 2020-10-31 17:48:55 +01:00
Maxime Alves LIRMM@home 9a4f90d36b /lib/domain - try for ImportError bug 2020-10-27 13:07:49 +01:00
Maxime Alves LIRMM 64e60343bf [conf] Clean of DOMAINS global variable 2020-10-27 13:07:49 +01:00
Maxime Alves LIRMM 4df34b5d87 logging 2020-10-27 13:07:49 +01:00
Maxime Alves LIRMM 24c68b51f2 [lib] ORJSONResponse can now accept specific encoders 2020-10-26 15:12:03 +01:00
Maxime Alves LIRMM d31efe3cc4 [deps] removed half_orm from dependencies 2020-10-20 08:25:50 +02:00
Maxime Alves LIRMM e590bc31fe [doc] lib/domain, lib/domain_middlware 2020-10-07 16:13:54 +02:00
Maxime Alves LIRMM 3959e6d614 [tests] add dummy_domain as a testing dependency (because domains can't
be "not installed" in sys.path)
2020-10-07 15:51:24 +02:00
Maxime Alves LIRMM 1e1ff2fb69 [routes] skip acls that are falsy 2020-10-07 15:50:50 +02:00
Maxime Alves LIRMM 63b73a2bc1 [middleware][domain] load api and acl objects at each call (TODO: use a cache) 2020-10-07 15:49:49 +02:00