Skip to content

Improve error handling when broker doesn't trust client certificates - #8998

Merged
jiazhai merged 1 commit into
apache:masterfrom
sijie:fix_ssl_npe
Dec 21, 2020
Merged

jiazhai merged 1 commit into
apache:masterfrom
sijie:fix_ssl_npe

Conversation

@sijie

@sijie sijie commented Dec 18, 2020

Copy link
Copy Markdown
Member

Motivation

When TLS throws SSLPeerUnverifiedException, broker doesn't log any information and just returns null.
It makes users very hard to debug problem.

Changes

Improve the error handling when broker doesn't trust client certificates.

See more details at #8963

*Motivation*

When TLS throws `SSLPeerUnverifiedException`, broker doesn't log any information and just returns `null`.
It makes users very hard to debug problem.

*Changes*

Improve the error handling when broker doesn't trust client certificates.

See more details at apache#8963
@sijie sijie added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker area/security release/2.6.3 release/2.7.1 labels Dec 18, 2020
@sijie sijie added this to the 2.8.0 milestone Dec 18, 2020
@sijie sijie self-assigned this Dec 18, 2020
@codelipenghui

Copy link
Copy Markdown
Contributor

/pulsarbot run-failure-checks

1 similar comment
@sijie

sijie commented Dec 18, 2020

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

try {
return sslSession.getPeerCertificates();
} catch (SSLPeerUnverifiedException e) {
log.error("Failed to verify the peer's identity", e);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a way to log the remote address?

@jiazhai
jiazhai merged commit a292b0a into apache:master Dec 21, 2020
codelipenghui pushed a commit that referenced this pull request Dec 21, 2020
…8998)

*Motivation*

When TLS throws `SSLPeerUnverifiedException`, broker doesn't log any information and just returns `null`.
It makes users very hard to debug problem.

*Changes*

Improve the error handling when broker doesn't trust client certificates.

See more details at #8963

(cherry picked from commit a292b0a)
codelipenghui pushed a commit that referenced this pull request Dec 21, 2020
…8998)

*Motivation*

When TLS throws `SSLPeerUnverifiedException`, broker doesn't log any information and just returns `null`.
It makes users very hard to debug problem.

*Changes*

Improve the error handling when broker doesn't trust client certificates.

See more details at #8963

(cherry picked from commit a292b0a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker area/security cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.6.3 release/2.7.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants