<?xml version="1.0" encoding="utf-8"?>
<creole>

    <files />

    <variables>

        <family name='eole sso'>
            <variable name='eolesso_adresse' description="Nom de domaine du serveur d'authentification SSO" redefine="True" exists='True' />
        </family>

        <family name='LemonLDAP'>
            <variable name='ldapServerPort' redefine="True" hidden='True'>
                <value>636</value>
            </variable>
            <variable name='lemon_adresse' type='domain_strict' description="Nom de domaine de base de lemonLdap"/>
            <variable name='managerWebName' redefine="True" />
            <variable name='authWebName' redefine="True" />
            <variable name='reloadWebName' redefine="True" />
            <variable name="samlOrganizationName" redefine="True" />
            <variable name='cookieDomain' redefine="True"/>
        </family>

    </variables>

    <constraints>
        <fill name='calc_multi_condition' target='activer_sso'>
            <param>oui</param>
            <param type='eole' name='condition_1'>activerLemon</param>
            <param name='match'>distant</param>
            <param name='default_mismatch'>local</param>
        </fill>

        <condition name='frozen_if_in' source='activerLemon'>
            <param>oui</param>
            <target type='variable'>activer_sso</target>
        </condition>


        <auto name='calc_val_first_value' target='lemon_adresse'>
            <param type='eole' optional='True' hidden='False'>web_url</param>
            <param type='eole'>nom_domaine_machine</param>
        </auto>
        <fill name='calc_val_first_value' target='eolesso_adresse'>
            <param type='eole' optional='True' hidden='False'>authWebName</param>
            <param type='eole' hidden="False">lemon_adresse</param>
            <param type='eole' optional='True' hidden='False'>web_url</param>
            <param type='eole'>nom_domaine_machine</param>
        </fill>
        <fill name='calc_val' target='cookieDomain'>
            <param type='eole'>lemon_adresse</param>
        </fill>

        <fill name='concat' target='managerWebName'>
            <param>manager.</param>
            <param type='eole'>lemon_adresse</param>
        </fill>
        <fill name='concat' target='authWebName'>
            <param>auth.</param>
            <param type='eole'>lemon_adresse</param>
        </fill>
        <fill name='concat' target='reloadWebName'>
            <param>reload.</param>
            <param type='eole'>lemon_adresse</param>
        </fill>
        <fill name='concat' target='samlOrganizationName'>
            <param>SAML</param>
            <param type='eole'>lemon_adresse</param>
        </fill>

        <condition name='frozen_if_in' source='activerLemon'>
            <param>oui</param>
            <target type='variable'>eolesso_adresse</target>
        </condition>

        <auto name='calc_val' target='ldapScheme'>
            <param>ldaps</param>
        </auto>

        <auto name='calc_val' target='ldapServer'>
            <param type='eole'>adresse_ip_addc</param>
        </auto>

        <auto name='calc_val' target='lemon_user_db'>
            <param>AD</param>
        </auto>

        <auto name='calc_val' target='llRegisterDB'>
            <param>AD</param>
        </auto>
        <auto name='calc_val' target='ldapUserBaseDN'>
            <param type="eole">ldap_base_dn</param>
        </auto>
        <auto name='calc_val' target='ldapBindUserDN'>
            <param type="eole">ldap_reader</param>
        </auto>

        <auto name='calc_val' target='ldapBindUserPassword'>
            <param type="eole">ldap_reader_passfile</param>
        </auto>

        <auto name='calc_val' target='casFolder'>
            <param type='eole'>eolesso_cas_folder</param>
        </auto>

    </constraints>

    <help />

</creole>
