GithubHelp home page GithubHelp logo

AD-Group Range RegEx about node-ldapjs HOT 13 CLOSED

Domenik-E avatar Domenik-E commented on June 16, 2024
AD-Group Range RegEx

from node-ldapjs.

Comments (13)

jsumners avatar jsumners commented on June 16, 2024

Attribute options are defined by https://www.rfc-editor.org/rfc/rfc4512#section-2.5:

An attribute description is represented by the ABNF:

 attributedescription = attributetype options
 attributetype = oid
 options = *( SEMI option )
 option = 1*keychar

And keychar is defined by https://www.rfc-editor.org/rfc/rfc4512#section-1.4:

keychar = ALPHA / DIGIT / HYPHEN
...
ALPHA = %x41-5A / %x61-7A ; "A"-"Z" / "a"-"z"
DIGIT = %x30 / LDIGIT ; "0"-"9"
HYPHEN = %x2D ; hyphen ("-")

https://github.com/ldapjs/messages/blob/e0b8f8f5617f8e1880717e6ef8e5da1a5f7adb0e/lib/messages/search-request.js#L28-L42 adheres said spec. Where is the spec that defines range=<x>-<y> as being valid?

from node-ldapjs.

jsumners avatar jsumners commented on June 16, 2024

Closing due to lack of response.

from node-ldapjs.

RajyashreeChat avatar RajyashreeChat commented on June 16, 2024

I am facing the same issue. On trying to retrieve members of an AD Group with more than 1500 members, I was earlier using the below options with ldap version '2.3.3' and was getting the correct output but after upgrading to version '3.0.2' the range functionality inside the attribute stopped working and it started throwing "Error: attribute must be a valid string".

Is there some change in version 3.x which is stopping us from using this functionality, if yes what should be the new correct way to retrieve members of a group with more than 1500 members? Or is there some alternate way to retrieve this member list?

let opts = {
filter: cn=${cnValue},
scope: 'sub',
attributes: [ 'member;range=0-1499'],
timeLimit: 30
}

from node-ldapjs.

jsumners avatar jsumners commented on June 16, 2024

Is there some change in version 3.x which is stopping us from using this functionality

I think this is addressed in this thread and the v3 release notes. Have you reviewed them?

from node-ldapjs.

Uiblar avatar Uiblar commented on June 16, 2024

I am facing the same issue.
if yes what should be the new correct way to retrieve members of a group with more than 1500 members? Or is there some alternate way to retrieve this member list?

I'm quite new to ldapjs and i'm wondering the same. I was trying to read this thread and the v3 release notes, but maybe I'm just not advanced enough to understand a thing :-D

from node-ldapjs.

jsumners avatar jsumners commented on June 16, 2024

range=<x>-<y> is not a valid attribute per the specification. I have asked for some documentation that defines the extension adding it as a valid attribute.

from node-ldapjs.

Domenik-E avatar Domenik-E commented on June 16, 2024

I think it is important to say that there is a difference between LDAP and ActiveDirectory. LDAP is a standard application protocol, while ActiveDirectory is a proprietary product.

The current implementation seems to be totally right from a protocol perspective. I think the common problem is that the majority users of this library (me included) want to interact with an ActiveDirectory. This is were the problem comes up....

from node-ldapjs.

jsumners avatar jsumners commented on June 16, 2024

Yes, that is correct, ActiveDirectory is not a standard LDAP server. The current approach taken by this project is to follow the published RFCs around LDAP as it gives us a source of truth to follow. However, we can update the attribute validator to allow the desired attribute. But we need some documentation to point to in order to make it acceptable.

Otherwise, I suggest investigating the paged search results as defined in RFC 2696. Or work to re-add VLV support as discussed in the v3 release notes.

from node-ldapjs.

Domenik-E avatar Domenik-E commented on June 16, 2024

the technical specification from Microsoft can be found here (Protocol Revision 57.0):
3.1.1.3.1.3.3 Range Retrieval of Attribute Values

from node-ldapjs.

jsumners avatar jsumners commented on June 16, 2024

Is there a web viewable version of that?

from node-ldapjs.

Domenik-E avatar Domenik-E commented on June 16, 2024

Unfortunately no. There ist just a download page

from node-ldapjs.

jsumners avatar jsumners commented on June 16, 2024

This is being worked on in ldapjs/messages#9

from node-ldapjs.

jsumners avatar jsumners commented on June 16, 2024

This has been resolved via the linked issue. Please re-install your dependencies to get the latest @ldapjs/messages.

from node-ldapjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.