ChenSammi commented on PR #10469:
URL: https://github.com/apache/ozone/pull/10469#issuecomment-4967025008
> Thanks @ChenSammi, and yeah, you're right. Nice catch on the repro. Let's
go ahead with the revert. I see what I missed now. I was only looking at
preExecute, but createUGIForApi() also gets hit from validateAndUpdateCache via
getAclsForDir when a directory is created, so an internal doAs() write runs
into it on the apply path. The old code leaned on getCurrentUser(), which
inside the service's doAs() block is the actual caller, and I dropped that.
Agree with you that a general guarantee is the way to go here. If I take
another run at it later, I think the original goal ("don't fall back to the
starter user") still works without killing the fallback: keep getCurrentUser(),
just skip it when it's the OM starter user. doAs() calls keep working, and a
genuinely userless request falls through to nothing and fails closed. And point
taken on deriving the identity in OM instead of trusting the client's UserInfo.
I'd also make sure to cover the object TTL path with a test this time, sin
ce that's what I missed. Happy to redo it that way once the revert lands, or
all yours if you'd rather. Thanks again for digging in.
Can you do the revert? I can approve it.
--
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]