famedly / famedly-sync

GNU Affero General Public License v3.0
4 stars 0 forks source link

Improve enable_value and disable_value status #12

Closed nikzen closed 2 months ago

nikzen commented 3 months ago

Description

Right now, we only allow one value for enable or disable status. However in real life, it might happen that we need to figure out if we should create or delete an account based on multiple parameters.

Here is a link of how the userAccountcontrol might look like: https://www.der-windows-papst.de/2016/12/18/active-directory-useraccountcontrol-values/

Solution

We allow to add multiple values. This means a customer can configure:

status: userAccountControl
enable_value: 512, 544, 66048, 66080
disable_value: 2, 514, 546, 66050, 66082

In general it will give us more flexibility.

tlater-famedly commented 3 months ago

Here's a more comprehensive list @nikzen found: https://jackstromberg.com/2013/01/useraccountcontrol-attributeflag-values/

It gets a bit more complex, too, as the field can also contain these search/filter extensions: https://serverfault.com/questions/166840/how-would-i-build-an-ldap-query-for-ad-that-returns-all-users-in-a-particular-se

Shouldn't appear in the actual search output, though, so that is primarily for info.

tlater-famedly commented 2 months ago

We should probably only define disable values - otherwise users must enumerate every single possible not-disabled state.

We should quickly talk to someone with more LDAP experience to confirm this is a reasonable approach.

nikzen commented 2 months ago

We should probably only define disable values - otherwise users must enumerate every single possible not-disabled state.

We should quickly talk to someone with more LDAP experience to confirm this is a reasonable approach.

Good idea, lets do it like this

tlater-famedly commented 2 months ago

If anyone else starts working on this, consider basing the work off #17, it makes changes to the configuration which would cause issues for this work, and is going to merge very soon.