-
Notifications
You must be signed in to change notification settings - Fork 123
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
Refactor PolarisMetaStoreManager interface into multiple interfaces #417
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, +1 to splitting. If the secrets manager will be specific to handling first-party auth, consider renaming it to PolarisPrincipalSecretsManager
for clarity, or if it'll likely have some kinds of generic secret-management stuff for things like creating wrapped keys, encrypting/decrypting on the backend impl, then maybe better to leave it as you have it.
import org.jetbrains.annotations.Nullable; | ||
|
||
/** Manages secrets for Polaris principals. */ | ||
public interface PolarisSecretsManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we have other types of stored secrets for outbound integrations/connections, we might have a different interface like "PolarisIntegrationSecretsManager" -- are you envisioning combining all different types of secrets into this interface, or would we split first-party principal auth-related management here (e.g. we might call this one PolarisPrincipalSecretsManager
and keep it under this auth
directory) from outbound integration secret management, possibly keeping PolarisIntegrationSecretsManager
under the persistence
directory?
If it's generally a good idea, do you mind to hold this for a few days ? The reason that it would break the current Quarkus branch. I'm proposing:
|
Hey @jbonofre - I have a branch at https://github.com/jbonofre/polaris/compare/QUARKUS...collado-mike:polaris:patch-1?expand=1 that has this change merged into your Quarkus branch. The code compiles, though when I run the tests locally, it fails due to missing Can we merge that change into your branch and move forward with this refactoring in main? |
Description
PolarisMetaStoreManager
is a monolithic interface that captures persistence, storage credential vending, remote cache, and grant management. This makes it easy to tie together many things that shouldn't be tied together - for example, the authorizer has dependencies on the cache types, so that it's impossible to make authorization pluggable using different grant rules.This change strictly splits up the interface into multiple interfaces, but the single
PolarisMetaStoreManager
is still an extension of the others. Where it is possible to refer to specific interfaces, (e.g., the Resolver and the EntityCache), the references are changed, but we don't have factory types to generate realm-specific implementations of all interfaces and the PR was growing far too large when I started on that path.Future PRs would update components to refer to specific interfaces and to break the tie between the PolarisMetaStoreManager interface and the others. The PolarisMetaStoreManagerImpl may continue to implement all interfaces.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Interface only change - all existing tests continue to pass.
Test Configuration:
Checklist:
Please delete options that are not relevant.