Bohemian
Bohemian

Reputation: 425278

How to prevent other servers from connecting to a local hazelcast instance

I want to use hazelcast as a local-only inter-JVM shared cache. Or put another way, I want to run a secure/private instance.

Is this possible? If so, how?

If it matters, it will be spring-managed.

The motivation is that confidential data will be stored in hazelcast and I want to protect it from external attacks.

Upvotes: 1

Views: 820

Answers (1)

A.K.Desai
A.K.Desai

Reputation: 1294

You need to define your own Group configuration credentials which would be needed to connect to your cluster.

<hz:group name="dev" password="password"/>

Best practices:

  1. Always define your own Hazelcast xml/spring configuration instead of using the default one from the jar file
  2. Better to make use of TCP/IP network configuration wherever possible instead of multicast, so your cluster won't collide with others.
  3. Define custom group credentials, as mentioned above.

Upvotes: 2

Related Questions