This is an automated email from the ASF dual-hosted git repository.

singhpk234 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new da0ceff74 Don't rotate root's credentials on startup in 
JdbcMetaStoreManagerFactory (#1804)
da0ceff74 is described below

commit da0ceff74a9516e35ddc00b7433e24c499f133df
Author: Eric Maynard <eric.maynard+...@snowflake.com>
AuthorDate: Tue Jun 3 17:09:20 2025 -0700

    Don't rotate root's credentials on startup in JdbcMetaStoreManagerFactory 
(#1804)
---
 .../jdbc/JdbcMetaStoreManagerFactory.java          | 25 ++++++----------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git 
a/persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java
 
b/persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java
index 3c09b50be..e3547eb2f 100644
--- 
a/persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java
+++ 
b/persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java
@@ -38,7 +38,6 @@ import org.apache.polaris.core.entity.PolarisEntity;
 import org.apache.polaris.core.entity.PolarisEntityConstants;
 import org.apache.polaris.core.entity.PolarisEntitySubType;
 import org.apache.polaris.core.entity.PolarisEntityType;
-import org.apache.polaris.core.entity.PolarisPrincipalSecrets;
 import org.apache.polaris.core.persistence.AtomicOperationMetaStoreManager;
 import org.apache.polaris.core.persistence.BasePersistence;
 import org.apache.polaris.core.persistence.MetaStoreManagerFactory;
@@ -219,8 +218,7 @@ public class JdbcMetaStoreManagerFactory implements 
MetaStoreManagerFactory {
 
   /**
    * This method bootstraps service for a given realm: i.e. creates all the 
needed entities in the
-   * metastore and creates a root service principal. After that we rotate the 
root principal
-   * credentials.
+   * metastore and creates a root service principal.
    */
   private PrincipalSecretsResult 
bootstrapServiceAndCreatePolarisPrincipalForRealm(
       RealmContext realmContext, PolarisMetaStoreManager metaStoreManager) {
@@ -257,22 +255,13 @@ public class JdbcMetaStoreManagerFactory implements 
MetaStoreManagerFactory {
             PolarisEntityType.PRINCIPAL,
             PolarisEntitySubType.NULL_SUBTYPE,
             PolarisEntityConstants.getRootPrincipalName());
-    PolarisPrincipalSecrets secrets =
-        metaStoreManager
-            .loadPrincipalSecrets(
-                polarisContext,
-                PolarisEntity.of(rootPrincipalLookup.getEntity())
-                    .getInternalPropertiesAsMap()
-                    .get(PolarisEntityConstants.getClientIdPropertyName()))
-            .getPrincipalSecrets();
-    PrincipalSecretsResult rotatedSecrets =
-        metaStoreManager.rotatePrincipalSecrets(
+    PrincipalSecretsResult secrets =
+        metaStoreManager.loadPrincipalSecrets(
             polarisContext,
-            secrets.getPrincipalClientId(),
-            secrets.getPrincipalId(),
-            false,
-            secrets.getMainSecretHash());
-    return rotatedSecrets;
+            PolarisEntity.of(rootPrincipalLookup.getEntity())
+                .getInternalPropertiesAsMap()
+                .get(PolarisEntityConstants.getClientIdPropertyName()));
+    return secrets;
   }
 
   /**

Reply via email to