This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new f6564946bd [#6745] fix(client,authn): Fix the No key to store error
when Running the Spark connector with a Kerberos ticket cache (#6753)
f6564946bd is described below
commit f6564946bdeb9e9105546ef0ae5f46af2e5884f7
Author: gavin.wang <[email protected]>
AuthorDate: Thu Mar 27 15:20:37 2025 +0800
[#6745] fix(client,authn): Fix the No key to store error when Running the
Spark connector with a Kerberos ticket cache (#6753)
### What changes were proposed in this pull request?
Fix the No key to store error when Running the Spark connector with a
Kerberos ticket cache
### Why are the changes needed?
Fix: #6745
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
local test.
---
.../main/java/org/apache/gravitino/auth/KerberosUtils.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/common/src/main/java/org/apache/gravitino/auth/KerberosUtils.java
b/common/src/main/java/org/apache/gravitino/auth/KerberosUtils.java
index 690ecf38cc..78b40a813c 100644
--- a/common/src/main/java/org/apache/gravitino/auth/KerberosUtils.java
+++ b/common/src/main/java/org/apache/gravitino/auth/KerberosUtils.java
@@ -122,18 +122,18 @@ public class KerberosUtils {
options.put("useKeyTab", "true");
options.put("keyTab", keyTabFile);
options.put("storeKey", "true");
+ } else {
+ options.put("useTicketCache", "true");
+ String ticketCache = System.getenv("KRB5CCNAME");
+ if (ticketCache != null) {
+ options.put("ticketCache", ticketCache);
+ }
+ options.put("renewTGT", "true");
}
-
options.put("principal", principal);
options.put("doNotPrompt", "true");
- options.put("useTicketCache", "true");
- options.put("renewTGT", "true");
options.put("refreshKrb5Config", "true");
options.put("isInitiator", "true");
- String ticketCache = System.getenv("KRB5CCNAME");
- if (ticketCache != null) {
- options.put("ticketCache", ticketCache);
- }
options.put("debug", "true");
return new AppConfigurationEntry[] {