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

Add flags for setting maximum TLS version and client authentication #336

Merged
merged 1 commit into from Jul 7, 2022

Conversation

xperimental
Copy link
Contributor

We currently encounter an issue where the health-check of HAProxy causes a periodic error message to be printed by this service:

2022/07/06 16:26:52 http: TLS handshake error from haproxy-ip:43002: write tcp service-ip:8080->haproxy-ip:43002: write: connection reset by peer

This is because observability-api tries to request a client-certificate from all connections by default, which fails in this case because HAProxy does not do any TLS exchange, but immediately closes the connection again.

I have also added the max-version setting because it was helpful during debugging this case and looked useful for the future.

This PR replaces #316 .

Refs: https://issues.redhat.com/browse/LOG-2750

Copy link
Contributor

@periklis periklis left a comment

Choose a reason for hiding this comment

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

Looks good to me

@periklis periklis merged commit 6ddd25d into observatorium:main Jul 7, 2022
@xperimental xperimental deleted the tls-options branch July 7, 2022 08:31
cipherSuiteIDs, err := flag.TLSCipherSuites(cipherSuites)
if err != nil {
return nil, fmt.Errorf("TLS cipher suite name to ID conversion: %v", err)
}

tlsClientAuthType, err := parseClientAuthType(clientAuthType)
if err != nil {
return nil, fmt.Errorf("can not parse TLS Client authentication policy: %w", err)
Copy link
Member

Choose a reason for hiding this comment

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

nit:
s/can not/cannot/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems I keep making this mistake 🤦

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.

None yet

3 participants