FANNG1 commented on code in PR #5682: URL: https://github.com/apache/gravitino/pull/5682#discussion_r1891751574
########## catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/SecureHadoopCatalogOperations.java: ########## @@ -259,4 +291,40 @@ private void setUser(String apiUser) { Subject subject = Subject.getSubject(context); subject.getPrincipals().add(new UserPrincipal(apiUser)); } + + private Map<String, CredentialContext> getCatalogCredentialContexts() { + CatalogCredentialContext context = + new CatalogCredentialContext(PrincipalUtils.getCurrentUserName()); + Set<String> providers = CredentialUtils.getCredentialProviders(() -> catalogProperties); + return providers.stream().collect(Collectors.toMap(provider -> provider, provider -> context)); + } + + private Map<String, CredentialContext> getFilesetCredentialContexts( + NameIdentifier filesetIdentifier, CredentialPrivilege privilege) { + Fileset fileset = loadFileset(filesetIdentifier); + String location = fileset.storageLocation(); Review Comment: It's hard to do the mapping especially for custom credential provider, how about let it throw a runtime exception? -- 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: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org