andyhuangdev opened a new pull request, #11812:
URL: https://github.com/apache/ozone/pull/11812

   ## What changes were proposed in this pull request?
   
   S3SecretManagerImpl.getSecretString() now delegates to getSecret() so both 
methods treat a cache entry marked as deleted as absent.
   
   Revoking an S3 secret marks its cache entry as deleted until the double 
buffer flush cleans it up. Previously, getSecretString() ignored this marker 
and returned the old secret. Reusing getSecret() prevents returning the revoked 
secret or reading it back from the store before the revoke is flushed, and 
throws OzoneSecurityException with S3_SECRET_NOT_FOUND.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-17200](https://issues.apache.org/jira/browse/HDDS-17200)
   
   ## How was this patch tested?
   
   Added TestS3GetSecretRequest.testGetSecretStringOfRevokedSecret, which 
revokes a secret without flushing while retaining the persisted secret. It 
verifies that the cache entry is marked as deleted, getSecret() returns null, 
and getSecretString() throws S3_SECRET_NOT_FOUND.
   
   The regression test failed before the fix and passed afterward. All 75 
related unit tests passed, including S3 secret requests, delegation token 
validation, S3 signing key derivation, S3 security utilities, and double buffer 
tests.
   
   Full-project checkstyle and git diff --check also passed.
   


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