[
https://issues.apache.org/jira/browse/YARN-11738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899815#comment-17899815
]
ASF GitHub Bot commented on YARN-11738:
---------------------------------------
brumi1024 commented on code in PR #7144:
URL: https://github.com/apache/hadoop/pull/7144#discussion_r1850611197
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java:
##########
@@ -111,12 +117,26 @@ public void checkAvailableForRead() throws
StandbyException {
/**
* The name of the hashing algorithm.
*/
+ private static final String HMAC_ALGORITHM =
"hadoop.security.hmac-algorithm";
private static final String DEFAULT_HMAC_ALGORITHM = "HmacSHA1";
+ private static final String SELECTED_ALGORITHM;
/**
* The length of the random keys to use.
*/
- private static final int KEY_LENGTH = 64;
+ private static final String HMAC_LENGTH = "hadoop.security.hmac-length";
+ private static final int DEFAULT_HMAC_LENGTH = 64;
+ private static final int SELECTED_LENGTH;
+
+ static {
+ Configuration conf = new Configuration();
+ String algorithm = conf.get(HMAC_ALGORITHM, DEFAULT_HMAC_ALGORITHM);
Review Comment:
I might be missing something, is this config introduced in a different PR?
> Modernize SecretManager config
> ------------------------------
>
> Key: YARN-11738
> URL: https://issues.apache.org/jira/browse/YARN-11738
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: yarn
> Affects Versions: 3.4.1
> Reporter: Bence Kosztolnik
> Assignee: Bence Kosztolnik
> Priority: Major
> Labels: pull-request-available
>
> FIPS-compliant HMAC-SHA1 algorithms require secret keys to be at least 112
> bits long.
> https://github.com/apache/hadoop/blob/98c2bc87b1445c533268c58d382ea4e4297303fd/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java#L144
> Should be set to 128 to be FIPS compatible.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]