-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Fixes incomplete client cert chain when using PKI authentication with the login selector #88229
Fixes incomplete client cert chain when using PKI authentication with the login selector #88229
Conversation
Did not change assertions, just refactored in preparation for the next commit.
When an incomplete client cert chain is detected and the TLS protocol version supports it (1.0-1.2), renegotiate the connection to trigger a new TLS handshake and attempt to obtain the full client cert chain.
return this.socket instanceof TLSSocket ? this.socket.authorizationError : undefined; | ||
} | ||
|
||
constructor(public readonly socket: Socket) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we intentionally make the socket public (it was private)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬 Nope, that was intended to be a temporary change while I was testing how renegotiate worked. Thanks for catching, I'll change that back.
Edit: done in 044a062.
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
… the login selector (elastic#88229)
Resolves #88100.
This PR introduces new behavior in the PKI authenticator when an incomplete client cert chain is detected. It now attempts to renegotiate the connection one time to retrieve the full client cert chain. This only works when using TLS 1.0-1.2, as TLS 1.3 does not support renegotiation.
Testing: see linked issue.
Debug logs scenario 1 (normal PKI auth obtains full cert chain)
Debug logs scenario 2 (TLS 1.2, renegotiated connection for PKI auth to obtain full cert chain)
Debug logs scenario 3 (TLS 1.3, cannot renegotiate connection, PKI auth obtains incomplete cert chain)