%u is always "-" in access log of ranger and kms?

defaultAccessLogPattern = servername.equalsIgnoreCase(KMS_SERVER_NAME) ? "%h %l 
%u %t \"%m %U\" %s %b" : "%h %l %u %t \"%r\" %s %b";

%l - Remote logical username from identd (always returns '-')
%u - Remote user that was authenticated (if any), else '-'

I have configured ranger and kms with Kerberos authentication, but both %l and 
%u field in access log are always "-".
Is that the expected behavior?

==> ranger_kms/log/access-localhost-2022-02-16.18.log <==
10.10.137.131 - - [16/Feb/2022:18:06:28 +0800] "GET /kms/v1/keys/names" 200 40
10.10.137.131 - - [16/Feb/2022:18:07:44 +0800] "GET /kms/v1/keys/names" 200 40
10.10.137.131 - - [16/Feb/2022:18:07:59 +0800] "GET /kms/v1/keys/names" 200 40

==> ranger_kms/log/access-localhost-2022-02-17.log <==
10.10.137.131 - - [17/Feb/2022:03:55:57 +0000] "GET 
/service/plugins/secure/policies/download/kmsdev?supportsPolicyDeltas=false&pluginId=kms@ranger_kms-kmsdev&clusterName=&lastActivationTime=0&pluginCapabilities=1ffff&lastKnownVersion=-1
 HTTP/1.1" 401 - "-" "Java/1.8.0_292"
10.10.137.131 - - [17/Feb/2022:03:55:57 +0000] "GET 
/service/plugins/secure/policies/download/kmsdev?supportsPolicyDeltas=false&pluginId=kms@ranger_kms-kmsdev&clusterName=&lastActivationTime=0&pluginCapabilities=1ffff&lastKnownVersion=-1
 HTTP/1.1" 200 4756 "-" "Java/1.8.0_292"
0:0:0:0:0:0:0:1 - - [17/Feb/2022:03:55:59 +0000] "GET /service/metrics/status 
HTTP/1.1" 200 795 "-" "curl/7.29.0"
10.10.137.131 - - [17/Feb/2022:03:56:28 +0000] "GET 
/service/roles/secure/download/kmsdev?pluginId=kms@ranger_kms-kmsdev&clusterName=&lastActivationTime=1645070157863&pluginCapabilities=1ffff&lastKnownRoleVersion=3
 HTTP/1.1" 304 - "-" "Java/1.8.0_292"
10.10.137.131 - - [17/Feb/2022:03:56:28 +0000] "GET 
/service/plugins/secure/policies/download/kmsdev?supportsPolicyDeltas=false&pluginId=kms@ranger_kms-kmsdev&clusterName=&lastActivationTime=1645070158090&pluginCapabilities=1ffff&lastKnownVersion=27
 HTTP/1.1" 304 - "-" "Java/1.8.0_292"

172.20.9.129 - - [17/Feb/2022:03:58:31 +0000] "GET 
/libs/bower/requirejs/js/require.js HTTP/1.1" 200 86483 
"http://10.10.137.131:6080/index.html"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 
10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15"
172.20.9.129 - - [17/Feb/2022:03:58:32 +0000] "GET 
/scripts/Main.min.js?ver=2.2.0 HTTP/1.1" 200 2592368 
"http://10.10.137.131:6080/index.html"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 
10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15"
172.20.9.129 - - [17/Feb/2022:03:58:33 +0000] "GET /service/plugins/csrfconf 
HTTP/1.1" 200 258 "http://10.10.137.131:6080/index.html"; "Mozilla/5.0 
(Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) 
Version/15.3 Safari/605.1.15"
172.20.9.129 - - [17/Feb/2022:03:58:33 +0000] "GET 
/service/users/profile?_=1645070371919 HTTP/1.1" 200 1500 
"http://10.10.137.131:6080/index.html"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 
10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15"
172.20.9.129 - - [17/Feb/2022:03:58:33 +0000] "GET /images/avatar.png HTTP/1.1" 
200 761 "http://10.10.137.131:6080/index.html"; "Mozilla/5.0 (Macintosh; Intel 
Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 
Safari/605.1.15"
172.20.9.129 - - [17/Feb/2022:03:58:33 +0000] "GET /service/plugins/checksso 
HTTP/1.1" 200 15 "http://10.10.137.131:6080/index.html"; "Mozilla/5.0 
(Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) 
Version/15.3 Safari/605.1.15"
172.20.9.129 - - [17/Feb/2022:03:58:33 +0000] "GET 
/service/plugins/definitions?page=0&pageSize=25&startIndex=0&sortBy=serviceTypeId&_=1645070371920
 HTTP/1.1" 200 19939 "http://10.10.137.131:6080/index.html"; "Mozilla/5.0 
(Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) 
Version/15.3 Safari/605.1.15"







Reply via email to