private String parseLogforwarderRole(String role, DeployState deployState) {
        if (role == null)
            return null;
        if (deployState.zone().system().isPublic())
            throw new IllegalArgumentException("Logforwarder role not supported in public systems");

        // Currently only support athenz roles on format athenz://<domain>/role/<role>
        var rolePattern = Pattern.compile("(?<scheme>athenz)://" +
                "(?<domain>[a-zA-Z0-9_][a-zA-Z0-9_.-]*[a-zA-Z0-9_])" +
                "/role/" +
                "(?<role>[a-zA-Z0-9_][a-zA-Z0-9_.-]*[a-zA-Z0-9_])");
        var matcher = rolePattern.matcher(role);
        if (!matcher.matches()) {
            throw new IllegalArgumentException("Invalid role path " + role);
        }
        return matcher.group("domain") + ":role." + matcher.group("role");
    }
A base class for admin model builders, to support common functionality across versions.

@author Ulf Lilleengen
@author Vegard Havdal
config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java