-
Notifications
You must be signed in to change notification settings - Fork 19
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
[HAPROXY] use $SOURCEIP instead of $PROXIED_SRCIP #361
[HAPROXY] use $SOURCEIP instead of $PROXIED_SRCIP #361
Conversation
cdfd3b6
to
c2c1e8f
Compare
58f020f
to
dff7494
Compare
672e0c2
to
1c9e896
Compare
1c9e896
to
5ee3ffd
Compare
b3b5bc7
to
e8322f7
Compare
This is now ready for review and I think would be a better solution than #482 with the same fix. |
@OverOrion @MrAnno could you re-review this, so we can merge this instead of #482? |
I'm reviewing it. |
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ransportStack Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Previously TLS compression was enabled using an overly complicated mechanism crossing a number of layers (TransportMapperInet -> TransportFactoryTLS -> TLSSession -> SSL). This can be a lot simpler, which this patch implements. NOTE: compression will not work in most cases due to OpenSSL security levels and this patch adds a warning about it. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Instead of going to the fd directly, wrap the lower-level LogTransport instance into a BIO and use that. This implements proper stacking for LogTransportTLS. This adds the use of OpenSSL BIOs to wrap the lower level LogTransport instance. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…rtStack level Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…sages The "auto" protocol can be applied to both syslog() and network(), so it's not strictly RFC6587 related and it does not add too much information anyway. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Instead of using proxy protocol specific name value pairs, set the addresses in the message's saddr/daddr members. This should be a lot faster and a lot easier to use. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…resses Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…e_index Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…e message Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This reworks the various boolean members in TransportMapperInet that control which logproto/transport we apply to a specific connection. With these renames, it's much easier to follow what happens and why. NOTE: there's a followup bugfix that fixes the same bug as axoflow#482. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
"auto" has originally been planned to auto-detect TLS as well as framing format, but at this point it does not do TLS auto-detection. But this means that transport(auto) with tls() options set will start reading data without SSL, e.g. the encrypted stuff will make it into the messages received. This patch fixes that for both the syslog() and the network() driver. The only change is that delegate_tls_start_to_logproto is FALSE for the "auto" case. This will be changed once the TLS auto detection feature is also in. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
… transports Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Instead of just exercising the proxyprotocol try all valid transports, including the "auto" variants. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
e8322f7
to
6344ea8
Compare
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.
I've started manual-testing the generic- and TLS-related transport changes (I think we need thorough testing since this touches core functionality).
I've tested the TLS-related changes on a real network connection through multiple hops, it works as expected. |
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This was a one-off allocation, but it's better if it is freed. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
d05bb69
to
704ded6
Compare
@MrAnno I've resolved the memory leak and did not add BIO_set_nbio() call and resolved your comments. Let me know if you agree. Thanks |
This is a large refactor of the HAProxy support, and preparations for protocol auto detection. It also changes the HAProxy support to use the standard source/destination addresses in LogMessage, instead of a proxy specific values e.g. $SOURCEIP instead of $PROXIED_SRCIP.
Short summary of the patches: