Skip to content

Commit c963625

Browse files
committed
Restored debug logging
Signed-off-by: Nils Bandener <[email protected]>
1 parent 65375fd commit c963625

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/org/opensearch/security/user/ThreadContextUserInfo.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
import java.util.HashMap;
1414
import java.util.StringJoiner;
1515

16+
import org.apache.logging.log4j.LogManager;
17+
import org.apache.logging.log4j.Logger;
18+
1619
import org.opensearch.common.settings.ClusterSettings;
1720
import org.opensearch.common.settings.Settings;
1821
import org.opensearch.common.util.concurrent.ThreadContext;
@@ -35,6 +38,8 @@
3538
* Moved from https://github.com/opensearch-project/security/blob/d29095f26dba1a26308c69b608dc926bd40c0f52/src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java#L293
3639
*/
3740
public class ThreadContextUserInfo {
41+
protected static final Logger log = LogManager.getLogger(ThreadContextUserInfo.class);
42+
3843
private static final String READ_ACCESS = "READ";
3944
private static final String WRITE_ACCESS = "WRITE";
4045
private static final String NO_ACCESS = "NONE";
@@ -77,6 +82,7 @@ public void setUserInfoInThreadContext(PrivilegesEvaluationContext context) {
7782

7883
String tenantAccessToCheck = getTenancyAccess(context);
7984
joiner.add(tenantAccessToCheck);
85+
log.debug("userInfo: {}", joiner);
8086

8187
if (userAttributeSerializationEnabled) {
8288
joiner.add(Base64Helper.serializeObject(new HashMap<>(context.getUser().getCustomAttributesMap())));

0 commit comments

Comments
 (0)