fmorg-git opened a new pull request, #11952:
URL: https://github.com/apache/ozone/pull/11952

   Please describe your PR in detail:
   * RevokedSTSTokenCleanupService submits a delete for a revocation cutoff 
once now - cutoff > CLEANUP_THRESHOLD, with now taken from the clock of the OM 
that runs the cleanup and CLEANUP_THRESHOLD equal to 
S3STSUtils.MAX_DURATION_SECONDS (12 hours). A token covered by the cutoff has a 
creationTime before the cutoff and a duration of at most 12 hours, so its 
expiry is before cutoff plus 12 hours. With a single clock the cutoff therefore 
outlives every token it covers, with no slack.
   
   Token expiry is checked in STSSecurityUtil against the clock of the OM that 
validates the request. When the purging OM's clock is ahead of the validating 
OM's, the cutoff can be deleted while a token it covers has not yet expired on 
the validating OM's clock.
   
   Trigger
   The purging OM's clock is ahead of the validating OM's by more than (cutoff 
minus the token's creationTime) plus the time between cutoff plus 12 hours and 
the cleanup run that deletes the cutoff 
(ozone.om.sts.token.cleanup.service.interval, 3 hours by default), for a token 
whose duration is close to 12 hours.
   
   Impact
   At this commit S3DeleteRevokedSTSTokensResponse deletes only the DB row. OMs 
that keep the table in memory still hold the cached cutoff; an OM whose table 
is loaded from the DB after the delete has no cutoff for the key. This patch 
should land before or with 
[HDDS-17406](https://issues.apache.org/jira/browse/HDDS-17406), because with 
that change the purge also removes the cutoff from the table cache on every OM, 
not only from the DB.
   S3SecurityUtil.isRevokedStsToken reads that state, so on such an OM the 
revocation check finds no cutoff for tokens the deleted cutoff covered, until 
they expire on its clock. The window is bounded by the clock difference.
   No data is lost or changed. STS is not part of a released Ozone version.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-17407
   
   ## How was this patch tested?
   unit tests, ci workflows
   


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