Copilot commented on code in PR #10968:
URL: https://github.com/apache/gravitino/pull/10968#discussion_r3192778288


##########
authenticators/authenticator-basic/src/test/java/org/apache/gravitino/auth/local/password/TestArgon2idPasswordHasher.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.auth.local.password;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class TestArgon2idPasswordHasher {
+
+  private final PasswordHasher passwordHasher = new Argon2idPasswordHasher();
+
+  @Test
+  public void testHashProducesArgon2idPhcString() {
+    String hashedPassword = passwordHasher.hash("test-password");
+
+    Assertions.assertTrue(hashedPassword.startsWith("$argon2id$"));
+  }

Review Comment:
   The PHC-format assertion here only checks the `$argon2id$` prefix. Since the 
design/issue explicitly requires storing PHC-style strings with parameters 
(e.g., including `v=19` and the chosen `m=65536,t=3,p=1` cost settings), 
strengthen the test to validate the full PHC structure/parameters so 
regressions (like returning a non-PHC string or wrong cost parameters) are 
caught.



##########
gradle/libs.versions.toml:
##########
@@ -191,6 +192,7 @@ jersey-test-framework-provider-jetty = { group = 
"org.glassfish.jersey.test-fram
 jodd-core = { group = "org.jodd", name = "jodd-core", version.ref = "jodd" }
 mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = 
"mockito" }
 mockito-inline = { group = "org.mockito", name = "mockito-inline", version.ref 
= "mockito" }
+argon2-jvm = { group = "de.mkammerer", name = "argon2-jvm", version.ref = 
"argon2" }

Review Comment:
   A new runtime dependency (`de.mkammerer:argon2-jvm`) is introduced, but the 
repository’s binary LICENSE/NOTICE inventories (e.g., LICENSE.bin / NOTICE.bin, 
which are packaged into published JARs) are not updated to include the new 
third-party component and its license/notice information. Please add the 
required entries (and any corresponding files under `licenses/` if that’s the 
project’s convention) to keep ASF license compliance intact.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to