> Source: https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/LocalDirectory/

# Local directory

A **local directory** domain hosts its accounts in the platform database. It is the only type where CyberElements is itself the identity source: it stores the credentials, verifies the passwords and manages their lifecycle.

![](https://docs.cyberelements.io/saas/img/cyberelements/CYE_AdminConsole_AuthenticationDomains_Local_Edit.png)

## Use cases

A local directory answers four needs:

- **accounts the organisation's directory does not hold**: external staff, fallback accounts;
- **accounts for the organisation's contractors and external parties**: a local account exists only in CyberElements, and therefore grants them no right on the rest of the information system;
- **a small scope**, where connecting a directory would cost more than managing a handful of accounts by hand;
- **a fallback access**, which remains usable if the organisation's directory becomes unreachable.

That last point is to be taken into account at design time: an LDAP domain whose servers stop responding authenticates nobody, administrators included.

## Implementation

1. Create the domain and set the session parameters.
2. Decide on the **password policy** (see below).
3. Create the [groups](https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/UserGroups/), then the [accounts](https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/Users/): unlike LDAP, nothing is imported automatically.

## Password policy

The password policy is what sets this domain type apart, and its main benefit. By default the domain follows the platform-wide policy; ticking **Define a custom password policy** opens a set of rules specific to the domain: minimum length, lowercase, uppercase, digits, special characters, minimum and maximum lifetimes, password history, and refusal of a password containing the login name.

![](https://docs.cyberelements.io/saas/img/cyberelements/CYE_AdminConsole_AuthenticationDomains_Local_PasswordPolicy.png)

Two settings concern the user experience more than security:

- **Change the user's password on first login** forces users to choose their own before they reach the portal;
- **Display password change form** puts a link on the login screen, which spares the support team as many requests.

> **Expiry notification prerequisites**
>
> Warning a user before their password expires requires **a maximum lifetime configured**, **an SMTP server declared**, **a source email address** and **an email address filled in on the [local account](https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/Users/)**. If any one of the four is missing, the notification never goes out, with no error message, since nothing fails: nobody is warned. Servers are declared in [SMTP servers](https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/ConfigurationWorkPanel/SmtpServers/).

> **Disabling a rule**
>
> Each complexity rule is neutralised by setting it to zero. This relaxes one requirement without switching off the whole custom policy.

## Limits

- A local account exists only on this platform: there is **no synchronisation and no federation** with a third-party directory.
- The domain cannot be deleted while an [access policy](https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/MainWorkPanel/AccessPolicies/AccessContracts/), a [notification profile](https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/MainWorkPanel/AccessPolicies/NotificationProfiles/) or an [assistance profile](https://docs.cyberelements.io/saas/hr/Usage/Administration/AdminConsole/MainWorkPanel/AccessPolicies/AssistanceProfiles/) references it.
- The directory type cannot be changed after creation: a local domain never becomes an LDAP domain.

---

The details of the **General information** and **Password** tab fields are described in the [module reference](https://docs.cyberelements.io/saas/hr/Usage/AdminConsoleReference/AuthenticationDomain/).

The API endpoints that drive this object are described in the [API reference](https://docs.cyberelements.io/saas/hr/API/APIGuide/#get-/publicapi/-org-/localdomains/).
