You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by di...@apache.org on 2022/11/29 15:45:11 UTC
[oozie] branch master updated: OOZIE-3676 Remove all non FIPS compliant encoding algorithms (jmakai via dionusos)
This is an automated email from the ASF dual-hosted git repository.
dionusos pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/oozie.git
The following commit(s) were added to refs/heads/master by this push:
new b63ad079b OOZIE-3676 Remove all non FIPS compliant encoding algorithms (jmakai via dionusos)
b63ad079b is described below
commit b63ad079b56ab4446c1182cf3863edc4af13fe33
Author: Denes Bodo <di...@apache.org>
AuthorDate: Tue Nov 29 16:40:40 2022 +0100
OOZIE-3676 Remove all non FIPS compliant encoding algorithms (jmakai via dionusos)
---
.../main/java/org/apache/oozie/action/hadoop/LauncherHelper.java | 5 +++--
.../test/java/org/apache/oozie/action/hadoop/TestLauncher.java | 8 ++++++++
release-log.txt | 1 +
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/core/src/main/java/org/apache/oozie/action/hadoop/LauncherHelper.java b/core/src/main/java/org/apache/oozie/action/hadoop/LauncherHelper.java
index 4c74b73ce..dfad0085b 100644
--- a/core/src/main/java/org/apache/oozie/action/hadoop/LauncherHelper.java
+++ b/core/src/main/java/org/apache/oozie/action/hadoop/LauncherHelper.java
@@ -155,9 +155,10 @@ public class LauncherHelper {
}
public static String getTag(String launcherTag) throws NoSuchAlgorithmException {
- MessageDigest digest = MessageDigest.getInstance("MD5");
+ MessageDigest digest = MessageDigest.getInstance("SHA-384");
digest.update(launcherTag.getBytes(StandardCharsets.UTF_8), 0, launcherTag.length());
- return "oozie-" + new BigInteger(1, digest.digest()).toString(16);
+
+ return "oozie-" + new BigInteger(1, digest.digest()).toString(16).substring(0, 64);
}
public static boolean isMainDone(RunningJob runningJob) throws IOException {
diff --git a/core/src/test/java/org/apache/oozie/action/hadoop/TestLauncher.java b/core/src/test/java/org/apache/oozie/action/hadoop/TestLauncher.java
index b78ff168d..36f76d819 100644
--- a/core/src/test/java/org/apache/oozie/action/hadoop/TestLauncher.java
+++ b/core/src/test/java/org/apache/oozie/action/hadoop/TestLauncher.java
@@ -33,6 +33,7 @@ import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.URI;
import java.nio.charset.StandardCharsets;
+import java.security.NoSuchAlgorithmException;
public class TestLauncher extends XFsTestCase {
@@ -129,6 +130,13 @@ public class TestLauncher extends XFsTestCase {
assertEquals("aa.jar#aa.jar", actionConf.get("mapreduce.job.cache.files"));
}
+
+ // tests whether the job tag generation works as expected
+ public void testGetTag() throws NoSuchAlgorithmException {
+ assertEquals("oozie-3c9c30d9f665e74d515c842960d4a451c83a0125fd3de7392d7b37231af10c72",
+ LauncherHelper.getTag("foobar"));
+ }
+
public void testCopyFileMultiplex() throws Exception {
String contents = "Hello World!\nThis is Oozie";
File src = new File(getTestCaseDir(), "src.txt");
diff --git a/release-log.txt b/release-log.txt
index 0c0120670..ffee90849 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
-- Oozie 5.3.0 release (trunk - unreleased)
+OOZIE-3676 Remove all non FIPS compliant encoding algorithms (jmakai via dionusos)
OOZIE-3674 Add a --insecure like parameter to Oozie client so it can ignore certificate errors (jmakai via dionusos)
OOZIE-3673 Add possibility to configure custom SSL/TLS protocols when executing an email action (jmakai via dionusos)
OOZIE-3675 Upgrade Mockito from 2 to 3.11.2 (jmakai via dionusos)