1afc8a799Smiramurali23<loader loading="loading"></loader>
2afc8a799Smiramurali23<div class="ldap" id="configuration-ldap">
3afc8a799Smiramurali23  <div class="row column">
4afc8a799Smiramurali23    <h1>LDAP</h1>
5afc8a799Smiramurali23  </div>
6afc8a799Smiramurali23  <div class="row column">
7afc8a799Smiramurali23    <p>Configure LDAP settings and manage role groups.</p>
8afc8a799Smiramurali23  </div>
9afc8a799Smiramurali23  <div class="row column">
10afc8a799Smiramurali23    <h2 class="subhead">
11afc8a799Smiramurali23      Settings
12afc8a799Smiramurali23    </h2>
13afc8a799Smiramurali23  </div>
14afc8a799Smiramurali23  <div class="row column">
15afc8a799Smiramurali23    <label class="control-check ldap__control-check">
16*28e9ed8bSDixsie Wolmers      <input type="checkbox" aria-labelledby="ldap-auth-label"
17afc8a799Smiramurali23      ng-change="updateServiceEnabled(); ldap__configuration.$setUntouched()"
18afc8a799Smiramurali23      ng-model="ldapProperties.ServiceEnabled" />
19afc8a799Smiramurali23      <span class="control__indicator"></span>
20*28e9ed8bSDixsie Wolmers      <span id="ldap-auth-label" class="control__label">
21afc8a799Smiramurali23        <strong>Enable LDAP authentication</strong> <br>
22afc8a799Smiramurali23        LDAP authentication must be enabled to modify role groups.
23afc8a799Smiramurali23      </span>
24afc8a799Smiramurali23    </label>
25afc8a799Smiramurali23  </div>
26afc8a799Smiramurali23  <div class="row column">
27afc8a799Smiramurali23    <form id="ldap__configuration" name="ldap__configuration" ng-class="{'submitted': submitted}"
28afc8a799Smiramurali23      class="ldap__configuration" novalidate>
29afc8a799Smiramurali23      <fieldset ng-disabled="!ldapProperties.ServiceEnabled">
30*28e9ed8bSDixsie Wolmers        <legend class="screen-reader-offscreen">LDAP Settings</legend>
31afc8a799Smiramurali23        <div class="ldap__configure-settings row column">
32afc8a799Smiramurali23          <div class="large-3 column ldap__ssl-column">
33afc8a799Smiramurali23            <label class="control-check" ng-class="{'disabled' : certificates.length < 1}">
34*28e9ed8bSDixsie Wolmers              <input id="secure-ldap-ssl" aria-labelledby="use-ssl" type="checkbox"
35*28e9ed8bSDixsie Wolmers                ng-model="ldapProperties.useSSL" ng-checked="ldapProperties.useSSL"
36*28e9ed8bSDixsie Wolmers                ng-disabled="certificates.length < 1" />
37afc8a799Smiramurali23              <span class="control__indicator"></span>
38*28e9ed8bSDixsie Wolmers              <span class="control__label" id="use-ssl">Secure LDAP using SSL</span>
39afc8a799Smiramurali23            </label>
40afc8a799Smiramurali23            <div>
41afc8a799Smiramurali23              <div class="ldap__certificate-info" ng-if="ldapProperties.ServiceEnabled">
42afc8a799Smiramurali23                <p>Client certificate valid until:</p>
43afc8a799Smiramurali23                <small>
44afc8a799Smiramurali23                  {{clientCertificateExpires ? (clientCertificateExpires | localeDate) : 'none available'}}</small>
45afc8a799Smiramurali23              </div>
46afc8a799Smiramurali23            </div>
47afc8a799Smiramurali23            <div class="ldap__certificate-info" ng-if="data.ValidNotAfter='' || !ldapProperties.ServiceEnabled">
48afc8a799Smiramurali23              <span>SSL certificates must be uploaded to secure LDAP using SSL.</span>
49afc8a799Smiramurali23            </div>
50afc8a799Smiramurali23            <div class="ldap__certificate-info">
51afc8a799Smiramurali23              <a href="#/access-control/ssl-certificates">Go to SSL certificates</a>
52afc8a799Smiramurali23            </div>
53afc8a799Smiramurali23          </div>
54afc8a799Smiramurali23          <div class="large-9 columns ldap__server-info">
55afc8a799Smiramurali23            <div class="column service-type-column">
56afc8a799Smiramurali23              <fieldset class="ldap__server-info-service-type">
57afc8a799Smiramurali23                <legend class="content-label">Service Type</legend>
58*28e9ed8bSDixsie Wolmers                <label class="control-radio control__radio__label">Open LDAP
59afc8a799Smiramurali23                  <input type="radio" name="service_enabled_type" id="open-ldap" value="ldap"
60afc8a799Smiramurali23                    ng-checked="ldapProperties.LDAPServiceEnabled"
61afc8a799Smiramurali23                    ng-change="ldapProperties.EnabledServiceUpdated = true" ng-model="ldapProperties.EnabledServiceType"
62afc8a799Smiramurali23                    required />
63afc8a799Smiramurali23                  <span class="control__indicator control__indicator-on control__indicator-service-type"></span>
64afc8a799Smiramurali23                </label>
65*28e9ed8bSDixsie Wolmers                <label class="control-radio control__radio__label">Active directory
66afc8a799Smiramurali23                  <input type="radio" name="service_enabled_type" id="active-directory"
67afc8a799Smiramurali23                    ng-change="ldapProperties.EnabledServiceUpdated = true" value="ad"
68afc8a799Smiramurali23                    ng-checked="ldapProperties.ADServiceEnabled" ng-model="ldapProperties.EnabledServiceType"
69afc8a799Smiramurali23                    required />
70afc8a799Smiramurali23                  <span class="control__indicator control__indicator-on control__indicator-service-type"></span>
71afc8a799Smiramurali23                </label>
72afc8a799Smiramurali23              </fieldset>
73afc8a799Smiramurali23            </div>
74afc8a799Smiramurali23            <div class="medium-6 large-4 columns">
75afc8a799Smiramurali23              <label for="ldap__uri">Server uri</label>
76afc8a799Smiramurali23              <input id="ldap__uri" name="ldap__uri" type="text"
77afc8a799Smiramurali23                ng-change="ldapProperties.ServiceAddressesUpdated = true" ng-model="ldapProperties.ServiceAddresses[0]"
78afc8a799Smiramurali23                required />
79afc8a799Smiramurali23              <div ng-messages="ldap__configuration.ldap__uri.$error" class="form-error"
80afc8a799Smiramurali23                ng-class="{'visible' : ldap__configuration.ldap__uri.$touched || submitted}">
81afc8a799Smiramurali23                <p ng-message="required">Field is required</p>
82afc8a799Smiramurali23              </div>
83afc8a799Smiramurali23            </div>
84afc8a799Smiramurali23            <div class="medium-6 large-4 columns">
85afc8a799Smiramurali23              <label for="ldap__bind__dn">Bind DN</label>
86afc8a799Smiramurali23              <input id="ldap__bind__dn" name="ldap__bind__dn" type="text"
87afc8a799Smiramurali23                ng-change="ldapProperties.UsernameUpdated = true" ng-model="ldapProperties.Username" required />
88afc8a799Smiramurali23              <div ng-messages="ldap__configuration.ldap__bind__dn.$error" class="form-error"
89afc8a799Smiramurali23                ng-class="{'visible' : ldap__configuration.ldap__bind__dn.$touched || submitted}">
90afc8a799Smiramurali23                <p ng-message="required">Field is required</p>
91afc8a799Smiramurali23              </div>
92afc8a799Smiramurali23            </div>
93afc8a799Smiramurali23            <div class="medium-6 large-4 columns">
94afc8a799Smiramurali23              <label for="ldap__bind_pw">Bind password</label>
95afc8a799Smiramurali23              <input id="ldap__bind_pw" type="{{showpassword ? 'text' : 'password'}}" name="ldap__bind_pw"
96afc8a799Smiramurali23                ng-change="ldapProperties.PasswordUpdated = true" autocomplete="off" ng-model="ldapProperties.Password"
97afc8a799Smiramurali23                required />
98afc8a799Smiramurali23              <button ng-model="showpassword" ng-class="{'disabled' : !ldap__configuration.$valid}"
99afc8a799Smiramurali23                ng-click="togglePassword = !togglePassword; showpassword = !showpassword;" class="password-toggle">
100afc8a799Smiramurali23                <span ng-hide="togglePassword">Show</span>
101afc8a799Smiramurali23                <span ng-show="togglePassword">Hide</span>
102afc8a799Smiramurali23              </button>
103afc8a799Smiramurali23              <div ng-messages="ldap__configuration.ldap__bind_pw.$error" class="form-error"
104afc8a799Smiramurali23                ng-class="{'visible' : ldap__configuration.ldap__bind_pw.$touched || submitted}">
105afc8a799Smiramurali23                <p ng-message="required">Field is required</p>
106afc8a799Smiramurali23              </div>
107afc8a799Smiramurali23            </div>
108afc8a799Smiramurali23            <div class="medium-6 large-4 columns">
109afc8a799Smiramurali23              <label for="ldap__base__dn">Base DN</label>
110afc8a799Smiramurali23              <input id="ldap__base__dn" name="ldap__base__dn" type="text"
111afc8a799Smiramurali23                ng-change="ldapProperties.BaseDistinguishedNamesUpdated = true"
112afc8a799Smiramurali23                ng-model="ldapProperties.BaseDistinguishedNames[0]" required />
113afc8a799Smiramurali23              <div ng-messages="ldap__configuration.ldap__base__dn.$error" class="form-error"
114afc8a799Smiramurali23                ng-class="{'visible' : ldap__configuration.ldap__base__dn.$touched || submitted}">
115afc8a799Smiramurali23                <p ng-message="required">Field is required</p>
116afc8a799Smiramurali23              </div>
117afc8a799Smiramurali23            </div>
118afc8a799Smiramurali23            <div class="medium-6 large-4 columns">
119afc8a799Smiramurali23              <label for="ldap__user_attribute">User id attribute (optional)</label>
120afc8a799Smiramurali23              <input id="ldap__user_attribute" name="ldap__user_attribute" type="text"
121afc8a799Smiramurali23                ng-change="ldapProperties.UsernameAttributeUpdated = true" ng-model="ldapProperties.UsernameAttribute"
122afc8a799Smiramurali23                class="ldap__optional-field" />
123afc8a799Smiramurali23            </div>
124afc8a799Smiramurali23            <div class="medium-6 large-4 columns">
125afc8a799Smiramurali23              <label for="ldap__group_attribute">Group id attribute (optional)</label>
126afc8a799Smiramurali23              <input id="ldap__group_attribute" name="ldap__group_attribute" type="text"
127afc8a799Smiramurali23                ng-change="ldapProperties.GroupsAttributeUpdated = true" ng-model="ldapProperties.GroupsAttribute"
128afc8a799Smiramurali23                class="ldap__optional-field" />
129afc8a799Smiramurali23            </div>
130afc8a799Smiramurali23            <div class="column ldap__configuration-buttons">
131*28e9ed8bSDixsie Wolmers              <button type="submit" class="btn btn-primary" ng-disabled="!ldap__configuration.$valid"
132afc8a799Smiramurali23                ng-click="$parent.submitted=true; ldap__configuration.$valid && saveLdapSettings(); ldap__configuration.$setUntouched()">Save</button>
133afc8a799Smiramurali23              <button type="button" class="btn btn-secondary"
134afc8a799Smiramurali23                ng-click="loadLdap(); ldap__configuration.$setUntouched()">Reset</button>
135afc8a799Smiramurali23            </div>
136afc8a799Smiramurali23      </fieldset>
137afc8a799Smiramurali23    </form>
138afc8a799Smiramurali23  </div>
139afc8a799Smiramurali23</div>
140afc8a799Smiramurali23<div class="ldap-groups row column">
141afc8a799Smiramurali23  <h2 class="small-12 subhead">
142afc8a799Smiramurali23    Role groups
143afc8a799Smiramurali23  </h2>
144afc8a799Smiramurali23  <div class="row column">
145afc8a799Smiramurali23    <div class="small-12">
146afc8a799Smiramurali23      <ldap-user-roles role-groups="roleGroups" role-group-type="roleGroupType" enabled="ldapProperties.ServiceEnabled">
147afc8a799Smiramurali23      </ldap-user-roles>
148afc8a799Smiramurali23    </div>
149afc8a799Smiramurali23  </div>
150afc8a799Smiramurali23</div>