| <loader loading="loading"></loader> |
| <div class="ldap" id="configuration-ldap"> |
| <div class="row column"> |
| <h1>LDAP</h1> |
| </div> |
| <div class="row column"> |
| <p>Configure LDAP settings and manage role groups.</p> |
| </div> |
| <div class="row column"> |
| <h2 class="subhead"> |
| Settings |
| </h2> |
| </div> |
| <div class="row column"> |
| <label class="control-check ldap__control-check"> |
| <input type="checkbox" id="enable-ldap-checkbox" |
| ng-change="updateServiceEnabled(); ldap__configuration.$setUntouched()" |
| ng-model="ldapProperties.ServiceEnabled" /> |
| <span class="control__indicator"></span> |
| <span class="control__label"> |
| <strong>Enable LDAP authentication</strong> <br> |
| LDAP authentication must be enabled to modify role groups. |
| </span> |
| </label> |
| </div> |
| <div class="row column"> |
| <form id="ldap__configuration" name="ldap__configuration" ng-class="{'submitted': submitted}" |
| class="ldap__configuration" novalidate> |
| <fieldset ng-disabled="!ldapProperties.ServiceEnabled"> |
| <div class="ldap__configure-settings row column"> |
| <div class="large-3 column ldap__ssl-column"> |
| <label class="control-check" ng-class="{'disabled' : certificates.length < 1}"> |
| <input id="secure-ldap-ssl" type="checkbox" ng-model="ldapProperties.useSSL" |
| ng-checked="ldapProperties.useSSL" ng-disabled="certificates.length < 1" /> |
| <span class="control__indicator"></span> |
| <span class="control__label">Secure LDAP using SSL</span> |
| </label> |
| <div> |
| <div class="ldap__certificate-info" ng-if="ldapProperties.ServiceEnabled"> |
| <p>Client certificate valid until:</p> |
| <small> |
| {{clientCertificateExpires ? (clientCertificateExpires | localeDate) : 'none available'}}</small> |
| </div> |
| </div> |
| <div class="ldap__certificate-info" ng-if="data.ValidNotAfter='' || !ldapProperties.ServiceEnabled"> |
| <span>SSL certificates must be uploaded to secure LDAP using SSL.</span> |
| </div> |
| <div class="ldap__certificate-info"> |
| <a href="#/access-control/ssl-certificates">Go to SSL certificates</a> |
| </div> |
| </div> |
| <div class="large-9 columns ldap__server-info"> |
| <div class="column service-type-column"> |
| <fieldset class="ldap__server-info-service-type"> |
| <legend class="content-label">Service Type</legend> |
| <label class="control-radio control__radio__label" for="open-ldap">Open LDAP |
| <input type="radio" name="service_enabled_type" id="open-ldap" value="ldap" |
| ng-checked="ldapProperties.LDAPServiceEnabled" |
| ng-change="ldapProperties.EnabledServiceUpdated = true" ng-model="ldapProperties.EnabledServiceType" |
| required /> |
| <span class="control__indicator control__indicator-on control__indicator-service-type"></span> |
| </label> |
| <label class="control-radio control__radio__label" for="active-directory">Active directory |
| <input type="radio" name="service_enabled_type" id="active-directory" |
| ng-change="ldapProperties.EnabledServiceUpdated = true" value="ad" |
| ng-checked="ldapProperties.ADServiceEnabled" ng-model="ldapProperties.EnabledServiceType" |
| required /> |
| <span class="control__indicator control__indicator-on control__indicator-service-type"></span> |
| </label> |
| </fieldset> |
| </div> |
| <div class="medium-6 large-4 columns"> |
| <label for="ldap__uri">Server uri</label> |
| <input id="ldap__uri" name="ldap__uri" type="text" |
| ng-change="ldapProperties.ServiceAddressesUpdated = true" ng-model="ldapProperties.ServiceAddresses[0]" |
| required /> |
| <div ng-messages="ldap__configuration.ldap__uri.$error" class="form-error" |
| ng-class="{'visible' : ldap__configuration.ldap__uri.$touched || submitted}"> |
| <p ng-message="required">Field is required</p> |
| </div> |
| </div> |
| <div class="medium-6 large-4 columns"> |
| <label for="ldap__bind__dn">Bind DN</label> |
| <input id="ldap__bind__dn" name="ldap__bind__dn" type="text" |
| ng-change="ldapProperties.UsernameUpdated = true" ng-model="ldapProperties.Username" required /> |
| <div ng-messages="ldap__configuration.ldap__bind__dn.$error" class="form-error" |
| ng-class="{'visible' : ldap__configuration.ldap__bind__dn.$touched || submitted}"> |
| <p ng-message="required">Field is required</p> |
| </div> |
| </div> |
| <div class="medium-6 large-4 columns"> |
| <label for="ldap__bind_pw">Bind password</label> |
| <input id="ldap__bind_pw" type="{{showpassword ? 'text' : 'password'}}" name="ldap__bind_pw" |
| ng-change="ldapProperties.PasswordUpdated = true" autocomplete="off" ng-model="ldapProperties.Password" |
| required /> |
| <button ng-model="showpassword" ng-class="{'disabled' : !ldap__configuration.$valid}" |
| ng-click="togglePassword = !togglePassword; showpassword = !showpassword;" class="password-toggle"> |
| <span ng-hide="togglePassword">Show</span> |
| <span ng-show="togglePassword">Hide</span> |
| </button> |
| <div ng-messages="ldap__configuration.ldap__bind_pw.$error" class="form-error" |
| ng-class="{'visible' : ldap__configuration.ldap__bind_pw.$touched || submitted}"> |
| <p ng-message="required">Field is required</p> |
| </div> |
| </div> |
| <div class="medium-6 large-4 columns"> |
| <label for="ldap__base__dn">Base DN</label> |
| <input id="ldap__base__dn" name="ldap__base__dn" type="text" |
| ng-change="ldapProperties.BaseDistinguishedNamesUpdated = true" |
| ng-model="ldapProperties.BaseDistinguishedNames[0]" required /> |
| <div ng-messages="ldap__configuration.ldap__base__dn.$error" class="form-error" |
| ng-class="{'visible' : ldap__configuration.ldap__base__dn.$touched || submitted}"> |
| <p ng-message="required">Field is required</p> |
| </div> |
| </div> |
| <div class="medium-6 large-4 columns"> |
| <label for="ldap__user_attribute">User id attribute (optional)</label> |
| <input id="ldap__user_attribute" name="ldap__user_attribute" type="text" |
| ng-change="ldapProperties.UsernameAttributeUpdated = true" ng-model="ldapProperties.UsernameAttribute" |
| class="ldap__optional-field" /> |
| </div> |
| <div class="medium-6 large-4 columns"> |
| <label for="ldap__group_attribute">Group id attribute (optional)</label> |
| <input id="ldap__group_attribute" name="ldap__group_attribute" type="text" |
| ng-change="ldapProperties.GroupsAttributeUpdated = true" ng-model="ldapProperties.GroupsAttribute" |
| class="ldap__optional-field" /> |
| </div> |
| <div class="column ldap__configuration-buttons"> |
| <button type="button" class="btn btn-primary" ng-disabled="!ldap__configuration.$valid" |
| ng-click="$parent.submitted=true; ldap__configuration.$valid && saveLdapSettings(); ldap__configuration.$setUntouched()">Save</button> |
| <button type="button" class="btn btn-secondary" |
| ng-click="loadLdap(); ldap__configuration.$setUntouched()">Reset</button> |
| </div> |
| </fieldset> |
| </form> |
| </div> |
| </div> |
| <div class="ldap-groups row column"> |
| <h2 class="small-12 subhead"> |
| Role groups |
| </h2> |
| <div class="row column"> |
| <div class="small-12"> |
| <ldap-user-roles role-groups="roleGroups" role-group-type="roleGroupType" enabled="ldapProperties.ServiceEnabled"> |
| </ldap-user-roles> |
| </div> |
| </div> |
| </div> |