Skip to content
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

Support domain removal in the RDBMS auth backend #3295

Merged
merged 2 commits into from
Sep 23, 2021
Merged

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Sep 23, 2021

Implement callback, add tests.

Also: export all functions from the test suite for easier debugging. We are doing this for most test suites.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 23, 2021

small_tests_24 / small_tests / 23185ce
Reports root / small


internal_mnesia_24 / internal_mnesia / 23185ce
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 291 / Auto-skipped: 0


small_tests_23 / small_tests / 23185ce
Reports root / small


dynamic_domains_24 / pgsql_mnesia / 23185ce
Reports root/ big
OK: 2696 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 23185ce
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 394 / Auto-skipped: 0


dynamic_domains_23 / pgsql_mnesia / 23185ce
Reports root/ big
OK: 2696 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 23185ce
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 394 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 23185ce
Reports root/ big
OK: 3065 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 23185ce
Reports root/ big
OK: 1862 / Failed: 0 / User-skipped: 317 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 23185ce
Reports root/ big
OK: 3048 / Failed: 0 / User-skipped: 228 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 23185ce
Reports root/ big
OK: 3065 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 23185ce
Reports root/ big
OK: 3065 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 23185ce
Reports root/ big
OK: 1709 / Failed: 0 / User-skipped: 320 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #3295 (baf4758) into master (a75e7d5) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3295      +/-   ##
==========================================
- Coverage   80.22%   80.21%   -0.02%     
==========================================
  Files         398      398              
  Lines       32574    32577       +3     
==========================================
- Hits        26134    26133       -1     
- Misses       6440     6444       +4     
Impacted Files Coverage Δ
src/auth/ejabberd_auth.erl 84.45% <ø> (ø)
src/auth/ejabberd_auth_rdbms.erl 57.14% <100.00%> (+0.81%) ⬆️
src/domain/mongoose_domain_sql.erl 82.85% <0.00%> (-2.86%) ⬇️
...c/global_distrib/mod_global_distrib_server_mgr.erl 74.57% <0.00%> (-2.26%) ⬇️
src/ejabberd_c2s.erl 89.07% <0.00%> (-0.15%) ⬇️
src/global_distrib/mod_global_distrib_receiver.erl 80.00% <0.00%> (ø)
src/pubsub/mod_pubsub_db_mnesia.erl 92.85% <0.00%> (+0.42%) ⬆️
src/metrics/mongoose_metrics.erl 96.10% <0.00%> (+0.64%) ⬆️
src/mam/mod_mam_elasticsearch_arch.erl 86.84% <0.00%> (+1.75%) ⬆️
src/elasticsearch/mongoose_elasticsearch.erl 84.61% <0.00%> (+7.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a75e7d5...baf4758. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 23, 2021

small_tests_24 / small_tests / 2f5005b
Reports root / small


internal_mnesia_24 / internal_mnesia / 2f5005b
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 291 / Auto-skipped: 0


small_tests_23 / small_tests / 2f5005b
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 2f5005b
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 394 / Auto-skipped: 0


dynamic_domains_24 / pgsql_mnesia / 2f5005b
Reports root/ big
OK: 2696 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 2f5005b
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 394 / Auto-skipped: 0


dynamic_domains_23 / pgsql_mnesia / 2f5005b
Reports root/ big
OK: 2696 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 2f5005b
Reports root/ big
OK: 1862 / Failed: 0 / User-skipped: 317 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 2f5005b
Reports root/ big
OK: 3048 / Failed: 0 / User-skipped: 228 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 2f5005b
Reports root/ big
OK: 3065 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 2f5005b
Reports root/ big
OK: 3065 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 2f5005b
Reports root/ big
OK: 3065 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 2f5005b
Reports root/ big
OK: 1709 / Failed: 0 / User-skipped: 320 / Auto-skipped: 0

@chrzaszcz chrzaszcz marked this pull request as ready for review September 23, 2021 12:42
Copy link
Contributor

@Premwoik Premwoik left a 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 have only one question.

src/auth/ejabberd_auth_rdbms.erl Outdated Show resolved Hide resolved
@vkatsuba
Copy link
Contributor

Please resolve conflicts with big_tests/tests/domain_removal_SUITE.erl.

- Check with XMPP and SQL
- Additional check that a user from a different domain can connect
- Export all functions for flexibility in tests
@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 23, 2021

small_tests_24 / small_tests / baf4758
Reports root / small


internal_mnesia_24 / internal_mnesia / baf4758
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 292 / Auto-skipped: 0


small_tests_23 / small_tests / baf4758
Reports root / small


dynamic_domains_24 / pgsql_mnesia / baf4758
Reports root/ big
OK: 2697 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


dynamic_domains_23 / pgsql_mnesia / baf4758
Reports root/ big
OK: 2697 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / baf4758
Reports root/ big
OK: 3066 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / baf4758
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 395 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / baf4758
Reports root/ big
OK: 3049 / Failed: 0 / User-skipped: 228 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / baf4758
Reports root/ big
OK: 3066 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / baf4758
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 395 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / baf4758
Reports root/ big
OK: 1862 / Failed: 0 / User-skipped: 318 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / baf4758
Reports root/ big
OK: 3066 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / baf4758
Reports root/ big
OK: 1709 / Failed: 0 / User-skipped: 321 / Auto-skipped: 0

@vkatsuba vkatsuba merged commit def9c13 into master Sep 23, 2021
@vkatsuba vkatsuba deleted the remove-domain-auth branch September 23, 2021 18:52
@Premwoik Premwoik added this to the 5.0.0 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants