]> granicus.if.org Git - ejabberd/commitdiff
Log auth method for incoming s2s connections
authorHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 5 Aug 2014 12:10:32 +0000 (14:10 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 5 Aug 2014 12:10:32 +0000 (14:10 +0200)
Generate an [info] message that logs whether an incoming s2s connection
is authenticated using the SASL EXTERNAL mechanism or via Server
Dialback.  While at it, also mention whether TLS is enabled.

src/ejabberd_s2s_in.erl

index 4fde814fe6cfed9380cda6007966fdccad57b0b9..6c594185af7f0759d14822a58ec283236b6d279b 100644 (file)
@@ -374,8 +374,8 @@ wait_for_feature_request({xmlstreamelement, El},
                                    #xmlel{name = <<"success">>,
                                           attrs = [{<<"xmlns">>, ?NS_SASL}],
                                           children = []}),
-                      ?DEBUG("(~w) Accepted s2s authentication for ~s",
-                             [StateData#state.socket, AuthDomain]),
+                      ?INFO_MSG("Accepted s2s EXTERNAL authentication for ~s (TLS=~p)",
+                                [AuthDomain, StateData#state.tls_enabled]),
                       change_shaper(StateData, <<"">>,
                                     jlib:make_jid(<<"">>, AuthDomain, <<"">>)),
                       {next_state, wait_for_stream,
@@ -515,6 +515,8 @@ stream_established({valid, From, To}, StateData) ->
                            [{<<"from">>, To}, {<<"to">>, From},
                             {<<"type">>, <<"valid">>}],
                        children = []}),
+    ?INFO_MSG("Accepted s2s dialback authentication for ~s (TLS=~p)",
+             [From, StateData#state.tls_enabled]),
     LFrom = jlib:nameprep(From),
     LTo = jlib:nameprep(To),
     NSD = StateData#state{connections =