
AD Absence: who is on vacation, sick leave, or on a business trip — absence calendar with Active Directory login
🌐 Machine-translated from Russian. Show original
AD Absence is a calendar of employee absences: who is currently on vacation, sick leave, on a business trip, or working from home, until what date and who is filling in for them. The employee enters the absence themselves, the manager approves, and the HR department sees the entire company. Login is by domain password; departments and managers are taken from Active Directory. It is deployed on a server within the company: without internet, external services, CDNs, or databases.
🔒 Since 17.11.2026, the source code of the AD Tools series is provided upon request: leave a request. The showcase of the series is github.com/WorkTime-kz/ad-tools.
| Link | |
|---|---|
| 🗓️ | AD Absence — source code and instructions |

In this part:
What's New (November 2026)#
- 🧩 Common ad-tools-core kernel. AD connection, login, sessions, log, and Kerberos are now common across the entire AD Tools series (folder
src/core/). At the same time, login has become stricter:ДРУГОЙ\ivanovandivanov@другой.суффиксdo not allow logging in with theirivanovaccount. After the update, users will log in once again — the session cookie format has changed. - 🪟 Login via Windows (Kerberos, SSO): on a domain computer — without a sign-in form, directly in the service (keytab) or via IIS/Apache. Status: verified on Samba AD, on Windows Server AD, and has not yet been verified in browsers; disabled by default, the regular form remains.
- 🇰🇿 Interface in Russian and Kazakh: switch "RU | ҚАЗАҚ" in the header and on the login form, language by browser settings with memory, dates and numbers
Intl. API errors also occur in the selected language, built-in absence types are also translated. ResponseGET /api/absentand iCal feed do not depend on language. Translation prepared using AI — edits by native speakers are welcome. - ✅ CI on GitHub Actions: unit tests for Node.js 20 and 22 on Linux and Windows,
src/corereconciliation with ad-tools-core, and integration run against the real Samba AD at the ad-testlab booth. - 🐞 Fix for suspension on Samba AD: for an employee without mail in AD, the e-mail field appeared as
undefined, now empty attributes become an empty string. - 🔗 The bundles work: ad-phonebook shows in the card "on vacation until...", replaces ..." and the filter "Only in place," ad-orgchart — a mark on the card in the tree. Both take data from the token
GET /api/absent. - 📦 Installing the entire series at once — ad-tools-suite: one configuration file instead of fifteen
.env, HTTPS, and theabsence.corp.localtype name via Caddy, summary verification. The generator itself createsAPI_TOKENStokens — its own for each service consumer.
Why#
Leaves are often kept in HR's spreadsheet, and colleagues find out about absences when the letter is returned with an automatic reply. The manager agrees on the leave without seeing that half the department leaves on the same dates and the substitute ends up on a business trip. AD Absence collects absences in one place, shows overlaps, and assigns the status "on vacation until November 27, replacing such-and-such" with other internal services.
What he can do#
- 🎨 Customizable types of absences: by default, vacation, sick leave, business trip, remote work, time off — with their own colors. For each type, you specify whether supervisor approval is needed and whether colleagues see the reason (by default, sick leave is shown as "Absent").
- 📝 Employee request: dates, substitution, comment. The number of calendar and working days and the release date are immediately visible. The service warns if the substitution is absent or if too many people leave the department at once.
- ✅ Approval by the manager from attribute
managerin AD — with overlaps: who else from the department is absent on these dates. Changing the dates of an already agreed vacation sends it again for approval; your request cannot be approved. - 👀 "Who is absent": today, who is leaving and returning this week, weekly chart.
- 📊 Monthly calendar-chart for the department or the entire company: overlapping vacations are visible, the "Absent" row highlights days when there is no significant share of the department.
- 👤 Personal page: current and planned absences, history, how many days each type has this year, "I am filling in."
- 🏢 Filter by department and department from AD (
departmentand custom department attribute). - 🔐 Roles by AD groups based on nested groups: HR sees and manages everyone, manager sees their department and subordinates, employee controls themselves.
- 📅 Production calendar of RC/RF from a file (JSON and XML with xmlcalendar.ru or CSV): holidays, transfers, working Saturdays, and shortened days are counted in the calculation of working days and release dates.
- 📲 The department's iCal feed for subscriptions in Outlook, Thunderbird, and phone — via the HMAC-signed link, where sick leave is shown as "Not available."
- 🪟 Optional sign-in via Windows (Kerberos) — see above.
- 🇰🇿 Russian and Kazakh interface.
- 📜 Activity log (who contributed, changed, agreed), light and dark topics, adaptive layout.
Integration point for other services#
GET /api/absent?date=YYYY-MM-DD gives away who is absent, until what date, when they leave, and who is filling in. Thus, the ad-phonebook directory and the ad-orgchart organizational structure already show the employee's status (their server requests the API with the token and caches the response for 3 minutes), while the portal and other services can connect the same way.
- The response contains only agreed absences; comments are never passed; for "private" types (sick leave) instead of the reason — "Absent."
- Access by token in the header
Authorization: Bearer …, by logging into the service itself, or openly (API_PUBLIC=true) — only within the internal network. For requests from another service's browser, there is a CORS setting. - Filters by logins, department, and department; response is cached for 60 seconds.
Examples of Node.js and PowerShell queries are in the README.
Security#
| Measure | How is |
|---|---|
| Read-only AD | The service account reads employees, login is bind on behalf of the employee themselves. The service does not change anything in AD |
| Encryption | LDAPS or StartTLS with certificate validation; without them, runtime is prohibited; HTTPS embedded or via proxy |
| Sessions | Signed HMAC-SHA256 cookies HttpOnly; SameSite=Lax, roles are validated by AD with each cached |
| CSRF | Modifying queries — only application/json and from your own Origin |
| Password brute force | 10 failed attempts in 15 minutes by IP and login (CORP\Ivanov and ivanov@corp.local — one counter) |
| Someone else's domain | ДРУГОЙ\ivanov and ivanov@другой.суффикс do not allow logging in under their ivanov (ad-tools-core core) |
| LDAP injection | Values in filters are shielded according to RFC 4515 |
| Medical data | The reason for "sick leave" is seen only by the employee themselves, their supervisor, substituting, and HR; outside (API, iCal) — "Absent" |
| Browser | Strict CSP without unsafe-inline, X-Frame-Options: DENY, no external resources |
Under the hood#
Node.js 22+ on node:http and node:crypto. Connection to AD, login, sessions, and Kerberos is the common core of the ad-tools-core series in src/core/. The only dependency is the ldapts library (it needs Node.js 22). The frontend is vanilla JavaScript without a build, the storage is a JSON file with atomic record. Production calendar parsing and iCal generation are implemented in the project.
Try it without AD#
Required Node.js 22 or newer:
npm ci
npm run demo # http://localhost:8080
A fictional company of 33 employees in two departments, missing around today's date, and an example of the Kazakhstan holiday calendar. Everyone's password is demo, data is stored in memory and reset upon restart.
| Login | Role | What to see |
|---|---|---|
ivanov | IT department employee | Own vacation request, personal page, "I am substituting" |
petrov | Head of IT Department | Approval: the employee's vacation overlaps with the vacation of their replacement |
abdrakhmanov | Commercial Director | Sales Department: three overlapping vacations |
kassymova | HR department | Entire company, sick leave, production calendar loading, |
Installation in your own domain#
TLDR:
cp .env.example .env # заполнить: LDAP_*, HR_GROUP_DN, SESSION_SECRET
npm ci --omit=dev
npm run check-ldap -- ivanov # проверить подключение, группы и область руководителя
npm start
The repository contains detailed instructions for administrators (docs/INSTALL.md): AD attributes and groups, service account, LDAPS checking, installation on Windows Server (service via WinSW under LocalService), Linux (systemd) and Docker, HTTPS, absence types and rules, production calendar, connecting ad-phonebook, ad-orgchart, and other services, backup and troubleshooting. Windows login is described in a separate docs/KERBEROS.md document. The entire AD Tools series can be installed at once through ad-tools-suite.
Project status#
- GPL-3.0 license, source code available upon request.
- Covered by auto-tests (40 tests per
node --test, all passing) on Node.js 20 and 22 on Linux and Windows; with each push — an integration run against the real Samba AD on the ad-testlab booth. Demo mode is tested in the browser under the roles of employee, manager, and HR, including the width of the phone screen. - Working with Windows Server AD has not yet been verified. The Docker image build and Windows service installation via WinSW have also not been verified.
- Therefore, we are looking for administrators and HR willing to try it in a test domain and share what we achieved.
How to help#
- ⭐ Give a star to the ad-tools showcase if the project is useful.
- 🧪 Deploy in the test domain (start with
npm run demoandnpm run check-ldap) and write in the comments what worked and what didn't. - 🗓️ Share how your vacations and appointments are arranged — what types and rules are missing.
- 🇰🇿 Correct the Kazakh translation in
public/i18n/kk.json. - 🛠️ Questions and access requests — through the Issues storefront; after gaining access, send issues and pull requests to the service repository.
👉 Repository: source code — upon request, leave a request. Series showcase — github.com/WorkTime-kz/ad-tools.
Comments · 0
No comments yet.Sign in to comment, rate and see all comments.