You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "collado-mike (via GitHub)" <gi...@apache.org> on 2024/11/14 17:32:43 UTC
Re: [PR] Support providing root client ID via env. variables when bootstrapping [polaris]
collado-mike commented on code in PR #422:
URL: https://github.com/apache/polaris/pull/422#discussion_r1842636341
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/PolarisTreeMapMetaStoreSessionImpl.java:
##########
@@ -448,13 +448,16 @@ public int lookupEntityGrantRecordsVersion(
/** {@inheritDoc} */
@Override
public @NotNull PolarisPrincipalSecrets generateNewPrincipalSecrets(
- @NotNull PolarisCallContext callCtx, @NotNull String principalName, long principalId) {
+ @NotNull PolarisCallContext callCtx,
+ @NotNull String principalName,
+ long principalId,
+ PrincipalSecretsGenerator generator) {
Review Comment:
Same here - rather than passing in the generator as an argument, I think it should be a constructor argument
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/LocalPolarisMetaStoreManagerFactory.java:
##########
@@ -75,17 +76,20 @@ private void initializeForRealm(RealmContext realmContext) {
}
@Override
- public synchronized Map<String, PolarisMetaStoreManager.PrincipalSecretsResult> bootstrapRealms(
- List<String> realms) {
+ public Map<String, PolarisMetaStoreManager.PrincipalSecretsResult> bootstrapRealms(
+ List<String> realms, Function<String, PrincipalSecretsGenerator> rootSecretsPerRealm) {
Review Comment:
I like the `PrincipalSecretsGenerator`. Is it necessary to have it per realm, though? Can it take the realm as a method argument instead
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/PolarisMetaStoreManagerImpl.java:
##########
@@ -698,12 +703,14 @@ private void bootstrapPolarisService(
/** {@inheritDoc} */
@Override
- public @NotNull BaseResult bootstrapPolarisService(@NotNull PolarisCallContext callCtx) {
+ public @NotNull BaseResult bootstrapPolarisService(
+ @NotNull PolarisCallContext callCtx, PrincipalSecretsGenerator rootSecretsGenerator) {
Review Comment:
Rather than changing the public interface, can we make the `PrincipalSecretsGenerator` a constructor param? I don't think callers need to know anything about this
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org