a0x8o / kafka

A high-throughput, distributed, publish-subscribe messaging system
Apache License 2.0
66 stars 171 forks source link

uggest change for security concern #7

Open YYTVicky opened 4 years ago

YYTVicky commented 4 years ago

More detailed description of your change, if necessary. The PR title and PR message become the squashed commit message, so use a separate comment to ping reviewers.

Summary of testing strategy (including rationale) for the feature or bug fix. Unit and/or integration tests are expected for any behaviour change and system tests should be considered for larger changes.

Committer Checklist (excluded from commit message)

YYTVicky commented 4 years ago

Hi, we commend the key should be random generated for security reason, we have a recommend code patch: SecureRandom random = new SecureRandom(); String key= String.valueOf(random.nextInt()); byte[] key = defaultKey.getBytes(); key = Arrays.copyOf(keyBytes,24); Hope it can helps and looking forward to hearing any feedback from you!