class ZTSImpl implements KeyStore, ZTSHandler {

    boolean verifyAWSAssumeRole(String domainName, String roleResource, String principal) {
        
        // first retrieve our domain data object from the cache
        
        DataCache data = dataStore.getDataCache(domainName);
        if (data == null) {
            LOGGER.error("verifyAWSAssumeRole: unknown domain: {}", domainName);
            return false;
        }
        
        // retrieve the roles for the principal
        
        Set<String> roles = new HashSet<>();
        dataStore.getAccessibleRoles(data, domainName, principal, null, roles, true);
        
        if (roles.isEmpty()) {
            LOGGER.error("verifyAWSAssumeRole: Principal: {}" +
                    " has no acccess to any roles in domain: {}", principal, domainName);
            return false;
        }

        // check to see if any of the roles give access to the specified resource
        
        Set<String> awsResourceSet;
        for (String role : roles) {
            awsResourceSet = data.getAWSResourceRoleSet(role);
            if (awsResourceSet != null && awsResourceSet.contains(roleResource)) {
                return true;
            }
        }
        
        LOGGER.error("verifyAWSAssumeRole: Principal: {} has no acccess to resource: {}" +
                " in domain: {}", principal, roleResource, domainName);
        
        return false;
    }

    public  ZTSImpl();
    public  ZTSImpl(CloudStore implCloudStore, DataStore implDataStore);

}