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

fix(ssl): SSL key rotation caused request failure #11305

Merged
merged 5 commits into from
Jun 3, 2024

Conversation

AlinsRan
Copy link
Contributor

Description

Due to the failure to handle the OpenSSL error generated during the AES decryption process, this error was caught by Nginx during the TLS handshake request, resulting in the request failure.

In the scenario of key rotation, due to the attempt to traverse all keys and attempt decryption, the error messages generated earlier should be ignored when decryption is successful.

reference:

Fixes #11148

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

nic-6443
nic-6443 previously approved these changes May 31, 2024
moonming
moonming previously approved these changes May 31, 2024
@AlinsRan AlinsRan dismissed stale reviews from moonming and nic-6443 via f9c7267 June 1, 2024 11:42
@moonming
Copy link
Member

moonming commented Jun 2, 2024

@AlinsRan please make the code linter happy

@shreemaan-abhishek
Copy link
Contributor

@AlinsRan why was this issue occuring only after apisix version upgrade?

@AlinsRan
Copy link
Contributor Author

AlinsRan commented Jun 3, 2024

@AlinsRan why was this issue occuring only after apisix version upgrade?

@shreemaan-abhishek Because a ssl key rotation occurred.
edd1c9f0985e76a1 -> qeddd145sfvddff3
Related to #10771

@@ -242,7 +242,6 @@ apisix:
- qeddd145sfvddff3
--- error_log
decrypt ssl key failed
[alert]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the error generated by decryption has been cleared, ngx will not throw this error.

Copy link
Contributor

@shreemaan-abhishek shreemaan-abhishek left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@membphis membphis left a comment

Choose a reason for hiding this comment

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

LGTM

@AlinsRan AlinsRan merged commit d106de5 into apache:master Jun 3, 2024
48 checks passed
@pfernandes21
Copy link

Hi, I'm experiencing this issue as well. Do you have any planned release for this? Thanks!

@moonming
Copy link
Member

A new version is expected to be released by the end of July. You can also patch this PR in the previous version first @pfernandes21

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.

bug: SSL error migrating to APISIX 3.9.0
7 participants