class ClouderaManagerSecurityService implements ClusterSecurityService {

    @Override
    public void rotateHostCertificates() throws CloudbreakException {
        Cluster cluster = stack.getCluster();
        String user = cluster.getCloudbreakAmbariUser();
        String password = cluster.getCloudbreakAmbariPassword();
        try {
            ApiClient client = getClient(stack.getGatewayPort(), user, password, clientConfig);
            HostsResourceApi hostsResourceApi = clouderaManagerApiFactory.getHostsResourceApi(client);
            BatchResourceApi batchResourceApi = clouderaManagerApiFactory.getBatchResourceApi(client);
            ApiHostList hostList = hostsResourceApi.readHosts(null, null, "SUMMARY");
            ApiBatchRequest batchRequest = createHostCertsBatchRequest(hostList);
            ApiBatchResponse apiBatchResponse = batchResourceApi.execute(batchRequest);
            processHostCertsBatchResponse(client, apiBatchResponse);
        } catch (ApiException | ClouderaManagerClientInitException e) {
            LOGGER.warn("Can't rotate the host certificates", e);
            throw new CloudbreakException("Can't rotate the host certificates due to: " + e.getMessage());
        }
    }

    public  ClouderaManagerSecurityService(Stack stack, HttpClientConfig clientConfig);

}