Aller au contenu principal

Support for Windows AD nested groups via LDAP

Commentaires

1 commentaire

  • Zendesk API User
    Author: hbarthel - 4/8/2024 8:19

    For the records: support told me that it's not supported. When I added "tokenGroups" to the GROUP_ATTRIBUTE, FS unfortunately reads it as String and only garbage is used. I wrote my own LoginModule as a prototype. When I set

    env.put("java.naming.ldap.attributes.binary", "objectSID tokenGroups");

    it will be returned as a byte[]. So I can read out the nested groups and convert it:

    String sidHex = "";

    for (byte b : sid) {

    sidHex += "\\" + toHexString(b);

    }

     

    private static String toHexString(final byte b) {

    String hexString = Integer.toHexString(b & 0xFF);

    if (hexString.length() % 2 != 0) {

    hexString = "0" + hexString;

    }

    return hexString;

    }

     

    Now I could search for this object like: (objectSid=\01\05\00\00\00\00\00\05\15\00\00\00\e9\67\bb\98\d6\b7\d7\bf\82\05\1e\6c\28\06\00\00)

    0

Vous devez vous connecter pour laisser un commentaire.