Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#5842] feat(core): supports credential REST endpoint in Gravitino server #5841

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented Dec 12, 2024

What changes were proposed in this pull request?

add credential REST endpoint in Gravitino server

Why are the changes needed?

Fix: #5842

Does this PR introduce any user-facing change?

no

How was this patch tested?

add UT and run test in POC

@FANNG1 FANNG1 marked this pull request as draft December 12, 2024 06:54
@FANNG1 FANNG1 changed the title [SIP] feat(core): supports credential server API [#5842] feat(core): supports credential REST endpoint in Gravitino server Dec 12, 2024
@FANNG1 FANNG1 marked this pull request as ready for review December 12, 2024 09:00
@FANNG1
Copy link
Contributor Author

FANNG1 commented Dec 12, 2024

@yuqi1129 @jerryshao please help to review , thanks

new CredentialResponse(
DTOConverters.toDTO(credentials.toArray(new Credential[credentials.size()]))));
});
} catch (Exception e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that this exception will not contain any sensitive information?
The control flow shows that some of these information are logged and printed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the sensitive credential information is not logged.

"Load credentials is not implemented for catalog: %s, identifier: %s",
catalog.name(), identifier));
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need catalog to load credentials?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. use catalog classloader to load credential packages
  2. use catalog operations to load fileset, schema, and catalog properties to choose the correct credential provider.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Dec 17, 2024

@jerryshao any other comments?

@jerryshao
Copy link
Contributor

My feeling is that this XXXOperationDispatcher is being obsessively used everywhere, I don't see a strong reason to use it, I would suggest to avoid this dispatcher pattern if unnecessary.

@jerryshao
Copy link
Contributor

If you want to use the method in OperationDispatcher, you can choose to let CredentialManager to inherit this class, or mixin into this CredentialManager.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Dec 17, 2024

If you want to use the method in OperationDispatcher, you can choose to let CredentialManager to inherit this class, or mixin into this CredentialManager.

refactored with CredentialManager

@jerryshao jerryshao merged commit 94c6a72 into apache:main Dec 17, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] supports credential REST endpoint in Gravitino server side
3 participants