Skip to content

Commit

Permalink
HDDS-11587. Ozone Manager not processing file put requests with multi…
Browse files Browse the repository at this point in the history
…-tenancy enabled (#7316)
  • Loading branch information
ChenSammi authored Nov 5, 2024
1 parent 786bb49 commit 0fb5e50
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,15 @@ public RangerClientMultiTenantAccessController(OzoneConfiguration conf)

LOG.info("authType = {}, login user = {}", authType, usernameOrPrincipal);

client = new RangerClient(rangerHttpsAddress,
authType, usernameOrPrincipal, passwordOrKeytab,
rangerServiceName, OzoneConsts.OZONE);
UserGroupInformation loginUser = UserGroupInformation.getLoginUser();
try {
client = new RangerClient(rangerHttpsAddress,
authType, usernameOrPrincipal, passwordOrKeytab,
rangerServiceName, OzoneConsts.OZONE);
} finally {
// set back the expected login user
UserGroupInformation.setLoginUser(loginUser);
}

// Whether or not the Ranger credentials are valid is unknown right after
// RangerClient initialization here. Because RangerClient does not perform
Expand Down

0 comments on commit 0fb5e50

Please sign in to comment.