@Override
    public List<String> getNodeRoles(String hostname) {
        try (var client = createHttpClient(sslContextSupplier.get(), hostnameVerifier)) {
            var uri = configserverUri
                    .resolve(IDENTITY_DOCUMENT_API)
                    .resolve("roles/")
                    .resolve(hostname);

            var request = RequestBuilder.get()
                    .setUri(uri)
                    .addHeader("Connection", "close")
                    .addHeader("Accept", "application/json")
                    .build();
            try (var response = client.execute(request)) {
                String responseContent = EntityUtils.toString(response.getEntity());
                int statusCode = response.getStatusLine().getStatusCode();
                if (statusCode >= 200 && statusCode <= 299) {
                    var rolesEntity = objectMapper.readValue(responseContent, RoleListEntity.class);
                    return rolesEntity.roles();
                } else {
                    throw new RuntimeException(
                            String.format(
                                    "Failed to retrieve roles for host %s: %d - %s",
                                    hostname,
                                    statusCode,
                                    responseContent));
                }
            }
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
Default implementation of {@link IdentityDocumentClient}

@author bjorncs
vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/DefaultIdentityDocumentClient.java