Skip to content

Commit eb87eea

Browse files
Resolve a conflict #14403 #14405
1 parent a1913c3 commit eb87eea

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

deps/rabbitmq_stream/src/rabbit_stream_reader.erl

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -696,9 +696,9 @@ open(info, {OK, S, Data},
696696
connection_state = State1}};
697697
failure ->
698698
_ = demonitor_all_streams(Connection),
699-
?LOG_INFO("Force closing stream connection ~tp because of "
700-
"transition to invalid state",
701-
[self()]),
699+
rabbit_log_connection:info("Force closing stream connection ~tp because of "
700+
"transition to invalid state",
701+
[self()]),
702702
{stop, {shutdown, <<"Invalid state">>}};
703703
_ ->
704704
State2 =
@@ -1587,12 +1587,8 @@ handle_frame_post_auth(Transport,
15871587
NewUsername,
15881588
stream),
15891589
auth_fail(NewUsername, Msg, Args, C1, S1),
1590-
<<<<<<< HEAD
15911590
rabbit_log_connection:warning(Msg, Args),
1592-
=======
1593-
?LOG_WARNING(Msg, Args),
15941591
silent_close_delay(),
1595-
>>>>>>> 02449bd5d (Close stream connection if secret update fails)
15961592
{C1#stream_connection{connection_step = failure},
15971593
{sasl_authenticate,
15981594
?RESPONSE_AUTHENTICATION_FAILURE, <<>>}};
@@ -1617,26 +1613,8 @@ handle_frame_post_auth(Transport,
16171613
Challenge}};
16181614
{ok, NewUser = #user{username = NewUsername}} ->
16191615
case NewUsername of
1620-
<<<<<<< HEAD
1621-
Username ->
1622-
rabbit_core_metrics:auth_attempt_succeeded(Host,
1623-
Username,
1624-
stream),
1625-
notify_auth_result(Username,
1626-
user_authentication_success,
1627-
[],
1628-
C1,
1629-
S1),
1630-
rabbit_log:debug("Successfully updated secret for username '~ts'", [Username]),
1631-
{C1#stream_connection{user = NewUser,
1632-
authentication_state = done,
1633-
connection_step = authenticated},
1634-
{sasl_authenticate, ?RESPONSE_CODE_OK,
1635-
<<>>}};
1636-
=======
16371616
Username ->
16381617
complete_secret_update(NewUser, C1, S1);
1639-
>>>>>>> ba8745ab4 (Close stream connection if vhost not authorized after secret update)
16401618
_ ->
16411619
rabbit_core_metrics:auth_attempt_failed(Host,
16421620
Username,
@@ -2794,21 +2772,21 @@ complete_secret_update(NewUser = #user{username = Username},
27942772
virtual_host = VH} = C1, S1) ->
27952773
notify_auth_result(Username, user_authentication_success, [], C1, S1),
27962774
rabbit_core_metrics:auth_attempt_succeeded(Host, Username, stream),
2797-
?LOG_DEBUG("Stream connection has successfully checked updated secret (token) for username '~ts'",
2798-
[Username]),
2775+
rabbit_log_connection:debug("Stream connection has successfully checked updated secret (token) for username '~ts'",
2776+
[Username]),
27992777
try
2800-
?LOG_DEBUG("Stream connection: will verify virtual host access after secret (token) update"),
2778+
rabbit_log_connection:debug("Stream connection: will verify virtual host access after secret (token) update"),
28012779
rabbit_access_control:check_vhost_access(NewUser, VH, {socket, S}, #{}),
2802-
?LOG_DEBUG("Stream connection: successfully re-verified virtual host access"),
2780+
rabbit_log_connection:debug("Stream connection: successfully re-verified virtual host access"),
28032781

28042782
{C1#stream_connection{user = NewUser,
28052783
authentication_state = done,
28062784
connection_step = authenticated},
28072785
{sasl_authenticate, ?RESPONSE_CODE_OK,
28082786
<<>>}}
28092787
catch exit:#amqp_error{explanation = Explanation} ->
2810-
?LOG_WARNING("Stream connection no longer has the permissions to access its target virtual host ('~ts') after a secret (token) update: ~ts",
2811-
[VH, Explanation]),
2788+
rabbit_log_connection:warning("Stream connection no longer has the permissions to access its target virtual host ('~ts') after a secret (token) update: ~ts",
2789+
[VH, Explanation]),
28122790
silent_close_delay(),
28132791
{C1#stream_connection{connection_step = failure},
28142792
{sasl_authenticate, ?RESPONSE_VHOST_ACCESS_FAILURE, <<>>}}

0 commit comments

Comments
 (0)