简体   繁体   English

使用Java进行Hazelcast对称加密检查

[英]Hazelcast symmetric encryption check with java

Can I check how symmetric encryption works in Hazelcast with Java code or with something another tool? 是否可以使用Java代码或其他工具检查对称加密在Hazelcast中的工作方式? I want to see encrypted values comed from Hazelcast if it's possible. 如果可能,我希望看到来自Hazelcast的加密值。

Config: 配置:

    SymmetricEncryptionConfig symmetricEncryptionConfig = new SymmetricEncryptionConfig();
    symmetricEncryptionConfig.setEnabled(true);
    symmetricEncryptionConfig.setAlgorithm("Blowfish");
    symmetricEncryptionConfig.setSalt("asdfdsasdfsadfsadf");
    symmetricEncryptionConfig.setPassword("passwasdsadasdord");
    symmetricEncryptionConfig.setIterationCount(28);

    Config config = new Config();
    config.getNetworkConfig().setSymmetricEncryptionConfig(symmetricEncryptionConfig);

    ListConfig listConfig = new ListConfig();
    listConfig.setName("ISP");
    listConfig.setMaxSize(20);
    config.getListConfigs().put("ISP", listConfig);

    config.getManagementCenterConfig().setEnabled(true);
    config.getManagementCenterConfig().setUrl("http://localhost:8080/mancenter");

    HazelcastInstance server = Hazelcast.newHazelcastInstance(config);

Your configuration seems valid. 您的配置似乎有效。

To try it yourself you can ask for a Hazelcast Enterprise trial license which is valid for 30 days - https://hazelcast.com/hazelcast-enterprise-download/ 自己尝试一下,你可以要求它的有效期为30天Hazelcast企业试用许可证- https://hazelcast.com/hazelcast-enterprise-download/

The symmetric encryption internally works on Hazelcast packets level. 对称加密在内部在Hazelcast数据包级别上起作用。 The flow is similar to the PacketEncoder . 该流程类似于PacketEncoder What makes the difference is the byte output is encrypted by a chosen cipher. 区别在于字节输出由选定的密码加密。

Additional notes 补充笔记

  • Symmetric encryption is only used in member-to-member communication! 对称加密仅用于成员间通信! The client-to-member is not encrypted; 客户端到成员未加密;
  • Symmetric encryption can't be used together with TLS; 对称加密不能与TLS一起使用;
  • Using TLS is preferred over the Symmetric encryption in Hazelcast. 在Hazelcast中,使用TLS优先于对称加密。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM