jerryshao commented on code in PR #5682: URL: https://github.com/apache/gravitino/pull/5682#discussion_r1891664330
########## 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: Do you need to check if the location and the provider is mapped? For example, what if the storage location is s3 and we don't have s3 credential provider? -- 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