[REST API] Cluster Shutdown Returns Forbidden

67 views
Skip to first unread message

Renato Rodrigues

unread,
May 15, 2019, 7:57:30 AM5/15/19
to Hazelcast
I'm doubt about the endpoint /hazelcast/rest/management/cluster/clusterShutdown

I'ts not clear for me if this feature is opensource or not. When I call this URI, the response returns:
 HTTP 200  {"status":"forbidden"}
 
And the logs says:
15-05-2019 08:47:22:473 WARN  128 NodeExtension.log:67 [127.0.0.1]:6000 [dev] [3.12] Security features are only available on Hazelcast Enterprise!


The Rest API config was configured as follow:

// Configures Rest Api
network.setRestApiConfig(new RestApiConfig()
                              .setEnabled(true)
                              .enableGroups(RestEndpointGroup.HEALTH_CHECK,
            RestEndpointGroup.CLUSTER_WRITE,
            RestEndpointGroup.CLUSTER_READ,
            RestEndpointGroup.DATA));

My question is, all these groups are enabled to be consumed on opensource version? Eg.: CLUSTER_WRITE
How can I setup credentials? Its basic authentication?

Josef Cacek

unread,
May 15, 2019, 8:30:58 AM5/15/19
to haze...@googlegroups.com
Hi Renato,

the REST endpoints are available in the opensource Hazelcast too.

Some REST calls still need to be authenticated - it means, you have to
provide the group name and an arbitrary password separated by an
ampersand (&) in the request body:

$ curl -d "dev&" http://localhost:5701/hment/cluster/clusterShutdown
{"status":"success"}

You don't need the HOT_RESTART and WAN endpoint groups as they are
related to Enterprise features. Other groups should simply work for
you. E.g. the CLUSTER_WRITE for the cluster shutdown operation:
<network>
<rest-api enabled="true">
<endpoint-group name="CLUSTER_WRITE" enabled="true"/>
</rest-api>
</network>

Regards,
-- Josef
> --
> You received this message because you are subscribed to the Google Groups "Hazelcast" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
> To post to this group, send email to haze...@googlegroups.com.
> Visit this group at https://groups.google.com/group/hazelcast.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/260d6f59-e63a-44b7-ab80-bb5aa8c04dcc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Renato Rodrigues

unread,
May 15, 2019, 9:13:29 AM5/15/19
to haze...@googlegroups.com
Hi Josef, thank you!

After provides the goup and password into request body, I could shutdown the cluster!


Atenciosamente,

Renato Rodrigues Silva
Analista de Sistemas
Graduado em Tecnologia da Informação
Pós-graduado em Segurança em Redes


Reply all
Reply to author
Forward
0 new messages