bharos opened a new pull request, #10023:
URL: https://github.com/apache/gravitino/pull/10023

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): support xxx"
        - "[#233] fix: check null before access result in xxx"
        - "[MINOR] refactor: fix typo in variable name"
        - "[MINOR] docs: fix typo in README"
        - "[#255] test: fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   
   Fix: override getMetalakeName() to read the gravitino-metalake config 
property (IcebergConstants.GRAVITINO_METALAKE), falling back to the default 
only if unset. This mirrors the existing behavior in 
DynamicIcebergConfigProvider.
   
   ### Why are the changes needed?
   
   When authorization is enabled, IcebergRESTServerContext calls 
getMetalakeName() at startup to determine which Gravitino metalake to check 
privileges against. StaticIcebergConfigProvider did not override this method, 
so it always returned the hardcoded default "gravitino" regardless of 
configuration. This caused every Iceberg REST request to fail with 403 when 
auth was enabled and the actual metalake name was anything other than 
"gravitino".
   
   Fix: #(issue)
   
   ### Does this PR introduce _any_ user-facing change?
   
   no
   
   ### How was this patch tested?
   
   Added unit test


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

Reply via email to