dimas-b commented on code in PR #2197: URL: https://github.com/apache/polaris/pull/2197#discussion_r2297960621
########## persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java: ########## @@ -773,6 +773,49 @@ public PolarisPrincipalSecrets generateNewPrincipalSecrets( return principalSecrets; } + @Nullable + @Override + public PolarisPrincipalSecrets resetPrincipalSecrets( + @Nonnull PolarisCallContext callCtx, + @Nonnull String clientId, + long principalId, + String customClientId, + String customClientSecret) { + + PolarisPrincipalSecrets principalSecrets; + if (customClientId == null) { + principalSecrets = new PolarisPrincipalSecrets(principalId, clientId, customClientSecret); + } else { + principalSecrets = + new PolarisPrincipalSecrets(principalId, customClientId, customClientSecret); + } + try { + ModelPrincipalAuthenticationData modelPrincipalAuthenticationData = + ModelPrincipalAuthenticationData.fromPrincipalAuthenticationData(principalSecrets); + datasourceOperations.executeUpdate( + QueryGenerator.generateInsertQuery( Review Comment: I mean that at the level of `storePrincipalSecrets()` we already know what the client ID should be. I think it should be fine to resolve `clientId` vs. `customClientId` at a higher level (before calling this method). -- 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-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org