zeroflag opened a new pull request, #840:
URL: https://github.com/apache/knox/pull/840
## What changes were proposed in this pull request?
PAM module returns garbage group names due to a thread safety problem:
```
2024-02-07 12:41:44,954 23da5c8b-2664-4c94-a356-fd569eff930c INFO
knox.gateway (KnoxPamRealm.java:doGetAuthorizationInfo(129)) - Computed
roles/groups: [nifire39965:] for principal: knoxui
2024-02-07 12:41:44,956 6778ee4d-f655-4d09-b111-2e28ca3f1d4b INFO
knox.gateway (KnoxPamRealm.java:doGetAuthorizationInfo(129)) - Computed
roles/groups: [mapredx] for principal: knoxui
2024-02-07 12:41:44,957 9829bbe7-ff7f-4c87-9a65-cbc589be7583 INFO
knox.gateway (KnoxPamRealm.java:doGetAuthorizationInfo(129)) - Computed
roles/groups: [mail:x:12] for principal: knoxui
2024-02-07 12:42:03,082 a02943fc-2d6b-402f-b938-041fb64eee0a INFO
knox.gateway (KnoxPamRealm.java:doGetAuthorizationInfo(129)) - Computed
roles/groups: [cdro] for principal: knoxui
```
## How was this patch tested?
By using the following script:
```
#/bin/bash
task(){
curl -vk -u knoxui:knoxui
https://ccycloud-1.amagyar.root.comops.site:8443/gateway/cdp-proxy-api/webhdfs/v1/?op=GETHOMEDIRECTORY
}
for i in {1..15000}
do
echo "$i times"
task &
done
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]