Hello,

On Tue, 8 Jun 2021 at 17:36, Godfrin, Philippe E
<philippe.godf...@nov.com> wrote:
>
> Certainly,
>
> Postrgres sends this message across the wire:
>
> Jun  2 21:14:40 ip-172-31-77-193 haproxy[9031]: #0110x000000: 00 00 00 4c 00 
> 03 00 00   75 73 65 72 00 74 73 64   |...L....user.tsd|
> Jun  2 21:14:40 ip-172-31-77-193 haproxy[9031]: #0110x000010: 62 00 64 61 74 
> 61 62 61   73 65 00 74 73 64 62 00   |b.database.tsdb.|
> Jun  2 21:14:40 ip-172-31-77-193 haproxy[9031]: #0110x000020: 61 70 70 6c 69 
> 63 61 74   69 6f 6e 5f 6e 61 6d 65   |application_name|
> Jun  2 21:14:40 ip-172-31-77-193 haproxy[9031]: #0110x000030: 00 70 73 71 6c 
> 00 63 6c   69 65 6e 74 5f 65 6e 63   |.psql.client_enc|
> Jun  2 21:14:40 ip-172-31-77-193 haproxy[9031]: #0110x000040: 6f 64 69 6e 67 
> 00 55 54   46 38 00 00               |oding.UTF8..|
>
>
>
> Bytes, 8 – are user\0 Byte 13 starts the userid. I would like to be able to 
> test that userid and make a routing decision on that. This is what the 
> HAProxy docs suggest:
>
>
>
> acl check-rw req.payload(8,32),hex -m sub  757365720074736462727700

And don't see how this is supposed to match?

62727700 is not what it's in your trace.

Is the username tsdb, like in your trace, or is it tsdbrw, like in your ACL?


Also, put a "tcp-request inspect-delay 5s" in front of the ACL (you
can optimize performance later) and share the entire configuration.


Please try to ask the actual question directly next time, so we can
help you right away (https://xyproblem.info/).



Thanks,
Lukas

Reply via email to