-
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
Add option to modify Cowboy server name returned in headers #2308
Conversation
6507.1 / Erlang 19.3 / small_tests / 72cb3aa 6507.6 / Erlang 19.3 / elasticsearch_and_cassandra_mnesia / 72cb3aa 6507.5 / Erlang 19.3 / ldap_mnesia / 72cb3aa sm_SUITE:parallel:subscription_requests_are_buffered_properly{error,{{badmatch,false},
[{escalus_session,stream_management,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
{line,227}]},
{escalus_connection,connection_step,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,134}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{escalus_connection,start,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,118}]},
{sm_SUITE,'-subscription_requests_are_buffered_properly/1-fun-3-',6,
[{file,"sm_SUITE.erl"},{line,848}]},
{escalus_story,story,4,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1529}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1045}]}]}} 6507.3 / Erlang 19.3 / mysql_redis / 72cb3aa pubsub_SUITE:dag+collection:request_all_items_leaf_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,<<"alicE78.793971@localhost/res1">>,escalus_tcp,
<0.11380.3>,
[{event_manager,<0.11300.3>},
{server,<<"localhost">>},
{username,<<"alicE78.793971">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.11300.3>},
{server,<<"localhost">>},
{username,<<"alicE78.793971">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"alicE78.793971">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"alicE78.793971">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"0394F8721ABFAE43">>}]},
5000],
[{file,
"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,138}]},
{pubsub_tools,receive_response,3,
[{file,"pubsub_tools.erl"},{line,457}]},
{pubsub_tools,receive_and_check_response,4,
[{file,"pubsub_tools.erl"},{line,448}]},
{pubsub_SUITE,'-request_all_items_leaf_test/1-fun-0-',2,
[{file,"pubsub_SUITE.erl"},{line,1519}]},
{escalus_story,story,4,
[{file,
"/home/travis/build/esl/MongooseIM/big_tests/_build/defau... 6507.2 / Erlang 19.3 / internal_mnesia / 72cb3aa 6507.4 / Erlang 19.3 / odbc_mssql_mnesia / 72cb3aa 6507.8 / Erlang 20.0 / pgsql_mnesia / 72cb3aa 6507.9 / Erlang 21.0 / riak_mnesia / 72cb3aa |
Codecov Report
@@ Coverage Diff @@
## master #2308 +/- ##
==========================================
+ Coverage 78.73% 78.95% +0.21%
==========================================
Files 334 334
Lines 29026 29033 +7
==========================================
+ Hits 22855 22923 +68
+ Misses 6171 6110 -61
Continue to review full report at Codecov.
|
6508.1 / Erlang 19.3 / small_tests / 77fcd36 6508.5 / Erlang 19.3 / ldap_mnesia / 77fcd36 sm_SUITE:parallel:subscription_requests_are_buffered_properly{error,{{badmatch,false},
[{escalus_session,stream_management,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
{line,227}]},
{escalus_connection,connection_step,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,134}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{escalus_connection,start,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,118}]},
{sm_SUITE,'-subscription_requests_are_buffered_properly/1-fun-3-',6,
[{file,"sm_SUITE.erl"},{line,848}]},
{escalus_story,story,4,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1529}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1045}]}]}} 6508.6 / Erlang 19.3 / elasticsearch_and_cassandra_mnesia / 77fcd36 6508.3 / Erlang 19.3 / mysql_redis / 77fcd36 6508.2 / Erlang 19.3 / internal_mnesia / 77fcd36 sm_SUITE:parallel:subscription_requests_are_buffered_properly{error,{{badmatch,false},
[{escalus_session,stream_management,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
{line,227}]},
{escalus_connection,connection_step,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,134}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{escalus_connection,start,2,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
{line,118}]},
{sm_SUITE,'-subscription_requests_are_buffered_properly/1-fun-3-',6,
[{file,"sm_SUITE.erl"},{line,848}]},
{escalus_story,story,4,
[{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1529}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1045}]}]}} 6508.4 / Erlang 19.3 / odbc_mssql_mnesia / 77fcd36 6508.8 / Erlang 20.0 / pgsql_mnesia / 77fcd36 6508.9 / Erlang 21.0 / riak_mnesia / 77fcd36 pubsub_SUITE:dag+basic:discover_nodes_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,<<"alicE74.813452@localhost/res1">>,escalus_tcp,
<0.12947.1>,
[{event_manager,<0.12844.1>},
{server,<<"localhost">>},
{username,<<"alicE74.813452">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.12844.1>},
{server,<<"localhost">>},
{username,<<"alicE74.813452">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,<<"alicE74.813452">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,{escalus_auth,auth_plain}},
{wspath,undefined},
{username,<<"alicE74.813452">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"C4F6A193D62B031D">>}]},
5000],
[{file,
"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,138}]},
{pubsub_tools,receive_response,3,
[{file,"pubsub_tools.erl"},{line,457}]},
{pubsub_tools,receive_and_check_response,4,
[{file,"pubsub_tools.erl"},{line,448}]},
{pubsub_SUITE,'-discover_nodes_test/1-fun-0-',2,
[{file,"pubsub_SUITE.erl"},{line,354}]},
{escalus_story,story,4,
[{file,
"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/es... |
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.
code - good. docs - N/A
Damn, forgot to push the commit docs. One moment... |
doc/Advanced-configuration.md
Outdated
@@ -351,6 +351,12 @@ There are some additional options that influence all database connections in the | |||
* **Syntax:** `{replaced_wait_timeout, TimeInMilliseconds}` | |||
* **Default:** `2000` | |||
|
|||
* **cowboy_server_name** (local) | |||
* **Description:** If configured, replaces Cowboy's default name returned in `server` HTTP response header. It may be use for extra security, as it makes harder for the malicious user harder to learn what HTTP software is running under specific port. This option applies to **all** listeners started by `ejabberd_cowboy` module. |
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.
* **Description:** If configured, replaces Cowboy's default name returned in the `server` HTTP response header. It may be used for extra security, as it makes it harder for the malicious user to learn what HTTP software is running a under specific port. This option applies to **all** listeners started by the `ejabberd_cowboy` module.
This PR adds
cowboy_server_name
config option, which sets the reported HTTP server name in response headers. It may be used for hardening MIM (by hiding Cowboy's identity).