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

handlers(l4proxy): add use_client_config to l4proxy upstream conf #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

legobeat
Copy link

The TLS client configuration for proxy upstreams considers the downstream connectino values only if configured empty.

This adds a new configuration value use_client_conf, which allows preserving this behavior despite configuring the tls field.

@legobeat legobeat marked this pull request as ready for review June 26, 2024 03:53
@legobeat legobeat changed the title feat: add use_client_config to l4proxy upstream conf handlers(proxy): add use_client_config to l4proxy upstream conf Jun 26, 2024
@legobeat legobeat changed the title handlers(proxy): add use_client_config to l4proxy upstream conf handlers(l4proxy): add use_client_config to l4proxy upstream conf Jun 26, 2024
@mholt
Copy link
Owner

mholt commented Jun 27, 2024

Hmm, thanks -- I'm trying to understand when this would be useful though? If the server has a TLS client configured, then it is used, otherwise we transparently use the client's TLS config. How can we possibly use both?

@legobeat
Copy link
Author

legobeat commented Jul 3, 2024

Hmm, thanks -- I'm trying to understand when this would be useful though? If the server has a TLS client configured, then it is used, otherwise we transparently use the client's TLS config. How can we possibly use both?

There might still be different connection options used in the downstream and upstream connections, though? For example, caddy-l4 user may want to override renegotiation or alpn/protocol options but still otherwise fill in from the client? E.g. we may have a currently working config with nil tls where changing anything would be perturbing the default behavior. After this change, the user can couple the new field with use_client_config: true.

Does that make sense?

One potential source of confusion I'm seeing now is that even if use_client_config is explicitly set to false, the default case will still happen and client options get filled in. Do you think it's worth the squeeze (or even desirable) to distinguish between "explicitly set false" (=> never use client options) and "not configured" (=> as today: use client options iff tls is nil)?

@mholt
Copy link
Owner

mholt commented Jul 4, 2024

For example, caddy-l4 user may want to override renegotiation or alpn/protocol options but still otherwise fill in from the client?

I think I see, so you want to use the client's connection properties but just change one or two of them.

If so, then yeah, the possibility of empty and nil values colliding will be tricky without some annoying changes... hmm.

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.

2 participants