@asanchez75 wrote:
Hello,
I need to select a backend based on jdbc string connection.jdbc:postgresql://localhost:443/mydb
For example, if the jdbc connection contains
postgresql
the request must be redirected to the corresponding backend. I tried to capture content withreq.payload
but I got nothing. I think this is because one of these thee options:
- The jdbc driver encrypts the credentials by default and not way to see it.
- I am working in the wrong tcp layer.
- I am trying to capture
content
when there is not content in this type of request.
The script is this:global log /dev/log local0 log localhost local1 notice maxconn 2000 daemon defaults log global mode tcp timeout connect 5000 timeout client 50000 timeout server 50000 frontend tcp-in mode tcp bind *:443 tcp-request inspect-delay 1s log-format %[capture.req.hdr(0)] tcp-request content capture req.payload(0,0) len 100 tcp-request content capture req.len len 100 tcp-request content accept if WAIT_END acl postgresql req.payload(0,0) -m sub postgresql use_backend postgresql if postgresql acl virtuoso req.payload(0,0) -m sub virtuoso use_backend virtuoso if virtuoso backend postgresql mode tcp option pgsql-check user postgres server postgresql postgresql:5432 check backend virtuoso mode tcp server virtuoso virtuoso:1111 check
Any idea how to overcome this?
Thanks in advance
Posts: 1
Participants: 1