Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4714

Mask sensitive data in logs

$
0
0

@ndan wrote:

I’m trying to hide sensitive data from the logs.

Example: www.example.com/api?token=sensitive&order_by=id
I want to mask/hide “sensitive”, (eg /api?token=****&order_by=id)

regsub() doesn’t work due to the parser limitation (] and ) are not allowed), so I can’t use regsub(token=[^&]+,token=****,gi)

# In this example regsub removes everything after token, but I want to mask only token and keep the rest
log-format "%[capture.req.uri,regsub(token=.+,token=****,g)]" #  => /api?token=****

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4714

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>