vanphuoc3012 opened a new issue, #12629:
URL: https://github.com/apache/gravitino/issues/12629

   ### Describe the subtask
   
   When a Hive catalog is configured with `credential-providers=gcs-token` and 
`gcs-service-account-file`, the Gravitino server correctly vends a 
`GCSTokenCredential` (OAuth2 access token). However, the Spark connector's Hive 
path does not consume it.
   
   In `spark-connector/spark-common/.../hive/GravitinoHiveCatalog.java`, 
`applyS3Credential()` only handles `S3SecretKeyCredential`, 
`OSSSecretKeyCredential`, and `AzureAccountKeyCredential`. Any other credential 
type — including `GCSTokenCredential` — falls into the `else` branch and is 
silently dropped with a warning:
   
   ```
   Received unrecognized credential type '...' for Hive catalog, skipping
   ```
   
   As a result, Spark jobs reading GCS-backed Hive tables fail with 
authentication errors even though vending is enabled.
   
   Unlike S3/OSS/Azure (simple key/secret pairs injected as Hadoop config), GCS 
requires setting `fs.gs.auth.access.token.provider.impl` to a class 
implementing `com.google.cloud.hadoop.util.AccessTokenProvider`, so a small 
provider implementation is needed to bridge the pre-vended token into the GCS 
connector.
   
   ### Parent issue
   
   #5063
   


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