简体   繁体   中英

Hazelcast symmetric encryption check with java

Can I check how symmetric encryption works in Hazelcast with Java code or with something another tool? I want to see encrypted values comed from Hazelcast if it's possible.

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/

The symmetric encryption internally works on Hazelcast packets level. The flow is similar to the 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;
  • Using TLS is preferred over the Symmetric encryption in Hazelcast.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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