Repository navigation
Support common name prefix/suffix for SASL External - #4580
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4580 +/- ##
==========================================
+ Coverage 86.00% 86.01% +0.01%
==========================================
Files 565 565
Lines 33905 33913 +8
==========================================
+ Hits 29159 29170 +11
+ Misses 4746 4743 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
467caaa to
6036b19
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6036b19 to
c6217e2
Compare
This comment was marked as outdated.
This comment was marked as outdated.
7aef188 to
d80f0c5
Compare
c6217e2 to
38f2f60
Compare
This comment was marked as outdated.
This comment was marked as outdated.
d80f0c5 to
11a7424
Compare
38f2f60 to
c95f49c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
The prefix/suffix are added to the common name in order to obtain the user name. The validator is 'jid_localpart', because a part of localpart needs to be a valid localpart itself. Early validation is easier to debug than subsequent auth failures. Note that the section is not present by default.
Also: move default_auth() implementation to default_config/1 to make it more consistent, and to make it usable with config/2
Check that the username is: - Unchanged without prefix or suffix - Changed with prefix and suffix
- Describe sasl_external_common_name.prefix/suffix - Document the (previously undocumented) possibility of implementing your own verification module.
c95f49c to
7b6fd70
Compare
|
elasticsearch_and_cassandra_28 / elasticsearch_and_cassandra_mnesia / 7b6fd70 small_tests_28 / small_tests / 7b6fd70 small_tests_27 / small_tests / 7b6fd70 small_tests_28_arm64 / small_tests / 7b6fd70 dynamic_domains_mysql_redis_28 / mysql_redis / 7b6fd70 ldap_mnesia_27 / ldap_mnesia / 7b6fd70 ldap_mnesia_28 / ldap_mnesia / 7b6fd70 internal_mnesia_28 / internal_mnesia / 7b6fd70 dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 7b6fd70 dynamic_domains_pgsql_mnesia_28 / pgsql_mnesia / 7b6fd70 pgsql_cets_28 / pgsql_cets / 7b6fd70 cockroachdb_cets_28 / cockroachdb_cets / 7b6fd70 pubsub_SUITE:dag+last_item_cache:send_last_published_item_no_items_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"alice_send_last_published_item_no_items_test_3714@localhost/res1">>,
escalus_tcp,<0.115269.0>,
[{event_manager,<0.115257.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3714">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.115257.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3714">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,
<<"alice_send_last_published_item_no_items_test_3714">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,fun escalus_auth:auth_plain/2},
{wspath,undefined},
{username,
<<"alicE_send_last_published_item_no_items_test_3714">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"a8cf88ff55386880">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,444}]},
{pubsub_tools,receive_and_c...dynamic_domains_mssql_mnesia_28 / odbc_mssql_mnesia / 7b6fd70 mysql_redis_28 / mysql_redis / 7b6fd70 pgsql_mnesia_27 / pgsql_mnesia / 7b6fd70 pgsql_mnesia_28 / pgsql_mnesia / 7b6fd70 mssql_mnesia_28 / odbc_mssql_mnesia / 7b6fd70 |
As suggested by @niecore, it might be useful to allow add prefix/suffix while converting a
common_nameto a user name (JID localpart) in the context of the SASL External authentication mechanism.This PR includes the following changes:
sasl_external_common_namesubsection toauthconfiguration with two options:prefixandsuffix.Other changes:
More details in commit messages.