<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->

<feature-group-spec name="core-host-secondary" xmlns="urn:jboss:galleon:feature-group:1.0">
    <feature spec="host">
        <param name="host" value="secondary"/>
        <param name="persist-name" value="false"/>

        <feature-group name="host-audit"/>
        <feature-group name="host-profile"/>

        <feature spec="host.core-service.discovery-options">
            <feature spec="host.core-service.discovery-options.static-discovery">
                <param name="static-discovery" value="primary"/>
                <param name="protocol" value="${jboss.domain.primary.protocol:remote+http}"/>
                <param name="host-feature" value="${jboss.domain.primary.address}"/>
                <param name="host" value="secondary"/>
                <param name="port" value="${jboss.domain.primary.port:9990}"/>
            </feature>
        </feature>

        <feature-group name="host-interfaces"/>
        <feature-group name="host-management-interfaces"/>

        <feature spec="host.server-config">
            <param name="server-config" value="server-one"/>
            <param name="group" value="main-server-group"/>
        </feature>
        <feature spec="host.server-config">
            <param name="server-config" value="server-two"/>
            <param name="group" value="other-server-group"/>
            <param name="socket-binding-port-offset" value="150"/>
        </feature>

        <feature-group name="host-jvm"/>

        <feature spec="subsystem.elytron.authentication-configuration">
            <param name="authentication-configuration" value="primary"/>
            <param name="authentication-name" value="$local"/>
            <param name="credential-reference" value="{clear-text=password}"/>
        </feature>
        <feature spec="subsystem.elytron.authentication-context">
            <param name="authentication-context" value="primary"/>
            <param name="match-rules" value="[{authentication-configuration=primary}]"/>
        </feature>
        <feature spec="host.domain-controller">
            <param name="remote" value="{authentication-context=primary}"/>
        </feature>
    </feature>
</feature-group-spec>
