ChenSammi commented on PR #10469:
URL: https://github.com/apache/ozone/pull/10469#issuecomment-4965827488

   @rich7420 , thanks for checking this.  Here is the error I got for object 
ttl test when merged with master.  It's a request send out by OM service of 
object ttl with a ugi.doAs() call to create a trash directory. 
   
   ```
   2026-07-14 13:40:45,415 [om1-OMStateMachineApplyTransactionThread - 0] ERROR 
file.OMDirectoryCreateRequestWithFSO 
(OMDirectoryCreateRequestWithFSO.java:logResult(219)) - Directory creation 
failed. Volume:testMoveToTrashWithTrashPrefix, Bucket:bucket20, 
Key:.Trash/sammi-test/Current. Exception:{}
   UNAUTHORIZED org.apache.hadoop.ozone.om.exceptions.OMException: 
org.apache.hadoop.security.authentication.client.AuthenticationException: User 
info is not set. Please check client auth credentials
        at 
org.apache.hadoop.ozone.om.request.OMClientRequest.createUGIForApi(OMClientRequest.java:391)
        at 
org.apache.hadoop.ozone.om.request.key.OMKeyRequest.getAclsForDir(OMKeyRequest.java:388)
        at 
org.apache.hadoop.ozone.om.request.key.OMKeyRequest.createDirectoryInfoWithACL(OMKeyRequest.java:539)
        at 
org.apache.hadoop.ozone.om.request.key.OMKeyRequest.getAllMissingParentDirInfo(OMKeyRequest.java:448)
        at 
org.apache.hadoop.ozone.om.request.file.OMDirectoryCreateRequestWithFSO.validateAndUpdateCache(OMDirectoryCreateRequestWithFSO.java:138)
        at 
org.apache.hadoop.ozone.protocolPB.OzoneManagerRequestHandler.lambda$handleWriteRequestImpl$0(OzoneManagerRequestHandler.java:451)
        at 
org.apache.hadoop.ozone.util.MetricUtil.captureLatencyNs(MetricUtil.java:45)
        at 
org.apache.hadoop.ozone.protocolPB.OzoneManagerRequestHandler.handleWriteRequestImpl(OzoneManagerRequestHandler.java:449)
        at 
org.apache.hadoop.ozone.protocolPB.RequestHandler.handleWriteRequest(RequestHandler.java:62)
        at 
org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.runCommand(OzoneManagerStateMachine.java:671)
        at 
org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.lambda$applyTransaction$3(OzoneManagerStateMachine.java:474)
        at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1700)
        at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
        at --- Async.Stack.Trace --- (captured by IntelliJ IDEA debugger)
        at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.<init>(CompletableFuture.java:1686)
        at 
java.base/java.util.concurrent.CompletableFuture.asyncSupplyStage(CompletableFuture.java:1714)
        at 
java.base/java.util.concurrent.CompletableFuture.supplyAsync(CompletableFuture.java:1931)
        at 
org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.applyTransaction(OzoneManagerStateMachine.java:474)
        at 
org.apache.ratis.server.impl.RaftServerImpl.applyLogToStateMachine(RaftServerImpl.java:1872)
        at 
org.apache.ratis.server.impl.StateMachineUpdater.applyLog(StateMachineUpdater.java:254)
        at 
org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:193)
        at java.base/java.lang.Thread.run(Thread.java:829)
   ```
   
   We need to support the doAs function in OM, or direct call without doAs in 
OM. Though the current tests in master branch doesn't show any failure, but we 
cannot guarantee how the new code will be written, what's their function will b 
e. It's not a sustainable and recommended way for us to examine all existing 
code, and hoping all new code will not hit the case.  We need a general 
guarantee.  BTW, I don't think there is security loophole of the previous code. 


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to