Closed dspruell closed 7 years ago
Hi,
That's should be the case yet. When there's no auth the username is set to -
in access.log file. When SquidAnalyzer found such a value for the login name, it is replaced by the client ip address and then if UseClientDNSName is enabled and a hostname is found, the login name (client ip address in this case) is replaced by the name returned by gethostbyaddr(). So when it is checked against a user alias, it is checked as a hostname, not an ip address.
Regards,
D'oh. I should have tried what I submitted beforehand, of course it does work. My mistake was looking at the documentation header on the file to literally since it mentions only IP address | login name.
Is it possible to update the documentation to clarify that the right hand side can be a hostname when UseClientDNSName is enabled?
Also is it possible to allow space (0x20) in the username, since tabulation is used as the field separator in the file?
Documentation fixed with commit 31467ff.
And yes you can use withe space in user name, the field separator is the tabulation. When using auth_proxy Squid replace the space in login name by %20 in access.log, this is also supported by SquidAnalyzer.
Thanks for the clarification. I just want to check on the documentation as the comment header in user-aliases file notes:
...Space in user name are not allowed
Should the documentation be updated, since spaces may be used in the username?
Commit bc2bfa2 update the documentation and user-aliases file. Thanks for the report.
The
UserAlias
map allows IP address or login name patterns on the right hand side, and on my installation I do not use proxy auth but I useUseClientDNSName
to report the client's identity. Would it be possible to extend UserAlias syntax to allow matching on the client DNS name in addition to IP address? For example: