Git Product home page Git Product logo

Comments (7)

seanzechman avatar seanzechman commented on July 29, 2024 1

We were able to work through this using the code I shared on Nov 9th comment - marking this completed

from ldap2pg.

bersace avatar bersace commented on July 29, 2024

hello. thanks for reaching

can you create server side views flattening groups structure ? this will performs better.

from ldap2pg.

seanzechman avatar seanzechman commented on July 29, 2024

I was able to get this to work using the server side flatten group id

- description: "Query LDAP to create superusers."
  ldap:
    base: OU=xxxxx,OU=xxxxx,DC=xxxxx,DC=com
    filter: "(memberOf:1.2.840.113556.1.4.1941:=CN=GROUP_of_GROUPS,OU=xxxxx,OU=xxxxx,DC=xxxxx,DC=com)"
    attribute: sAMAccountName
  grant:
    privilege: grant_personal_account_role
    role: '{sAMAccountName}'
  roles:
  - name: '{sAMAccountName}'
    options: LOGIN SUPERUSER
    comment: '{Name} From LDAP group GROUP_of_GROUPS '

from ldap2pg.

bersace avatar bersace commented on July 29, 2024

Thanks for the feedback.

note that attribute is already computed from {...} in rules.
See verbose logs with normalized configuration.

from ldap2pg.

seanzechman avatar seanzechman commented on July 29, 2024

Hi bersace - Can you elaborate what you mean? Are you stating that I do not need to specify attribute? I used verbose a lot to debug my problems as it took a while to get a proper search criteria.

from ldap2pg.

bersace avatar bersace commented on July 29, 2024

Hi bersace - Can you elaborate what you mean? Are you stating that I do not need to specify attribute?

Yes. attribute is infered from templating.

 - description: "Query LDAP to create superusers."
   ldap:
     base: OU=xxxxx,OU=xxxxx,DC=xxxxx,DC=com
     filter: "(memberOf:1.2.840.113556.1.4.1941:=CN=GROUP_of_GROUPS,OU=xxxxx,OU=xxxxx,DC=xxxxx,DC=com)"
-    attribute: sAMAccountName
   grant:

from ldap2pg.

ntap-jbo avatar ntap-jbo commented on July 29, 2024

I've solved it like this, ldap2pg version 6.0.0 .

As this is was a test, it's not important that the base and filter are exposed.

- description: "Query LDAP to create roles."
  ldapsearch:
    base: DC=libvirt,DC=lan
    filter: "(&(memberOf:1.2.840.113556.1.4.1941:=CN=TestAll,DC=libvirt,DC=lan)(objectClass=person))"
  role:
  - name: '{sAMAccountName}'
    options: LOGIN
    comment: 'From LDAP group {dn}'
    parent: "writers"

from ldap2pg.

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.