You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2025/01/31 22:38:01 UTC
(spark) branch branch-4.0 updated: [SPARK-51053][SQL] Update `CookieSigner` to use `SHA-512`
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new b6c4f8760a6e [SPARK-51053][SQL] Update `CookieSigner` to use `SHA-512`
b6c4f8760a6e is described below
commit b6c4f8760a6e87c0c11b606cfe2ac8f76f5e9c27
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Fri Jan 31 14:37:45 2025 -0800
[SPARK-51053][SQL] Update `CookieSigner` to use `SHA-512`
### What changes were proposed in this pull request?
This PR aims to update `CookieSigner` to use `SHA-512` instead of `SHA-256` since Apache Spark 4.0.0.
### Why are the changes needed?
This is aligned with the upstream change, [HIVE-24287](https://issues.apache.org/jira/browse/HIVE-24287).
- https://github.com/apache/hive/pull/1589
### Does this PR introduce _any_ user-facing change?
Only the signature of message is changed. There is no user-facing behavior change.
```
$ jshell
| Welcome to JShell -- Version 21.0.6
| For an introduction type: /help intro
jshell> java.security.MessageDigest.getInstance("SHA-256")
$1 ==> SHA-256 Message Digest from AppleBundledACCP, <initialized>
jshell> java.security.MessageDigest.getInstance("SHA-512")
$2 ==> SHA-512 Message Digest from AppleBundledACCP, <initialized>
```
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #49753 from dongjoon-hyun/SPARK-51053.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
(cherry picked from commit a9d194d0020b88c819ddaea8917f90ede981bae2)
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../src/main/java/org/apache/hive/service/CookieSigner.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sql/hive-thriftserver/src/main/java/org/apache/hive/service/CookieSigner.java b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/CookieSigner.java
index b94b0a8e8328..0572ec5ac08f 100644
--- a/sql/hive-thriftserver/src/main/java/org/apache/hive/service/CookieSigner.java
+++ b/sql/hive-thriftserver/src/main/java/org/apache/hive/service/CookieSigner.java
@@ -32,7 +32,7 @@ import org.apache.spark.internal.SparkLoggerFactory;
*/
public class CookieSigner {
private static final String SIGNATURE = "&s=";
- private static final String SHA_STRING = "SHA-256";
+ private static final String SHA_STRING = "SHA-512";
private byte[] secretBytes;
private static final SparkLogger LOG = SparkLoggerFactory.getLogger(CookieSigner.class);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org