Releases: ahaenggli/AzureAD-LDAP-wrapper
Releases · ahaenggli/AzureAD-LDAP-wrapper
v2.0.3
[2.0.3] - 2024-12-28
Changed
- set node version in docker container to 22 (fix #87)
(build is kept at version 18 because of an issue) - removed placeholder secrets from the dockerfile to prevent export error of SecretsUsedInArgOrEnv
- removed build for ppc64le arch due to build errors with the new node version
- updated dependencies, removed package fs:0.0.1-security as fs is npm default
- fetch customSecurityAttributes by default if entra app permissions are set correctly (probably also fixes #94)
Fixed
- handling missing .cache dir if startet directly in npm
- write group without special chars to disk (probably fix #90)
v2.0.2
[2.0.2] - 2024-06-01
Changed
- updated npm dependencies
- renamed Azure, AzureAD, ... to Microsoft Entra ID
Fixed
- Checked and fixed all links throughout the application.
- Resolved issue #68, ensuring that the container can start even if the original JSON is corrupt.
Added
- usage examples for
Portainer
,Authelia
andSynology Radius with UniFi
in the documentation - Introducing new environment variable
LDAP_USERS_SYNCONLYINGROUP
:- When set, only users within the specified groups are fetched and made available in the wrapper.
- Multiple group names can be specified using the pipe character (|).
- This addresses also issue #65. The variable can be used in conjunction with
LDAP_USERS_SETDEFAULTGROUP
(the next new one).
- New environment variable
LDAP_USERS_SETDEFAULTGROUP
:- When set, the first specified group associated with the user will be used as the default group.
- Multiple group names can be specified using the pipe character (|).
- For example,
admins|finance|hr
. If a user is within both groups (finance and hr), the default group will be set to finance because it was defined first. - With DSM 7, there are some issues regarding group permissions (#47). ACL and UID/GID shifting can help. However, when losing the permissions, there seems to be some sort of fallback to the default group. With this setting, you can adjust the default group for your users.
- Experimental environment variable
LDAP_DOMAIN_OU
:- In a tenant with multiple domains, the same username can also be used multiple times (issue #74)
- When the env var is set, the domain name for each user is appended in the username as ou=domain.tld
So instead of cn=bob it will become cn=bob,ou=domain.tld. This way bob from domain1 and domain2 can be separated
bybob,ou=domain1.tld
andbob,ou=domain2.tld
. - The feature is only experimental. There will be changes in handling the different domains.
v2.0.1
[2.0.1] - 2023-07-21
Changed
- Set ConsistencyLevel to eventual to enable the use of advanced queries and filters. (#55)
- Set $count parameter to to true for fetching users and groups, allowing the use of advanced queries and filters.
- Removed LDAP_BASEDN in dockerfile, because the value is generated by default from LDAP_DOMAIN.
Fixed
v2.0.0
[2.0.0] - 2023-06-18
Changed
-
Updated minimum required Node version to v17 (--openssl-legacy-provider for md4 in sambaNTPassword)
-
Replaced use of smbhash with crypto.createHash
-
Replaced usage of @azure/identity with @azure/msal-node
-
Updated ldapjs to v3.0.1
-
Refactored codebase to improve maintainability, including restructuring the project into multiple files for better organization and readability.
As a result, existing customizers (mapped/app/customizer/ldap_customizer.js
) must be modified to use the following paths:const config = require('../src/config'); const helper = require('../src/helper');
Fixed
- Usernames are now case-insensitive (issue #40)
- Searches are generally case-insensitive, while results are returned in CamelCase.
- Searches for 'one' (singleLevel/singleLevel) no longer return the base entry itself.
Added
- Multi-arch build and Docker images
- Documentation now available with GitHub Pages: https://ahaenggli.github.io/AzureAD-LDAP-wrapper
- Environment variables now checked at startup
- TenantId, AppId, AppSecret, and AppPermissions in Graph API are now checked at startup
- Added ability to specify AZURE_ENDPOINT, GRAPH_ENDPOINT, and GRAPH_API_VERSION variables
- Nested groups are partially supported. They are added as members of other groups, but no filter query like
:1.2.840.113556.1.4.1941:
is implemented yet.
v1.8.2
[1.8.2] - 2022-09-25
Added
- Env var
GRAPH_IGNORE_MFA_ERRORS
to allow logins despite required MFA. When set to true, some MFA-related error codes are treated as successful logins. Attention, this is only a first attempt and may not work in all cases. Please open an issue if you encounter any problems with this. - Deleted users and groups in Azure are now also removed from the LDAP entries. The number of days these entries should be kept in this wrapper before deletion can be specified with the env var
LDAP_DAYSTOKEEPDELETEDUSERS
. (see FAQ for more details) - Env var
LDAP_PORT
to set a custom port for the listener (e.g. 389 for running the container directly on the host network) - Print version at start-up, so you don't have to remember which version you are currently using.
- Check if the volume /app/.cache is mapped inside a docker container
Fixed
- if env var
LDAP_SAMBANTPWD_MAXCACHETIME
is set to0
(= no cache), the hashed password will never be written to the cache file. - update npm dependencies
v1.8.1
[1.8.1] - 2022-07-24
Changed
- env var
LDAP_ANONYMOUSBIND
default value is set todomain
, so everything works normal on a Synology NAS. However, you may need to change this value toall
ornone
depending on how you use it. - env var
DSM7
is set totrue
as default on new containers - env var
GRAPH_FILTER_GROUPS
ist set tosecurityEnabled eq true
as default on new containers
Fixed
- Modify-Requests: Update custom attributes/values and keep the CamelCase for the attribute names
Added
- env var
LDAP_ANONYMOUSBIND
to restrict access for ldap queries without any authentication if needed. - env var
LDAP_SECURE_ATTRIBUTES
to restrict access for the specified attributes only to superusers. - env var
LDAP_SENSITIVE_ATTRIBUTES
to restrict access to the specified attributes to the respective user only and superusers. - customizer options to change api endpoints from e.g. v1.0 to beta
v1.8.0
[1.8.0] - 2022-07-09
Changed
- Reset .cache folder owner every time the container is started
- Use the SIDs for users/groups from Azure instead of a "randomly" generated one.
However, you can enable the old handling by setting the env varLDAP_SAMBA_USEAZURESID
tofalse
.
Added
- support for proxies (env var
HTTPS_PROXY
orHTTP_PROXY
)
v1.7.0
[1.7.0] - 2022-03-19
Changed
- to support #ext#-users the following changes were necessary:
- added ldap attribute
AzureADuserPrincipalName
with the original AAD-User (for login/password check in the AAD) - allowed domain mismatch for AD-Domain and LDAP-Domain
- try binding via
AzureADuserPrincipalName
if no entry foruid
/dn
is found - env var
GRAPH_FILTER_USERS
to filter user entries in graph using the $filter query parameter
(default is set touserType eq 'Member'
, so external users (guests) will not be synced automatically by default) - env var
GRAPH_FILTER_GROUPS
to filter group entries in graph using the $filter query parameter
(e.g. set it tosecurityEnabled eq true
so only security groups will be sync and not every teams-group)
- added ldap attribute
- SID calculation for users is now
sambaSID: fixedBase + "-" + (uidNumber * 2 + 1000)
- SID calculation for groups is now
sambaSID: fixedBase + "-" + (gidNumber * 2 + 1001)
Added
- support #ext#-users (guest users from other
ExternalAzureAD
) - add ldap attribute
sambaPrimaryGroupSID
for users - optional env var
LDAP_SAMBADOMAINNAME
to manually set the sambaDomainName attribute in the LDAP - optional env var
SAMBA_BASESID
to overwrite the fixed base SID
Fixed
- documentation for join a device with a non AAD user
- handle for @odata.nextLink in graph responses (should fix parts of #14)
- converted schema csv files from utf-16 to utf-8
- handle cn=subschema like any other ldap entries instead of fixed search attributes
- register an error handler for the server (EventEmitter)
- escape LDAP special chars
,=+<>#;\
with an additional backslash
v1.6.0
[1.6.0] - 2021-12-19
Changed
- Switched from @azure/ms-rest-nodeauth to @azure/Identity (ADAL to MSAL)
Treat application as a public client may be set totrue
Set Allow public client flows toYes
and add the permissionUser.Read
forDelegated
in your Azure Portal or you can't login anymore. The settings are described with some images in the README.
Those changes were nesessary to use MSAL instead of ADAL.
Added
- handler to add new ldap entries
- handler to remove/delete new ldap entries
- handler to modify/edit ldap entires
v1.5.0
Added
- env var
LDAP_SYNC_TIME
to set the interval for fetching users/groups from azure database. Default is 30 minutes. (thx @oleksandr-mazur) - env var
DSM7
to activate the DSM 7.0 workaround. It handles gidNumber and uidNumber as integers instead of strings. - Handler to use custom JavaScript to modify your ldap attributes
This allows you e.g. to filter your azure user/groups or modify the ldap attributes. This method is also used in the DSM7 workaround.
Look at this file for an example. Customize it as you need and map the file in your docker setup as/app/customizer/ldap_customizer.js
.