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

Scram errors #4020

Merged
merged 3 commits into from
May 9, 2023
Merged

Scram errors #4020

merged 3 commits into from
May 9, 2023

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented May 8, 2023

The easiest way to test without having to reimplement nonces and salts in tests nor re-add fast_scram as a dependency to big-tests, was to blindly return 'not-authorised' to all error conditions. This nevertheless can be ok, as if we don't tell an attacker why the authentication failed, makes it harder for him to continue guessing.

@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02 ⚠️

Comparison is base (7ffe85a) 82.19% compared to head (897d72b) 82.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4020      +/-   ##
==========================================
- Coverage   82.19%   82.18%   -0.02%     
==========================================
  Files         535      535              
  Lines       33840    33841       +1     
==========================================
- Hits        27816    27813       -3     
- Misses       6024     6028       +4     
Impacted Files Coverage Δ
src/sasl/cyrsasl_scram.erl 95.74% <100.00%> (+0.09%) ⬆️

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mongoose-im
Copy link
Collaborator

mongoose-im commented May 9, 2023

small_tests_24 / small_tests / 897d72b
Reports root / small


small_tests_25_arm64 / small_tests / 897d72b
Reports root / small


small_tests_25 / small_tests / 897d72b
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 897d72b
Reports root/ big
OK: 2222 / Failed: 0 / User-skipped: 834 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 897d72b
Reports root/ big
OK: 4194 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 897d72b
Reports root/ big
OK: 4168 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 897d72b
Reports root/ big
OK: 2222 / Failed: 0 / User-skipped: 834 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 897d72b
Reports root/ big
OK: 4194 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 897d72b
Reports root/ big
OK: 2368 / Failed: 0 / User-skipped: 688 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 897d72b
Reports root/ big
OK: 2728 / Failed: 0 / User-skipped: 667 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 897d72b
Reports root/ big
OK: 4191 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 897d72b
Reports root/ big
OK: 4567 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 897d72b
Reports root/ big
OK: 4571 / Failed: 1 / User-skipped: 111 / Auto-skipped: 0

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_1556@localhost/res1">>},
        {<<"id">>,<<"e7b8e048-6333-428f-bb4f-8a0664e98af3">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"a99fe07d-8ff7-4468-9edc-1dd15dd0cf58">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_1556@localhost/res1' id='e7b8e048-6333-428f-bb4f-8a0664e98af3' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='a99fe07d-8ff7-4468-9edc-1dd15dd0cf58'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/project/big_tests/tests/jingle_SUITE.erl"},
       {line,389}]},
    {jingle_SUITE,
      '-resp_...

Report log


pgsql_mnesia_25 / pgsql_mnesia / 897d72b
Reports root/ big
OK: 4567 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 897d72b
Reports root/ big
OK: 4564 / Failed: 0 / User-skipped: 100 / Auto-skipped: 0

@NelsonVides NelsonVides marked this pull request as ready for review May 9, 2023 11:22
@NelsonVides NelsonVides requested a review from DenysGonchar May 9, 2023 11:23
Copy link
Collaborator

@DenysGonchar DenysGonchar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fast implementation

@JanuszJakubiec JanuszJakubiec added this to the 6.1.0 milestone May 9, 2023
@NelsonVides NelsonVides merged commit b12d6d6 into master May 9, 2023
@NelsonVides NelsonVides deleted the scram_errors branch May 9, 2023 12:35
@Neustradamus

This comment was marked as spam.

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.

5 participants