kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-3356) Constant in SecretKeySpec
Date Wed, 26 Sep 2018 01:57:00 GMT

    [ https://issues.apache.org/jira/browse/KYLIN-3356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628152#comment-16628152
] 

ASF GitHub Bot commented on KYLIN-3356:
---------------------------------------

asfgit commented on issue #258: KYLIN-3356 Constant in SecretKeySpec
URL: https://github.com/apache/kylin/pull/258#issuecomment-424558580
 
 
   Can one of the admins verify this patch?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Constant in SecretKeySpec
> -------------------------
>
>                 Key: KYLIN-3356
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3356
>             Project: Kylin
>          Issue Type: Improvement
>            Reporter: liyang
>            Priority: Minor
>             Fix For: v2.6.0
>
>
> Reported by Rumen Paletov <rumen.paletov@gmail.com>: 
>  As part of some research about the common crypto mistakes that developers
>  make <[https://cs.ucsb.edu/~chris/research/doc/ccs13_cryptolint.pdf]>, I
>  noticed that your application has one of them.
>  
>  In particular, there's a violation of Rule 3 in
>  org.apache.kylin.common.util.EncryptUtil
>  <[https://github.com/apache/kylin/blob/5552164ba09eba989b9ddccdf3f1e4f83ed0b799/core-common/src/main/java/org/apache/kylin/common/util/EncryptUtil.java#L36]>.
>  That is, SecretKeySpec is being initialized with a constant key
>  <[https://github.com/apache/kylin/blob/5552164ba09eba989b9ddccdf3f1e4f83ed0b799/core-common/src/main/java/org/apache/kylin/common/util/EncryptUtil.java#L30]>
>  instead of a randomly generated one.
>  
>  One solution would be to generate a key using SecureRandom:
>  
>  > byte[] key = new byte[16];
>  > new SecureRandom.nextBytes(key);
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message