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

tls: fix duplicated ':TLS_error_end' suffix in socket failure reason #34799

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

kralicky
Copy link
Contributor

Commit Message: tls: fix duplicated ':TLS_error_end' suffix in socket failure reason

This fix also prevents duplicated debug logs, since they are always generated after the end suffix is appended to the failure reason.

Additional Description:
Follow-up to #34741

Risk Level: low (no guarantees are made about the format of this message); searching the string :TLS_error_end:TLS_error_end in github returns no results other than the test code in the PR linked above

Testing: updated existing tests that checked this string
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

This fix also prevents duplicated debug logs, since they are always
generated after the end suffix is appended to the failure reason.

Signed-off-by: Joe Kralicky <joekralicky@gmail.com>
@kralicky kralicky requested a review from wbpcode as a code owner June 18, 2024 17:38
@tyxia tyxia self-assigned this Jun 18, 2024
@tyxia
Copy link
Member

tyxia commented Jun 20, 2024

/assign @botengyao

Could you take a first pass on this? as you worked on this before.

Copy link
Member

@botengyao botengyao left a comment

Choose a reason for hiding this comment

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

this looks great, thanks for working on this!

} else {
EXPECT_THAT(log_result,
StartsWith("DOWNSTREAM_TRANSPORT_FAILURE_REASON=TLS_error:|268435640:"
"SSL_routines:OPENSSL_internal:NO_SHARED_CIPHER:TLS_error_end"));
Copy link
Member

Choose a reason for hiding this comment

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

Is previous test ending with 2 TLS_error_ends here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the full log_result text here (in main) is

"DOWNSTREAM_TRANSPORT_FAILURE_REASON=TLS_error:|268435640:SSL_routines:OPENSSL_internal:NO_SHARED_CIPHER:TLS_error_end:TLS_error_end FILTER_CHAIN_NAME=-"

but it passed since it was only checking the prefix.

Copy link
Member

@botengyao botengyao left a comment

Choose a reason for hiding this comment

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

/lgtm, thanks for the fix!

defer to @tyxia for another pass.

@botengyao
Copy link
Member

/retest

Copy link
Member

@tyxia tyxia left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@tyxia tyxia merged commit f3ee7c7 into envoyproxy:main Jun 27, 2024
52 checks passed
cainelli pushed a commit to cainelli/envoy that referenced this pull request Jul 5, 2024
…nvoyproxy#34799)

This fix also prevents duplicated debug logs, since they are always
generated after the end suffix is appended to the failure reason.

Signed-off-by: Joe Kralicky <joekralicky@gmail.com>
Signed-off-by: Fernando Cainelli <fernando.cainelli-external@getyourguide.com>
cainelli pushed a commit to cainelli/envoy that referenced this pull request Jul 5, 2024
…nvoyproxy#34799)

This fix also prevents duplicated debug logs, since they are always
generated after the end suffix is appended to the failure reason.

Signed-off-by: Joe Kralicky <joekralicky@gmail.com>
Signed-off-by: Fernando Cainelli <fernando.cainelli-external@getyourguide.com>
cainelli pushed a commit to cainelli/envoy that referenced this pull request Jul 5, 2024
…nvoyproxy#34799)

This fix also prevents duplicated debug logs, since they are always
generated after the end suffix is appended to the failure reason.

Signed-off-by: Joe Kralicky <joekralicky@gmail.com>
Signed-off-by: Fernando Cainelli <fernando.cainelli-external@getyourguide.com>
cainelli pushed a commit to cainelli/envoy that referenced this pull request Jul 5, 2024
…nvoyproxy#34799)

This fix also prevents duplicated debug logs, since they are always
generated after the end suffix is appended to the failure reason.

Signed-off-by: Joe Kralicky <joekralicky@gmail.com>
Signed-off-by: Fernando Cainelli <fernando.cainelli-external@getyourguide.com>
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.

3 participants