<?xml version='1.0' encoding='utf-8'?>

<creole>
    <files>
        <service servicelist='freeradius'>freeradius</service>
        <file filelist='freeradius' name='/etc/freeradius/clients.conf' source='freerad-clients.conf'/>
        <file filelist='freeradius' name='/etc/freeradius/eap.conf' source='freerad-eap.conf'/>
        <file filelist='freeradius' name='/etc/freeradius/huntgroups' source='freerad-huntgroups'/>
        <file filelist='freeradius' name='/etc/freeradius/radiusd.conf'/>
        <file filelist='freeradius' name='/etc/freeradius/users' source='freerad-users'/>
        <file filelist='freeradius' name='/etc/freeradius/modules/ldap' source='freerad-ldap'/>
        <file filelist='freeradius' name='/etc/freeradius/modules/mschap' source='freerad-mschap'/>
        <file filelist='freeradius' name='/etc/freeradius/sites-enabled/default' source='freerad-default'/>
        <file filelist='freeradius' name='/etc/freeradius/sites-enabled/inner-tunnel' source='freerad-inner-tunnel'/>
    </files>
    <variables>
        <family name='authentification'>
            <variable name='activer_freeradius' type='oui/non' description='Activer le service FreeRADIUS'>
                <value>non</value>
            </variable>
        </family>
        <family name='freeradius' icon='bullseye'>
            <variable name='activer_proxy_radius' type='oui/non' description="Activater le proxy radius">
                <value>non</value>
            </variable>
            <variable name='freerad_mode' type='string' description="Mode d'utilisation de FreeRADIUS" mandatory='True'>
                <value>802.1x</value>
            </variable>
            <variable name='freerad_listen_int' type='string' description="Numéro de l'interface sur laquelle FreeRADIUS écoutera" mandatory='True' />
            <variable name='freerad_listen_addr' type='ip' description='Adresse IP sur laquelle FreeRADIUS écoutera' mandatory='True' />
            <variable name='freerad_nas_ip' type='ip' description="Adresse IP du serveur d'accès (NAS)" multi='True' mandatory='True'/>
            <variable name='freerad_nas_cidr_netmask' type='number' description="Masque de sous réseau (notation CIDR) du serveur d'accès (NAS)" mandatory='True'/>
            <variable name='freerad_nas_name' type='string' description="Nom court du serveur d'accès (NAS)" mandatory='True'/>
            <variable name='freerad_nas_passwd' type='string' description="Secret partagé avec le serveur d'accès (NAS)" mandatory='True'/>
            <variable name='freerad_nas_type' type='string' description="Type du serveur d'accès (NAS)" mandatory='True'>
                <value>other</value>
            </variable>
            <variable name='freerad_ldap_ip' type='ip' description='Adresse IP du serveur LDAP permettant de récupérer les comptes utilisateurs' mandatory='True'/>
            <variable name='freerad_ldap_base_dn' type='string' description="Suffixe racine de l'annuaire LDAP (base DN)" mandatory='True'>
                <value>o=gouv,c=fr</value>
            </variable>
            <variable name='freerad_cle_ldap_scribe' type='string' description="Clé d'accès reader à la base LDAP sur Scribe (/root/.reader)" mandatory='True'/>
            <variable name='freerad_ldap_group' type='unix_user' description="Groupe d'utilisateurs à récupérer dans l'annuaire LDAP" multi='True' mandatory='True'/>
            <variable name='freerad_group_vlan' type='number' description="Numéro de VLAN à attribuer à ce groupe" mandatory='True'/>
        </family>
        <separators>
            <separator name='freerad_nas_ip'>Configuration des NAS</separator>
            <separator name='freerad_ldap_ip'>Configuration LDAP</separator>
            <separator name='freerad_ldap_group'>Configuration des groupes et des VLAN</separator>
        </separators>
    </variables>
    <constraints>
        <condition name='disabled_if_in' source='activer_freeradius'>
            <param>non</param>
            <target type='family'>freeradius</target>
            <target type='filelist'>freeradius</target>
            <target type='servicelist'>freeradius</target>
        </condition>
        <condition name='disabled_if_in' source='freerad_mode'>
            <param>802.1x</param>
            <target type='variable'>freerad_cle_ldap_scribe</target>
            <target type='variable'>freerad_listen_addr</target>
            <target type='variable'>freerad_nas_cidr_netmask</target>
        </condition>
        <condition name='disabled_if_in' source='freerad_mode'>
            <param>accounting</param>
            <target type='variable'>freerad_listen_int</target>
            <target type='variable'>freerad_ldap_group</target>
            <target type='variable'>freerad_group_vlan</target>
        </condition>

        <check name="valid_enum" target='freerad_mode'>
            <param>['802.1x','accounting']</param>
        </check>
        <check name='valid_enum' target="freerad_listen_int">
            <param>['0', '1', '2', '3', '4']</param>
        </check>
        <check name="valid_enum" target='freerad_nas_type'>
            <param>['cisco','computone','livingston','max40xx','multitech','netserver','pathras','patton','portslave','tc','usrhiper','other']</param>
        </check>
        <check name="valid_enum" target='freerad_ldap_group'>
            <param>['eleves','professeurs']</param>
            <param name="checkval">False</param>
        </check>
        <!-- **** Groupes **** -->
        <group master='freerad_nas_ip'>
            <slave>freerad_nas_cidr_netmask</slave>
            <slave>freerad_nas_passwd</slave>
            <slave>freerad_nas_name</slave>
            <slave>freerad_nas_type</slave>
        </group>
        <group master='freerad_ldap_group'>
            <slave>freerad_group_vlan</slave>
        </group>
    </constraints>
    <help>
        <family name='freeradius'>Paramétrage de l'authentification RADIUS</family>
        <variable name='activer_freeradius'>RADIUS (Remote Authentication Dial-In User Service) est un protocole client-serveur permettant de centraliser des données d'authentification</variable>
        <variable name='activer_proxy_radius'>Permet de transmettre les requêtes du client à d'autres serveurs RADIUS</variable>
        <variable name='freerad_mode'>802.1x : mode filaire
accounting : mode wifi</variable>
        <variable name='freerad_nas_cidr_netmask'>Masque au format CIDR (255.255.255.0 -> 24)</variable>
    </help>
</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
