Commit graph

316 commits

Author SHA1 Message Date
Josué Tille
9400ef7498
Don't update LDAP if there are nothing to do 2019-12-22 12:16:34 +01:00
decentral1se
54b8cab133 Apply Black on all the code base 2019-11-25 17:21:13 +01:00
Alexandre Aubin
952d707362 Make the linter gods happy 2019-11-20 00:27:34 +01:00
Alexandre Aubin
53ab4709d1 Rewrite auth tests in a more clean way, now using webtest to run the API 2019-11-19 21:12:58 +01:00
Alexandre Aubin
9fda7f4716 Merge branch 'stretch-unstable' into simplify-auth-mechanism 2019-11-19 16:55:06 +01:00
Alexandre Aubin
dcfd70c5df Import hmac, used for compare_digest 2019-11-19 16:50:13 +01:00
Alexandre Aubin
06e72c0e86 Simplify cache code.. 2019-11-19 16:49:45 +01:00
Alexandre Aubin
e14d156650
Space typo
Co-Authored-By: Timost <Timost@users.noreply.github.com>
2019-11-19 14:42:19 +01:00
Alexandre Aubin
f1087662a0
Use hmac.compare_digest to compare hashes
Co-Authored-By: Timost <Timost@users.noreply.github.com>
2019-11-19 14:19:35 +01:00
Alexandre Aubin
e77e27730b
Update moulinette/authenticators/__init__.py
Co-Authored-By: Timost <Timost@users.noreply.github.com>
2019-11-01 16:47:05 +01:00
Alexandre Aubin
808f6203fd Allow to customize color for CLI prompts 2019-09-27 17:40:44 +02:00
Luke Murphy
cef72f7de9
Add some unit tests for the actionsmap module 2019-09-11 00:47:10 +01:00
Alexandre Aubin
97aad385b4
Add comment about the _authentiate_session mechanism 2019-08-30 20:13:17 +02:00
Luke Murphy
2c84ee1541
Add tests for text/serialize modules
Also take a pass on the docstrings.
2019-08-28 17:57:16 +02:00
Alexandre Aubin
050a982c93 Add note 2019-08-23 02:40:41 +02:00
Alexandre Aubin
2addea1e08 Implement basic tests for auth mechanism 2019-08-23 02:37:57 +02:00
Alexandre Aubin
6d44c46740 Be able to run test on the API 2019-08-22 03:27:31 +02:00
Alexandre Aubin
6899217fa0 Make linter gods happy 2019-08-21 16:22:16 +02:00
Alexandre Aubin
0a13e5b000 Fix is_authenticated mechanism 2019-08-21 16:12:03 +02:00
Alexandre Aubin
d7a33e5a14 Typo 2019-08-21 16:11:07 +02:00
Alexandre Aubin
7482f052f6 Get rid of gnupg, just store a hash of the id:token to reauthenticate later using session info 2019-08-20 20:31:10 +02:00
Alexandre Aubin
3822496622 Try to improve semantic : s_hash -> s_token 2019-08-20 19:53:51 +02:00
Alexandre Aubin
bcaf8b2e4a Move clean_session with the other session management method + add a check for session.hashed for additional security ? 2019-08-20 19:42:32 +02:00
Alexandre Aubin
ebc37ea014 Move init_authenticator to actionsmap.py for clarity to avoid spreading this shit over 72 files 2019-08-20 05:55:06 +02:00
Alexandre Aubin
65fe685a90 Get rid of this 'help' madness and more generally this three-tuppled containing various tuples and weird stuff ... use a simple dict everywhere instead 2019-08-20 05:43:17 +02:00
Alexandre Aubin
cad2cd8006 Get rid of the _format_conf madness. Instead, have clear functions to define if authentication is required, trigger the auth process if so 2019-08-20 05:43:09 +02:00
Alexandre Aubin
968667d9ed Try to improve the semantic of where/when the auth happens... 2019-08-20 03:32:52 +02:00
Alexandre Aubin
8d77fdb9a4 Cleaned unused stuff or overly complicated for no reason 2019-08-20 03:31:37 +02:00
Alexandre Aubin
83d9e772e7 Nowadays we don't have .errno anymore ? 2019-08-20 00:45:05 +02:00
Alexandre Aubin
3878ffdc04
Merge pull request #213 from YunoHost/detailed_error_messages_for_assert
[mod] add detail error messages on asserts
2019-08-18 14:12:56 +02:00
Alexandre Aubin
b393d55ebd Gotta catch them all... 2019-08-05 18:01:05 +02:00
Alexandre Aubin
2e2e627894 [yolo] Add a write_to_yaml utility similar to write_to_json 2019-08-05 17:59:10 +02:00
Luke Murphy
d52a574f77 Test documentation under Tox 2019-08-04 19:46:20 +02:00
Laurent Peuch
f49c004a59 [mod] add detail error messages on asserts 2019-08-04 18:48:16 +02:00
Alexandre Aubin
758778a04b Typo 2019-08-03 21:24:48 +02:00
Luke Murphy
659e20d5f5
Import DATA_DIR correctly
Fix for f6bfabc7aa.
2019-08-01 16:51:04 +02:00
Alexandre Aubin
f6bfabc7aa
Merge pull request #207 from decentral1se/refactor-global-loading
Refactor global loading
2019-08-01 12:20:38 +02:00
Luke Murphy
dfd0868510
Use flake8 under Tox and fix complaints 2019-07-29 13:26:16 +02:00
Laurent Peuch
1f10529209 [fix] syntax error, again -_-' 2019-07-29 03:56:10 +02:00
Laurent Peuch
599bec33b8 [fix] bad key, we aren't in self.local situation 2019-07-29 02:44:04 +02:00
Luke Murphy
14a3d63453
Test the cache file opening and creation 2019-07-28 22:04:07 +02:00
Luke Murphy
e027a188a9
Refactor exposing of global configuration
We do this to make it easier to control this value during testing. We
should not import these values at package setup time. Nor should we
import them at package load time.

This change introduces a new API for the Moulinette package. The
moulinette.env accessor. This is a breaking change. However, I've
searched around and can't seem to find any usage that relies directly on
these properties being available.

I've tried to maintain API backwards compatibility in all cases
otherwise.
2019-07-28 22:04:07 +02:00
Laurent Peuch
737f2dd967 [fix] missing argument for translation string formatting 2019-07-28 21:38:19 +02:00
Laurent Peuch
2403ee1b7d [mod] during tests failed to translate string is an error 2019-07-28 21:29:50 +02:00
Laurent Peuch
fdf9a719f1 [mod] way better failed translation error messages 2019-07-28 21:27:41 +02:00
Laurent Peuch
a8966b8643 [mod] add more message to inform users that some stuff are a warning 2019-07-28 21:14:24 +02:00
Bram
76c8620861
Merge pull request #205 from YunoHost/warning_long_lock
Warn the user about long locks for a way better UX
2019-07-28 18:56:43 +02:00
Bram
a22208ce40
[fix] typo, created a tuple instead of a string 2019-07-28 15:28:17 +02:00
Bram
bce7aee510
Merge pull request #208 from YunoHost/better_debug_gpg
Better debug information related to gpg for storing session
2019-07-28 06:02:50 +02:00
Bram
b7d415dc2c
[ux] make warning clearer because users often report it 2019-07-26 18:29:19 +02:00