-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Section-based auth config #3446
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3446 +/- ##
==========================================
- Coverage 80.81% 80.81% -0.01%
==========================================
Files 415 415
Lines 32317 32306 -11
==========================================
- Hits 26117 26107 -10
+ Misses 6200 6199 -1
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Now the auth mthods are declared by including the section(s) instead of listing the methods. The list of methods is optional and used to specify method order. Motivation: - Required method options were enforced only if the relevant section was present, but the section could be omitted even though the method was enabled. - The possibility to specify default values for method options without always including all subsections for unused methods. - Simplicity: in most cases only one method is enabled and the list of methods can be omitted.
Also: - Test auth methods with real names as the mocked modules were invalid. Using real names is easier than mocking helper functions inside mongoose_config_spec. - Test missing modules in a separate simple test case.
43b897d
to
4ae6972
Compare
This comment has been minimized.
This comment has been minimized.
Use the callback for the root element for the check. Main motivation is to keep error handling consistent and simplify testing.
Errors are generated the same way for all types of issues, so the same code can be reused. Also: - Module names changed to real ones in the file test - assert_error logic is updated to handle more detailed tests with checking the reason and other attributes
4ae6972
to
35f510d
Compare
This comment has been minimized.
This comment has been minimized.
ad87bce
to
e95c1e0
Compare
Also: add missing information about the changed host_config.
e95c1e0
to
33f2837
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
small_tests_24 / small_tests / 33f2837 small_tests_23 / small_tests / 33f2837 dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 33f2837 dynamic_domains_mysql_redis_24 / mysql_redis / 33f2837 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 33f2837 ldap_mnesia_24 / ldap_mnesia / 33f2837 ldap_mnesia_23 / ldap_mnesia / 33f2837 elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 33f2837 pgsql_mnesia_24 / pgsql_mnesia / 33f2837 pgsql_mnesia_23 / pgsql_mnesia / 33f2837 mssql_mnesia_24 / odbc_mssql_mnesia / 33f2837 mysql_redis_24 / mysql_redis / 33f2837 riak_mnesia_24 / riak_mnesia / 33f2837 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 33f2837 internal_mnesia_24 / internal_mnesia / 33f2837 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :) I like how unsupported auth methods and modules are checked now.
Change the way auth methods are specified:
Motivation:
Other changes:
Planned in the next PR:
scram_iterations
toauth.password
.Example 1 - before:
After - the
auth
section itself can be skipped as it has no options:Example 2 - before:
After - the subsection is now necessary:
Alternatively:
Example 3 - most complicated, unlikely:
After -
rdbms
section needs to be added.methods
is still needed to sort them.